diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-21 09:38:16 -0400 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-21 09:49:46 -0400 |
| commit | 8b9e74eb8af808807192d16b76565c27154ae7ed (patch) | |
| tree | 699863e988c6b373402f473298529715cce35fdf /tools/perf/builtin-annotate.c | |
| parent | ed8052616680e72f58bca678d4d1678cb12a7e47 (diff) | |
perf tools: Add --tui and --stdio to choose the UI
Relying just on ~/.perfconfig or rebuilding the tool disabling support
for the TUI is too cumbersome, so allow specifying which UI to use and
make the command line switch override whatever is in ~/.perfconfig.
Suggested-by: Christoph Hellwig <hch@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
| -rw-r--r-- | tools/perf/builtin-annotate.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 20ee21d52972..6d5604d8df95 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
| @@ -28,7 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | static char const *input_name = "perf.data"; | 29 | static char const *input_name = "perf.data"; |
| 30 | 30 | ||
| 31 | static bool force; | 31 | static bool force, use_tui, use_stdio; |
| 32 | 32 | ||
| 33 | static bool full_paths; | 33 | static bool full_paths; |
| 34 | 34 | ||
| @@ -427,6 +427,8 @@ static const struct option options[] = { | |||
| 427 | "be more verbose (show symbol address, etc)"), | 427 | "be more verbose (show symbol address, etc)"), |
| 428 | OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, | 428 | OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, |
| 429 | "dump raw trace in ASCII"), | 429 | "dump raw trace in ASCII"), |
| 430 | OPT_BOOLEAN(0, "tui", &use_tui, "Use the TUI interface"), | ||
| 431 | OPT_BOOLEAN(0, "stdio", &use_stdio, "Use the stdio interface"), | ||
| 430 | OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name, | 432 | OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name, |
| 431 | "file", "vmlinux pathname"), | 433 | "file", "vmlinux pathname"), |
| 432 | OPT_BOOLEAN('m', "modules", &symbol_conf.use_modules, | 434 | OPT_BOOLEAN('m', "modules", &symbol_conf.use_modules, |
| @@ -442,6 +444,11 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __used) | |||
| 442 | { | 444 | { |
| 443 | argc = parse_options(argc, argv, options, annotate_usage, 0); | 445 | argc = parse_options(argc, argv, options, annotate_usage, 0); |
| 444 | 446 | ||
| 447 | if (use_stdio) | ||
| 448 | use_browser = 0; | ||
| 449 | else if (use_tui) | ||
| 450 | use_browser = 1; | ||
| 451 | |||
| 445 | setup_browser(); | 452 | setup_browser(); |
| 446 | 453 | ||
| 447 | symbol_conf.priv_size = sizeof(struct sym_priv); | 454 | symbol_conf.priv_size = sizeof(struct sym_priv); |
