From 94a0793ddf7fa9890006a8dc203b985e7b120785 Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Mon, 10 Mar 2014 16:43:52 +0900 Subject: perf ui hists: Pass evsel to hpp->header/width functions explicitly Those functions need evsel to investigate event group and it's passed via hpp->ptr. However as it can be missed easily so it's better to pass it via an argument IMHO. Signed-off-by: Namhyung Kim Cc: Andi Kleen Cc: David Ahern Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1394437440-11609-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/hist.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools/perf/util/hist.h') diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index 9e1cada..0c76bf9 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h @@ -132,8 +132,10 @@ struct perf_hpp { }; struct perf_hpp_fmt { - int (*header)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp); - int (*width)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp); + int (*header)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, + struct perf_evsel *evsel); + int (*width)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, + struct perf_evsel *evsel); int (*color)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, struct hist_entry *he); int (*entry)(struct perf_hpp_fmt *fmt, struct perf_hpp *hpp, -- cgit v1.1