summaryrefslogtreecommitdiff
path: root/tools/perf/ui
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2016-01-18 12:24:14 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-02-03 18:24:12 +0300
commitebdd98e030f5ed6dd1bae9ab01b084f97685bd60 (patch)
treeeab5959b7621c2a9ee98f21408734abc12a08c70 /tools/perf/ui
parent94b3dc3865097e11073f1abf5b20b5f80af223af (diff)
downloadlinux-ebdd98e030f5ed6dd1bae9ab01b084f97685bd60.tar.xz
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')
-rw-r--r--tools/perf/ui/hist.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/perf/ui/hist.c b/tools/perf/ui/hist.c
index 74dbeac4753b..1655c0d9c089 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)