|
@@ -32,7 +32,7 @@
|
|
|
|
|
|
static char const *input_name = "perf.data";
|
|
static char const *input_name = "perf.data";
|
|
|
|
|
|
-static bool force;
|
|
|
|
|
|
+static bool force, use_tui, use_stdio;
|
|
static bool hide_unresolved;
|
|
static bool hide_unresolved;
|
|
static bool dont_use_callchains;
|
|
static bool dont_use_callchains;
|
|
|
|
|
|
@@ -450,6 +450,8 @@ static const struct option options[] = {
|
|
"Show per-thread event counters"),
|
|
"Show per-thread event counters"),
|
|
OPT_STRING(0, "pretty", &pretty_printing_style, "key",
|
|
OPT_STRING(0, "pretty", &pretty_printing_style, "key",
|
|
"pretty printing style key: normal raw"),
|
|
"pretty printing style key: normal raw"),
|
|
|
|
+ OPT_BOOLEAN(0, "tui", &use_tui, "Use the TUI interface"),
|
|
|
|
+ OPT_BOOLEAN(0, "stdio", &use_stdio, "Use the stdio interface"),
|
|
OPT_STRING('s', "sort", &sort_order, "key[,key2...]",
|
|
OPT_STRING('s', "sort", &sort_order, "key[,key2...]",
|
|
"sort by key(s): pid, comm, dso, symbol, parent"),
|
|
"sort by key(s): pid, comm, dso, symbol, parent"),
|
|
OPT_BOOLEAN(0, "showcpuutilization", &symbol_conf.show_cpu_utilization,
|
|
OPT_BOOLEAN(0, "showcpuutilization", &symbol_conf.show_cpu_utilization,
|
|
@@ -482,8 +484,15 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
|
|
{
|
|
{
|
|
argc = parse_options(argc, argv, options, report_usage, 0);
|
|
argc = parse_options(argc, argv, options, report_usage, 0);
|
|
|
|
|
|
|
|
+ if (use_stdio)
|
|
|
|
+ use_browser = 0;
|
|
|
|
+ else if (use_tui)
|
|
|
|
+ use_browser = 1;
|
|
|
|
+
|
|
if (strcmp(input_name, "-") != 0)
|
|
if (strcmp(input_name, "-") != 0)
|
|
setup_browser();
|
|
setup_browser();
|
|
|
|
+ else
|
|
|
|
+ use_browser = 0;
|
|
/*
|
|
/*
|
|
* Only in the newt browser we are doing integrated annotation,
|
|
* Only in the newt browser we are doing integrated annotation,
|
|
* so don't allocate extra space that won't be used in the stdio
|
|
* so don't allocate extra space that won't be used in the stdio
|