aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/perf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/perf.c')
-rw-r--r--tools/perf/perf.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 85e1aed95204..8b38b4e80ec2 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -49,14 +49,14 @@ static struct cmd_struct commands[] = {
49 { "version", cmd_version, 0 }, 49 { "version", cmd_version, 0 },
50 { "script", cmd_script, 0 }, 50 { "script", cmd_script, 0 },
51 { "sched", cmd_sched, 0 }, 51 { "sched", cmd_sched, 0 },
52#ifdef LIBELF_SUPPORT 52#ifdef HAVE_LIBELF_SUPPORT
53 { "probe", cmd_probe, 0 }, 53 { "probe", cmd_probe, 0 },
54#endif 54#endif
55 { "kmem", cmd_kmem, 0 }, 55 { "kmem", cmd_kmem, 0 },
56 { "lock", cmd_lock, 0 }, 56 { "lock", cmd_lock, 0 },
57 { "kvm", cmd_kvm, 0 }, 57 { "kvm", cmd_kvm, 0 },
58 { "test", cmd_test, 0 }, 58 { "test", cmd_test, 0 },
59#ifdef LIBAUDIT_SUPPORT 59#ifdef HAVE_LIBAUDIT_SUPPORT
60 { "trace", cmd_trace, 0 }, 60 { "trace", cmd_trace, 0 },
61#endif 61#endif
62 { "inject", cmd_inject, 0 }, 62 { "inject", cmd_inject, 0 },
@@ -456,6 +456,7 @@ int main(int argc, const char **argv)
456{ 456{
457 const char *cmd; 457 const char *cmd;
458 458
459 /* The page_size is placed in util object. */
459 page_size = sysconf(_SC_PAGE_SIZE); 460 page_size = sysconf(_SC_PAGE_SIZE);
460 461
461 cmd = perf_extract_argv0_path(argv[0]); 462 cmd = perf_extract_argv0_path(argv[0]);
@@ -480,7 +481,14 @@ int main(int argc, const char **argv)
480 fprintf(stderr, "cannot handle %s internally", cmd); 481 fprintf(stderr, "cannot handle %s internally", cmd);
481 goto out; 482 goto out;
482 } 483 }
483 484#ifdef HAVE_LIBAUDIT_SUPPORT
485 if (!prefixcmp(cmd, "trace")) {
486 set_buildid_dir();
487 setup_path();
488 argv[0] = "trace";
489 return cmd_trace(argc, argv, NULL);
490 }
491#endif
484 /* Look for flags.. */ 492 /* Look for flags.. */
485 argv++; 493 argv++;
486 argc--; 494 argc--;