aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/hist.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2016-01-18 10:24:18 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-02-03 12:24:14 -0300
commit7a1799e0a276069d8b903ba17179b4983b98c04b (patch)
treea903c79b54f8d2104d5b401e6ff0f3159590d989 /tools/perf/util/hist.h
parentperf hists: Introduce perf_hpp_list__for_each_format macro (diff)
downloadlinux-dev-7a1799e0a276069d8b903ba17179b4983b98c04b.tar.xz
linux-dev-7a1799e0a276069d8b903ba17179b4983b98c04b.zip
perf hists: Introduce perf_hpp_list__for_each_format_safe macro
Introducing perf_hpp_list__for_each_format_safe macro to iterate perf_hpp_list object's output entries safely. 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-21-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 eadffca1a501..f5b2309de16e 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -251,8 +251,8 @@ static inline void perf_hpp__register_sort_field(struct perf_hpp_fmt *format)
#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)
+#define perf_hpp_list__for_each_format_safe(_list, format, tmp) \
+ list_for_each_entry_safe(format, tmp, &(_list)->fields, list)
#define perf_hpp__for_each_sort_list(format) \
list_for_each_entry(format, &perf_hpp_list.sorts, sort_list)