浏览代码

perf tools: Remove mountpoint arg from perf_debugfs_mount

It's not used by any caller. We either detect the mountpoint or use
hardcoded one.

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-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Jiri Olsa 10 年之前
父节点
当前提交
f6a09af7de
共有 3 个文件被更改,包括 9 次插入9 次删除
  1. 1 1
      tools/perf/perf.c
  2. 7 7
      tools/perf/util/util.c
  3. 1 1
      tools/perf/util/util.h

+ 1 - 1
tools/perf/perf.c

@@ -518,7 +518,7 @@ int main(int argc, const char **argv)
 	if (!cmd)
 	if (!cmd)
 		cmd = "perf-help";
 		cmd = "perf-help";
 	/* get debugfs mount point from /proc/mounts */
 	/* get debugfs mount point from /proc/mounts */
-	perf_debugfs_mount(NULL);
+	perf_debugfs_mount();
 	/*
 	/*
 	 * "perf-xxxx" is the same as "perf xxxx", but we obviously:
 	 * "perf-xxxx" is the same as "perf xxxx", but we obviously:
 	 *
 	 *

+ 7 - 7
tools/perf/util/util.c

@@ -398,11 +398,11 @@ static void set_tracing_events_path(const char *tracing, const char *mountpoint)
 		 mountpoint, tracing, "events");
 		 mountpoint, tracing, "events");
 }
 }
 
 
-static const char *__perf_tracefs_mount(const char *mountpoint)
+static const char *__perf_tracefs_mount(void)
 {
 {
 	const char *mnt;
 	const char *mnt;
 
 
-	mnt = tracefs_mount(mountpoint);
+	mnt = tracefs_mount(NULL);
 	if (!mnt)
 	if (!mnt)
 		return NULL;
 		return NULL;
 
 
@@ -411,11 +411,11 @@ static const char *__perf_tracefs_mount(const char *mountpoint)
 	return mnt;
 	return mnt;
 }
 }
 
 
-static const char *__perf_debugfs_mount(const char *mountpoint)
+static const char *__perf_debugfs_mount(void)
 {
 {
 	const char *mnt;
 	const char *mnt;
 
 
-	mnt = debugfs_mount(mountpoint);
+	mnt = debugfs_mount(NULL);
 	if (!mnt)
 	if (!mnt)
 		return NULL;
 		return NULL;
 
 
@@ -424,15 +424,15 @@ static const char *__perf_debugfs_mount(const char *mountpoint)
 	return mnt;
 	return mnt;
 }
 }
 
 
-const char *perf_debugfs_mount(const char *mountpoint)
+const char *perf_debugfs_mount(void)
 {
 {
 	const char *mnt;
 	const char *mnt;
 
 
-	mnt = __perf_tracefs_mount(mountpoint);
+	mnt = __perf_tracefs_mount();
 	if (mnt)
 	if (mnt)
 		return mnt;
 		return mnt;
 
 
-	mnt = __perf_debugfs_mount(mountpoint);
+	mnt = __perf_debugfs_mount();
 
 
 	return mnt;
 	return mnt;
 }
 }

+ 1 - 1
tools/perf/util/util.h

@@ -86,7 +86,7 @@ extern char buildid_dir[];
 extern char tracing_path[];
 extern char tracing_path[];
 extern char tracing_events_path[];
 extern char tracing_events_path[];
 extern void perf_debugfs_set_path(const char *mountpoint);
 extern void perf_debugfs_set_path(const char *mountpoint);
-const char *perf_debugfs_mount(const char *mountpoint);
+const char *perf_debugfs_mount(void);
 char *get_tracing_file(const char *name);
 char *get_tracing_file(const char *name);
 void put_tracing_file(char *file);
 void put_tracing_file(char *file);