diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-03-04 09:06:42 +0900 |
---|---|---|
committer | Jiri Olsa <jolsa@kernel.org> | 2014-05-21 11:45:34 +0200 |
commit | a2ce067e55e328f1a6fe3dddf77a173381ffdfe1 (patch) | |
tree | b63fb28811cd81b4ae6559db7d648a0d143bd65c /tools/perf/ui | |
parent | fb821c9e7135e324ff6d50d030352718a80364b4 (diff) | |
download | blackbird-op-linux-a2ce067e55e328f1a6fe3dddf77a173381ffdfe1.tar.gz blackbird-op-linux-a2ce067e55e328f1a6fe3dddf77a173381ffdfe1.zip |
perf tools: Allow hpp fields to be sort keys
Add overhead{,_sys,_us,_guest_sys,_guest_us}, sample and period sort
keys so that they can be selected with --sort/-s option.
$ perf report -s period,comm --stdio
...
# Overhead Period Command
# ........ ............ ...............
#
47.06% 152 swapper
13.93% 45 qemu-system-arm
12.38% 40 synergys
3.72% 12 firefox
2.48% 8 xchat
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Link: http://lkml.kernel.org/r/1400480762-22852-9-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf/ui')
-rw-r--r-- | tools/perf/ui/hist.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index e7ac794382c1..24116a48298f 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c @@ -346,8 +346,13 @@ void perf_hpp__init(void) int i; for (i = 0; i < PERF_HPP__MAX_INDEX; i++) { - INIT_LIST_HEAD(&perf_hpp__format[i].list); - INIT_LIST_HEAD(&perf_hpp__format[i].sort_list); + struct perf_hpp_fmt *fmt = &perf_hpp__format[i]; + + INIT_LIST_HEAD(&fmt->list); + + /* sort_list may be linked by setup_sorting() */ + if (fmt->sort_list.next == NULL) + INIT_LIST_HEAD(&fmt->sort_list); } perf_hpp__column_enable(PERF_HPP__OVERHEAD); |