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)++;
(*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;
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:
*
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);
mountpoint, tracing, "events");
}
-static const char *__perf_tracefs_mount(void)
+static const char *tracing_path_tracefs_mount(void)
{
const char *mnt;
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;
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)
extern char buildid_dir[];
extern char tracing_path[];
extern char tracing_events_path[];
-extern void perf_debugfs_set_path(const char *mountpoint);
-const char *perf_debugfs_mount(void);
+extern void tracing_path_set(const char *mountpoint);
+const char *tracing_path_mount(void);
char *get_tracing_file(const char *name);
void put_tracing_file(char *file);