aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/api/fs/tracing_path.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2018-05-16 16:27:14 -0300
committerArnaldo Carvalho de Melo <[email protected]>2018-05-16 16:27:14 -0300
commit17c257e867be1880eaf7c1b9dac286086d75d1ec (patch)
treedaa6a7bd9c5787796b12793f59d2de0d1490f7e8 /tools/lib/api/fs/tracing_path.c
parent00a6270361c025bfaae1d70ef1b596d182e05e8a (diff)
tools lib api: Unexport 'tracing_path' variable
One should use tracing_path_mount() instead, so more things get done lazily instead of at every 'perf' tool call startup. Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/lib/api/fs/tracing_path.c')
-rw-r--r--tools/lib/api/fs/tracing_path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lib/api/fs/tracing_path.c b/tools/lib/api/fs/tracing_path.c
index 4f8ec7d476b8..6f5fe942eff4 100644
--- a/tools/lib/api/fs/tracing_path.c
+++ b/tools/lib/api/fs/tracing_path.c
@@ -14,7 +14,7 @@
#include "tracing_path.h"
static char tracing_mnt[PATH_MAX] = "/sys/kernel/debug";
-char tracing_path[PATH_MAX] = "/sys/kernel/debug/tracing";
+static char tracing_path[PATH_MAX] = "/sys/kernel/debug/tracing";
char tracing_events_path[PATH_MAX] = "/sys/kernel/debug/tracing/events";
@@ -75,7 +75,7 @@ char *get_tracing_file(const char *name)
{
char *file;
- if (asprintf(&file, "%s/%s", tracing_path, name) < 0)
+ if (asprintf(&file, "%s/%s", tracing_path_mount(), name) < 0)
return NULL;
return file;