lkml.org 
[lkml]   [2013]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 14/19] perf sched: pass event to evsel handlers using data element
Date
Upcoming timehist command needs access to the event. Use the existing
handler.data element to do that.

Signed-off-by: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
---
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


\
 
 \ /
  Last update: 2013-08-08 08:01    [W:0.314 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site