diff options
author | Jiri Olsa <jolsa@kernel.org> | 2014-08-22 09:58:38 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-08-24 07:11:19 -0400 |
commit | 2f3f9bcf000b2043a480e7cc0cae582559fb0f13 (patch) | |
tree | bccd5beceef431d76bfa32dc0cb00ee48a69916c /tools/perf/ui | |
parent | 3969cc094a9dbb40e624b259caa73c7a2056b249 (diff) |
perf tools: Add +field argument support for --field option
Adding support to add field(s) to default field order via using the '+'
prefix, like for report:
$ perf report
Samples: 10 of event 'cycles', Event count (approx.): 4463799
Overhead Command Shared Object Symbol
32.40% ls [kernel.kallsyms] [k] filemap_fault
28.19% ls [kernel.kallsyms] [k] get_page_from_freelist
23.38% ls [kernel.kallsyms] [k] enqueue_entity
15.04% ls [kernel.kallsyms] [k] mmap_region
$ perf report -F +period,sample
Samples: 10 of event 'cycles', Event count (approx.): 4463799
Overhead Period Samples Command Shared Object Symbol
32.40% 1446493 1 ls [kernel.kallsyms] [k] filemap_fault
28.19% 1258486 1 ls [kernel.kallsyms] [k] get_page_from_freelist
23.38% 1043754 1 ls [kernel.kallsyms] [k] enqueue_entity
15.04% 671160 1 ls [kernel.kallsyms] [k] mmap_region
Works in general for commands using --field option.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1408715919-25990-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r-- | tools/perf/ui/hist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index 75eb6ac821f8..2af18376b077 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c | |||
@@ -452,7 +452,7 @@ void perf_hpp__init(void) | |||
452 | /* | 452 | /* |
453 | * If user specified field order, no need to setup default fields. | 453 | * If user specified field order, no need to setup default fields. |
454 | */ | 454 | */ |
455 | if (field_order) | 455 | if (is_strict_order(field_order)) |
456 | return; | 456 | return; |
457 | 457 | ||
458 | if (symbol_conf.cumulate_callchain) { | 458 | if (symbol_conf.cumulate_callchain) { |
@@ -519,7 +519,7 @@ void perf_hpp__column_disable(unsigned col) | |||
519 | 519 | ||
520 | void perf_hpp__cancel_cumulate(void) | 520 | void perf_hpp__cancel_cumulate(void) |
521 | { | 521 | { |
522 | if (field_order) | 522 | if (is_strict_order(field_order)) |
523 | return; | 523 | return; |
524 | 524 | ||
525 | perf_hpp__column_disable(PERF_HPP__OVERHEAD_ACC); | 525 | perf_hpp__column_disable(PERF_HPP__OVERHEAD_ACC); |