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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 095b88207cd3..85e1aed95204 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -13,7 +13,7 @@
13#include "util/quote.h" 13#include "util/quote.h"
14#include "util/run-command.h" 14#include "util/run-command.h"
15#include "util/parse-events.h" 15#include "util/parse-events.h"
16#include "util/debugfs.h" 16#include <lk/debugfs.h>
17#include <pthread.h> 17#include <pthread.h>
18 18
19const char perf_usage_string[] = 19const char perf_usage_string[] =
@@ -60,6 +60,7 @@ static struct cmd_struct commands[] = {
60 { "trace", cmd_trace, 0 }, 60 { "trace", cmd_trace, 0 },
61#endif 61#endif
62 { "inject", cmd_inject, 0 }, 62 { "inject", cmd_inject, 0 },
63 { "mem", cmd_mem, 0 },
63}; 64};
64 65
65struct pager_config { 66struct pager_config {
@@ -193,13 +194,13 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
193 fprintf(stderr, "No directory given for --debugfs-dir.\n"); 194 fprintf(stderr, "No directory given for --debugfs-dir.\n");
194 usage(perf_usage_string); 195 usage(perf_usage_string);
195 } 196 }
196 debugfs_set_path((*argv)[1]); 197 perf_debugfs_set_path((*argv)[1]);
197 if (envchanged) 198 if (envchanged)
198 *envchanged = 1; 199 *envchanged = 1;
199 (*argv)++; 200 (*argv)++;
200 (*argc)--; 201 (*argc)--;
201 } else if (!prefixcmp(cmd, CMD_DEBUGFS_DIR)) { 202 } else if (!prefixcmp(cmd, CMD_DEBUGFS_DIR)) {
202 debugfs_set_path(cmd + strlen(CMD_DEBUGFS_DIR)); 203 perf_debugfs_set_path(cmd + strlen(CMD_DEBUGFS_DIR));
203 fprintf(stderr, "dir: %s\n", debugfs_mountpoint); 204 fprintf(stderr, "dir: %s\n", debugfs_mountpoint);
204 if (envchanged) 205 if (envchanged)
205 *envchanged = 1; 206 *envchanged = 1;
@@ -461,7 +462,7 @@ int main(int argc, const char **argv)
461 if (!cmd) 462 if (!cmd)
462 cmd = "perf-help"; 463 cmd = "perf-help";
463 /* get debugfs mount point from /proc/mounts */ 464 /* get debugfs mount point from /proc/mounts */
464 debugfs_mount(NULL); 465 perf_debugfs_mount(NULL);
465 /* 466 /*
466 * "perf-xxxx" is the same as "perf xxxx", but we obviously: 467 * "perf-xxxx" is the same as "perf xxxx", but we obviously:
467 * 468 *
@@ -517,9 +518,8 @@ int main(int argc, const char **argv)
517 518
518 while (1) { 519 while (1) {
519 static int done_help; 520 static int done_help;
520 static int was_alias; 521 int was_alias = run_argv(&argc, &argv);
521 522
522 was_alias = run_argv(&argc, &argv);
523 if (errno != ENOENT) 523 if (errno != ENOENT)
524 break; 524 break;
525 525