diff options
author | Jiri Olsa <jolsa@kernel.org> | 2015-09-02 10:56:33 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-09-02 22:30:47 +0300 |
commit | 65d4b265103a3cb2f0993c946815157a38797421 (patch) | |
tree | c5019911c8c3a907b7a701ad83418e81116dd580 /tools/perf/perf.c | |
parent | f6a09af7de3b39b1e4fcff7374871f834498b7f0 (diff) | |
download | linux-65d4b265103a3cb2f0993c946815157a38797421.tar.xz |
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 <jolsa@kernel.org>
Cc: Raphael Beamonte <raphael.beamonte@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1441180605-24737-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/perf.c')
-rw-r--r-- | tools/perf/perf.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/perf.c b/tools/perf/perf.c index f500a4b40722..0e99cd1de9dd 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c @@ -214,7 +214,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) fprintf(stderr, "No directory given for --debugfs-dir.\n"); usage(perf_usage_string); } - perf_debugfs_set_path((*argv)[1]); + tracing_path_set((*argv)[1]); if (envchanged) *envchanged = 1; (*argv)++; @@ -230,7 +230,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged) (*argv)++; (*argc)--; } else if (!prefixcmp(cmd, CMD_DEBUGFS_DIR)) { - perf_debugfs_set_path(cmd + strlen(CMD_DEBUGFS_DIR)); + tracing_path_set(cmd + strlen(CMD_DEBUGFS_DIR)); fprintf(stderr, "dir: %s\n", tracing_path); if (envchanged) *envchanged = 1; @@ -517,8 +517,10 @@ int main(int argc, const char **argv) cmd = perf_extract_argv0_path(argv[0]); if (!cmd) cmd = "perf-help"; - /* get debugfs mount point from /proc/mounts */ - perf_debugfs_mount(); + + /* get debugfs/tracefs mount point from /proc/mounts */ + tracing_path_mount(); + /* * "perf-xxxx" is the same as "perf xxxx", but we obviously: * |