diff options
Diffstat (limited to 'tools/perf/builtin-report.c')
| -rw-r--r-- | tools/perf/builtin-report.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 55fc1f46892a..5de405d45230 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | static char const *input_name = "perf.data"; | 33 | static char const *input_name = "perf.data"; |
| 34 | 34 | ||
| 35 | static bool force; | 35 | static bool force, use_tui, use_stdio; |
| 36 | static bool hide_unresolved; | 36 | static bool hide_unresolved; |
| 37 | static bool dont_use_callchains; | 37 | static bool dont_use_callchains; |
| 38 | 38 | ||
| @@ -107,7 +107,8 @@ static int perf_session__add_hist_entry(struct perf_session *self, | |||
| 107 | goto out_free_syms; | 107 | goto out_free_syms; |
| 108 | err = 0; | 108 | err = 0; |
| 109 | if (symbol_conf.use_callchain) { | 109 | if (symbol_conf.use_callchain) { |
| 110 | err = append_chain(he->callchain, data->callchain, syms, data->period); | 110 | err = callchain_append(he->callchain, data->callchain, syms, |
| 111 | data->period); | ||
| 111 | if (err) | 112 | if (err) |
| 112 | goto out_free_syms; | 113 | goto out_free_syms; |
| 113 | } | 114 | } |
| @@ -450,6 +451,8 @@ static const struct option options[] = { | |||
| 450 | "Show per-thread event counters"), | 451 | "Show per-thread event counters"), |
| 451 | OPT_STRING(0, "pretty", &pretty_printing_style, "key", | 452 | OPT_STRING(0, "pretty", &pretty_printing_style, "key", |
| 452 | "pretty printing style key: normal raw"), | 453 | "pretty printing style key: normal raw"), |
| 454 | OPT_BOOLEAN(0, "tui", &use_tui, "Use the TUI interface"), | ||
| 455 | OPT_BOOLEAN(0, "stdio", &use_stdio, "Use the stdio interface"), | ||
| 453 | OPT_STRING('s', "sort", &sort_order, "key[,key2...]", | 456 | OPT_STRING('s', "sort", &sort_order, "key[,key2...]", |
| 454 | "sort by key(s): pid, comm, dso, symbol, parent"), | 457 | "sort by key(s): pid, comm, dso, symbol, parent"), |
| 455 | OPT_BOOLEAN(0, "showcpuutilization", &symbol_conf.show_cpu_utilization, | 458 | OPT_BOOLEAN(0, "showcpuutilization", &symbol_conf.show_cpu_utilization, |
| @@ -482,8 +485,15 @@ int cmd_report(int argc, const char **argv, const char *prefix __used) | |||
| 482 | { | 485 | { |
| 483 | argc = parse_options(argc, argv, options, report_usage, 0); | 486 | argc = parse_options(argc, argv, options, report_usage, 0); |
| 484 | 487 | ||
| 488 | if (use_stdio) | ||
| 489 | use_browser = 0; | ||
| 490 | else if (use_tui) | ||
| 491 | use_browser = 1; | ||
| 492 | |||
| 485 | if (strcmp(input_name, "-") != 0) | 493 | if (strcmp(input_name, "-") != 0) |
| 486 | setup_browser(); | 494 | setup_browser(); |
| 495 | else | ||
| 496 | use_browser = 0; | ||
| 487 | /* | 497 | /* |
| 488 | * Only in the newt browser we are doing integrated annotation, | 498 | * Only in the newt browser we are doing integrated annotation, |
| 489 | * so don't allocate extra space that won't be used in the stdio | 499 | * so don't allocate extra space that won't be used in the stdio |
