From 65d4b265103a3cb2f0993c946815157a38797421 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Wed, 2 Sep 2015 09:56:33 +0200 Subject: perf tools: Move tracing_path stuff under same namespace Renaming all functions touching tracing_path under same namespace. New interface is: char tracing_path[]; - tracing mount path char tracing_events_path[]; - tracing mount/events path void tracing_path_set(const char *mountpoint); - setting directly tracing_path(_events), used by --debugfs-dir option const char *tracing_path_mount(void); - initial setup of tracing_(events)_path, called from perf.c mounts debugfs/tracefs if needed and possible char *get_tracing_file(const char *name); void put_tracing_file(char *file); - get/put tracing file path Signed-off-by: Jiri Olsa Cc: Raphael Beamonte Cc: David Ahern Cc: Matt Fleming Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/1441180605-24737-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/util.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tools/perf/util/util.c') diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index 74f71f8afcc2..b959f783f6cd 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -390,7 +390,7 @@ void set_term_quiet_input(struct termios *old) tcsetattr(0, TCSANOW, &tc); } -static void set_tracing_events_path(const char *tracing, const char *mountpoint) +static void __tracing_path_set(const char *tracing, const char *mountpoint) { snprintf(tracing_path, sizeof(tracing_path), "%s/%s", mountpoint, tracing); @@ -398,7 +398,7 @@ static void set_tracing_events_path(const char *tracing, const char *mountpoint) mountpoint, tracing, "events"); } -static const char *__perf_tracefs_mount(void) +static const char *tracing_path_tracefs_mount(void) { const char *mnt; @@ -406,12 +406,12 @@ static const char *__perf_tracefs_mount(void) if (!mnt) return NULL; - set_tracing_events_path("", mnt); + __tracing_path_set("", mnt); return mnt; } -static const char *__perf_debugfs_mount(void) +static const char *tracing_path_debugfs_mount(void) { const char *mnt; @@ -419,27 +419,27 @@ static const char *__perf_debugfs_mount(void) if (!mnt) return NULL; - set_tracing_events_path("tracing/", mnt); + __tracing_path_set("tracing/", mnt); return mnt; } -const char *perf_debugfs_mount(void) +const char *tracing_path_mount(void) { const char *mnt; - mnt = __perf_tracefs_mount(); + mnt = tracing_path_tracefs_mount(); if (mnt) return mnt; - mnt = __perf_debugfs_mount(); + mnt = tracing_path_debugfs_mount(); return mnt; } -void perf_debugfs_set_path(const char *mntpt) +void tracing_path_set(const char *mntpt) { - set_tracing_events_path("tracing/", mntpt); + __tracing_path_set("tracing/", mntpt); } char *get_tracing_file(const char *name) -- cgit v1.2.3-59-g8ed1b