[PATCH] [perf-events] Remove static debugfs path

From: Ashwin Chaugule
Date: Wed Sep 30 2009 - 13:36:58 EST


Timechart doesn't work if debugfs is not in /sys/kernel/debug/.
Fixed by using global debugfs_path which is filled in by perf.

modified: tools/perf/util/parse-events.c

Signed-off-by: Ashwin Chaugule <ashwinc@xxxxxxxxxxx>
---
tools/perf/util/parse-events.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 87c424d..c661c90 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -690,8 +690,11 @@ static void store_event_type(const char *orgname)
char filename[PATH_MAX], *c;
FILE *file;
int id;
+
+ sprintf(filename, "%s/", debugfs_path);
+ strncat(filename, orgname, strlen(orgname));
+ strcat(filename, "/id");

- sprintf(filename, "/sys/kernel/debug/tracing/events/%s/id", orgname);
c = strchr(filename, ':');
if (c)
*c = '/';
--
1.5.6.3

------=_20091004154934_63351--


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/