diff options
author | Namhyung Kim <namhyung@kernel.org> | 2013-12-16 16:55:13 +0900 |
---|---|---|
committer | Jiri Olsa <jolsa@kernel.org> | 2014-06-01 14:35:03 +0200 |
commit | 77284de326e6d8c3b8e866cda5b415c86b522e61 (patch) | |
tree | 467e66067ce47cd13e4e1f54109e94e993097f71 /tools/perf/ui | |
parent | 14135663f1d770bb057f8bf345e5436c985eb29c (diff) |
perf tools: Add more hpp helper functions
Sometimes it needs to disable some columns at runtime. Add help
functions to support that.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arun Sharma <asharma@fb.com>
Tested-by: Rodrigo Campos <rodrigo@sdfg.com.ar>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1401335910-16832-15-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 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index 0ce3e79b2ca7..8ca638754acc 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c @@ -489,6 +489,11 @@ void perf_hpp__column_register(struct perf_hpp_fmt *format) list_add_tail(&format->list, &perf_hpp__list); } +void perf_hpp__column_unregister(struct perf_hpp_fmt *format) +{ + list_del(&format->list); +} + void perf_hpp__register_sort_field(struct perf_hpp_fmt *format) { list_add_tail(&format->sort_list, &perf_hpp__sort_list); @@ -500,6 +505,18 @@ void perf_hpp__column_enable(unsigned col) perf_hpp__column_register(&perf_hpp__format[col]); } +void perf_hpp__column_disable(unsigned col) +{ + BUG_ON(col >= PERF_HPP__MAX_INDEX); + perf_hpp__column_unregister(&perf_hpp__format[col]); +} + +void perf_hpp__cancel_cumulate(void) +{ + perf_hpp__column_disable(PERF_HPP__OVERHEAD_ACC); + perf_hpp__format[PERF_HPP__OVERHEAD].header = hpp__header_overhead; +} + void perf_hpp__setup_output_field(void) { struct perf_hpp_fmt *fmt; |