aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/stdio/hist.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2016-01-18 10:24:23 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-02-03 12:24:19 -0300
commitf0786af536bb0ba54cb516eee493af03cefdbaa3 (patch)
treebf6fd743f830dcfbbf88c0995500cbce8e90fd08 /tools/perf/ui/stdio/hist.c
parentperf tools: Add hpp_list into struct hists object (diff)
downloadlinux-dev-f0786af536bb0ba54cb516eee493af03cefdbaa3.tar.xz
linux-dev-f0786af536bb0ba54cb516eee493af03cefdbaa3.zip
perf hists: Introduce hists__for_each_format macro
With the hist object having the perf_hpp_list we can now iterate output format entries based in the hists object. Adding hists__for_each_format macro to do that. 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-26-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/stdio/hist.c')
-rw-r--r--tools/perf/ui/stdio/hist.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
index 83e0bf2ab986..1a6e8f7f38c4 100644
--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -384,7 +384,7 @@ static int hist_entry__snprintf(struct hist_entry *he, struct perf_hpp *hpp)
if (symbol_conf.exclude_other && !he->parent)
return 0;
- perf_hpp_list__for_each_format(&perf_hpp_list, fmt) {
+ hists__for_each_format(he->hists, fmt) {
if (perf_hpp__should_skip(fmt, he->hists))
continue;
@@ -453,7 +453,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
init_rem_hits();
- perf_hpp_list__for_each_format(&perf_hpp_list, fmt)
+ hists__for_each_format(hists, fmt)
perf_hpp__reset_width(fmt, hists);
if (symbol_conf.col_width_list_str)
@@ -464,7 +464,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
fprintf(fp, "# ");
- perf_hpp_list__for_each_format(&perf_hpp_list, fmt) {
+ hists__for_each_format(hists, fmt) {
if (perf_hpp__should_skip(fmt, hists))
continue;
@@ -488,7 +488,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
fprintf(fp, "# ");
- perf_hpp_list__for_each_format(&perf_hpp_list, fmt) {
+ hists__for_each_format(hists, fmt) {
unsigned int i;
if (perf_hpp__should_skip(fmt, hists))