summaryrefslogtreecommitdiff
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2016-01-18 10:24:17 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-02-03 12:24:14 -0300
commitcf094045d718437e3d5cd42ac09d77561cb2f368 (patch)
treef5c3749c3987a11ffa86591d525abc011a8c5f21 /tools/perf/util/hist.h
parent07600027fb7114bf7bcabdd121e5178f200d8a44 (diff)
perf hists: Introduce perf_hpp_list__for_each_format macro
Introducing perf_hpp_list__for_each_format macro to iterate perf_hpp_list object's output entries. 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-20-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/hist.h')
-rw-r--r--tools/perf/util/hist.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index a7769d778374..eadffca1a501 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -248,8 +248,8 @@ static inline void perf_hpp__register_sort_field(struct perf_hpp_fmt *format)
perf_hpp_list__register_sort_field(&perf_hpp_list, format);
}
-#define perf_hpp__for_each_format(format) \
- list_for_each_entry(format, &perf_hpp_list.fields, list)
+#define perf_hpp_list__for_each_format(_list, format) \
+ list_for_each_entry(format, &(_list)->fields, list)
#define perf_hpp__for_each_format_safe(format, tmp) \
list_for_each_entry_safe(format, tmp, &perf_hpp_list.fields, list)