diff options
Diffstat (limited to 'tools/perf/util/probe-file.c')
-rw-r--r-- | tools/perf/util/probe-file.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c index 499c83ccd44b..89dbeb92c68e 100644 --- a/tools/perf/util/probe-file.c +++ b/tools/perf/util/probe-file.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include "color.h" | 22 | #include "color.h" |
23 | #include "symbol.h" | 23 | #include "symbol.h" |
24 | #include "thread.h" | 24 | #include "thread.h" |
25 | #include <api/fs/fs.h> | 25 | #include <api/fs/tracing_path.h> |
26 | #include "probe-event.h" | 26 | #include "probe-event.h" |
27 | #include "probe-file.h" | 27 | #include "probe-file.h" |
28 | #include "session.h" | 28 | #include "session.h" |
@@ -72,21 +72,11 @@ static void print_both_open_warning(int kerr, int uerr) | |||
72 | static int open_probe_events(const char *trace_file, bool readwrite) | 72 | static int open_probe_events(const char *trace_file, bool readwrite) |
73 | { | 73 | { |
74 | char buf[PATH_MAX]; | 74 | char buf[PATH_MAX]; |
75 | const char *__debugfs; | ||
76 | const char *tracing_dir = ""; | 75 | const char *tracing_dir = ""; |
77 | int ret; | 76 | int ret; |
78 | 77 | ||
79 | __debugfs = tracefs__mountpoint(); | ||
80 | if (__debugfs == NULL) { | ||
81 | tracing_dir = "tracing/"; | ||
82 | |||
83 | __debugfs = debugfs__mountpoint(); | ||
84 | if (__debugfs == NULL) | ||
85 | return -ENOTSUP; | ||
86 | } | ||
87 | |||
88 | ret = e_snprintf(buf, PATH_MAX, "%s/%s%s", | 78 | ret = e_snprintf(buf, PATH_MAX, "%s/%s%s", |
89 | __debugfs, tracing_dir, trace_file); | 79 | tracing_path, tracing_dir, trace_file); |
90 | if (ret >= 0) { | 80 | if (ret >= 0) { |
91 | pr_debug("Opening %s write=%d\n", buf, readwrite); | 81 | pr_debug("Opening %s write=%d\n", buf, readwrite); |
92 | if (readwrite && !probe_event_dry_run) | 82 | if (readwrite && !probe_event_dry_run) |