diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-01-18 10:24:14 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-02-03 12:24:12 -0300 |
commit | ebdd98e030f5ed6dd1bae9ab01b084f97685bd60 (patch) | |
tree | eab5959b7621c2a9ee98f21408734abc12a08c70 /tools/perf/ui/hist.c | |
parent | 94b3dc3865097e11073f1abf5b20b5f80af223af (diff) | |
download | op-kernel-dev-ebdd98e030f5ed6dd1bae9ab01b084f97685bd60.zip op-kernel-dev-ebdd98e030f5ed6dd1bae9ab01b084f97685bd60.tar.gz |
perf hists: Add perf_hpp_list register helpers
Adding 2 perf_hpp_list register helpers:
perf_hpp_list__column_register()
perf_hpp_list__register_sort_field()
to be called within existing helpers:
perf_hpp__column_register()
perf_hpp__register_sort_field()
to register format entries within global perf_hpp_list object.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1453109064-1026-17-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/hist.c')
-rw-r--r-- | tools/perf/ui/hist.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c index 74dbeac..1655c0d 100644 --- a/tools/perf/ui/hist.c +++ b/tools/perf/ui/hist.c @@ -505,19 +505,21 @@ void perf_hpp__init(void) hpp_dimension__add_output(PERF_HPP__PERIOD); } -void perf_hpp__column_register(struct perf_hpp_fmt *format) +void perf_hpp_list__column_register(struct perf_hpp_list *list, + struct perf_hpp_fmt *format) { - list_add_tail(&format->list, &perf_hpp_list.fields); + list_add_tail(&format->list, &list->fields); } -void perf_hpp__column_unregister(struct perf_hpp_fmt *format) +void perf_hpp_list__register_sort_field(struct perf_hpp_list *list, + struct perf_hpp_fmt *format) { - list_del(&format->list); + list_add_tail(&format->sort_list, &list->sorts); } -void perf_hpp__register_sort_field(struct perf_hpp_fmt *format) +void perf_hpp__column_unregister(struct perf_hpp_fmt *format) { - list_add_tail(&format->sort_list, &perf_hpp_list.sorts); + list_del(&format->list); } void perf_hpp__cancel_cumulate(void) |