From 63c9e01e1a0dcecc982137d527d44b5ac808b607 Mon Sep 17 00:00:00 2001 From: Ashwin Chaugule Date: Sun, 4 Oct 2009 15:49:34 -0700 Subject: perf tools: Remove static debugfs path from parse-events Timechart doesn't work if debugfs is not in /sys/kernel/debug/. Fixed by using global debugfs_path which is filled in by perf. Signed-off-by: Ashwin Chaugule Cc: "Arjan van de Ven" LKML-Reference: Signed-off-by: Ingo Molnar --- tools/perf/util/parse-events.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 87c424de79e..8cfb48cbbea 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -691,7 +691,10 @@ static void store_event_type(const char *orgname) FILE *file; int id; - sprintf(filename, "/sys/kernel/debug/tracing/events/%s/id", orgname); + sprintf(filename, "%s/", debugfs_path); + strncat(filename, orgname, strlen(orgname)); + strcat(filename, "/id"); + c = strchr(filename, ':'); if (c) *c = '/'; -- cgit v1.2.3