diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-05-22 11:37:40 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-05-22 11:37:40 +0200 |
commit | e450f90e8c7d0bf70519223c1b848446ae63f313 (patch) | |
tree | 078bfe88e5c3fbe397c9ca0d4d8ab2e0ff63979d /tools/perf/builtin-top.c | |
parent | 6480c56130ba073df84d57d61062ec4118b10bbe (diff) | |
parent | eca8183699964579ca8a0b8d116bd1f4da0136f7 (diff) |
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core
Pull perf/core improvements and fixes from Jiri Olsa:
* Android related fixes for pager and map dso resolving (Michael Lentine)
* Add -F option for specifying output fields (Namhyung Kim)
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r-- | tools/perf/builtin-top.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 37d30460bada..5b389ce4cd15 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1083,8 +1083,10 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) OPT_INCR('v', "verbose", &verbose, "be more verbose (show counter open errors, etc)"), OPT_STRING('s', "sort", &sort_order, "key[,key2...]", - "sort by key(s): pid, comm, dso, symbol, parent, weight, local_weight," - " abort, in_tx, transaction"), + "sort by key(s): pid, comm, dso, symbol, parent, cpu, srcline, ..." + " Please refer the man page for the complete list."), + OPT_STRING(0, "fields", &field_order, "key[,keys...]", + "output field(s): overhead, period, sample plus all of sort keys"), OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples, "Show a column with the number of samples"), OPT_CALLBACK_NOOPT('g', NULL, &top.record_opts, @@ -1137,17 +1139,19 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused) if (argc) usage_with_options(top_usage, options); - if (sort_order == default_sort_order) - sort_order = "dso,symbol"; + sort__mode = SORT_MODE__TOP; + /* display thread wants entries to be collapsed in a different tree */ + sort__need_collapse = 1; if (setup_sorting() < 0) { - parse_options_usage(top_usage, options, "s", 1); + if (sort_order) + parse_options_usage(top_usage, options, "s", 1); + if (field_order) + parse_options_usage(sort_order ? NULL : top_usage, + options, "fields", 0); goto out_delete_evlist; } - /* display thread wants entries to be collapsed in a different tree */ - sort__need_collapse = 1; - if (top.use_stdio) use_browser = 0; else if (top.use_tui) |