aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/perf.c
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2013-02-20 10:32:31 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-03-15 12:06:01 -0400
commit1355915ac626da30a0c02ccd4569c1e5ce2cbb82 (patch)
tree37a7cb0618572c4c45d0ec6949cdda6253694291 /tools/perf/perf.c
parent85c66be101e1847f0eb46dcb48d5738572129694 (diff)
perf tools: Extract perf-specific stuff from debugfs.c
Move them to util.c and simplify code a bit. Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1361374353-30385-6-git-send-email-bp@alien8.de Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/perf.c')
-rw-r--r--tools/perf/perf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index f53b735e2822..f6ba7b73f40e 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -193,13 +193,13 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
193 fprintf(stderr, "No directory given for --debugfs-dir.\n"); 193 fprintf(stderr, "No directory given for --debugfs-dir.\n");
194 usage(perf_usage_string); 194 usage(perf_usage_string);
195 } 195 }
196 debugfs_set_path((*argv)[1]); 196 perf_debugfs_set_path((*argv)[1]);
197 if (envchanged) 197 if (envchanged)
198 *envchanged = 1; 198 *envchanged = 1;
199 (*argv)++; 199 (*argv)++;
200 (*argc)--; 200 (*argc)--;
201 } else if (!prefixcmp(cmd, CMD_DEBUGFS_DIR)) { 201 } else if (!prefixcmp(cmd, CMD_DEBUGFS_DIR)) {
202 debugfs_set_path(cmd + strlen(CMD_DEBUGFS_DIR)); 202 perf_debugfs_set_path(cmd + strlen(CMD_DEBUGFS_DIR));
203 fprintf(stderr, "dir: %s\n", debugfs_mountpoint); 203 fprintf(stderr, "dir: %s\n", debugfs_mountpoint);
204 if (envchanged) 204 if (envchanged)
205 *envchanged = 1; 205 *envchanged = 1;
@@ -461,7 +461,7 @@ int main(int argc, const char **argv)
461 if (!cmd) 461 if (!cmd)
462 cmd = "perf-help"; 462 cmd = "perf-help";
463 /* get debugfs mount point from /proc/mounts */ 463 /* get debugfs mount point from /proc/mounts */
464 debugfs_mount(NULL); 464 perf_debugfs_mount(NULL);
465 /* 465 /*
466 * "perf-xxxx" is the same as "perf xxxx", but we obviously: 466 * "perf-xxxx" is the same as "perf xxxx", but we obviously:
467 * 467 *