Upcoming timehist command needs access to the event. Use the existing
handler.data element to do that.

Signed-off-by: David Ahern <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
---
 tools/perf/builtin-sched.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index f809cc7..1ec1ff4 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1415,7 +1415,7 @@ typedef int (*tracepoint_handler)(struct perf_tool *tool,
                                  struct machine *machine);
 
 static int perf_sched__process_tracepoint_sample(struct perf_tool *tool 
__maybe_unused,
-                                                union perf_event *event 
__maybe_unused,
+                                                union perf_event *event,
                                                 struct perf_sample *sample,
                                                 struct perf_evsel *evsel,
                                                 struct machine *machine)
@@ -1427,6 +1427,7 @@ static int perf_sched__process_tracepoint_sample(struct 
perf_tool *tool __maybe_
 
        if (evsel->handler.func != NULL) {
                tracepoint_handler f = evsel->handler.func;
+               evsel->handler.data = event;
                err = f(tool, evsel, sample, machine);
        }
 
-- 
1.7.10.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to