perf tools: Simplify debugfs mountpoint handling code
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 16 Nov 2011 16:03:07 +0000 (14:03 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 28 Nov 2011 12:11:28 +0000 (10:11 -0200)
commitebf294bf4f147aff29df5a16bfb0f8ebca15feaa
tree37464624abf9243100eab47fdc663def4be121fe
parentc168fbfb93a1c4044287858c6784f0bd1f6cfe33
perf tools: Simplify debugfs mountpoint handling code

We don't need to have two PATH_MAX char sized arrays holding it, just
one in util/debugfs.c will do.

Also rename debugfs_path to tracing_events_path, as it is not the path
to debugfs, that is debugfs_mountpoint. Both are now accessible.

This will allow accessing this code in the perf python binding without
having to drag in perf.c and util/parse-events.c.

The defaults for these variables are the canonical "/sys/kernel/debug"
and "/sys/kernel/debug/tracing/events/", removing the need for simple
tools to call debugfs_mount(NULL).

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-ug9jvtjrsqbluuhqqxpvg30f@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-test.c
tools/perf/perf.c
tools/perf/util/debugfs.c
tools/perf/util/debugfs.h
tools/perf/util/parse-events.c
tools/perf/util/parse-events.h