Commit 79a30fe4 authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf tools: Make perf_session__deliver_event global

Making perf_session__deliver_event global function, as it will be called
from another object in following patch.
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-rz7s2b8uwv567bigckh75gvk@git.kernel.org
[ Fixup naming to match class__method schema, as now is more widely exposed ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d40b4a15
...@@ -571,12 +571,6 @@ ordered_events__delete(struct ordered_events *oe, struct ordered_event *event) ...@@ -571,12 +571,6 @@ ordered_events__delete(struct ordered_events *oe, struct ordered_event *event)
oe->nr_events--; oe->nr_events--;
} }
static int perf_session_deliver_event(struct perf_session *session,
union perf_event *event,
struct perf_sample *sample,
struct perf_tool *tool,
u64 file_offset);
static int __ordered_events__flush(struct perf_session *s, static int __ordered_events__flush(struct perf_session *s,
struct perf_tool *tool) struct perf_tool *tool)
{ {
...@@ -607,7 +601,7 @@ static int __ordered_events__flush(struct perf_session *s, ...@@ -607,7 +601,7 @@ static int __ordered_events__flush(struct perf_session *s,
if (ret) if (ret)
pr_err("Can't parse sample, err = %d\n", ret); pr_err("Can't parse sample, err = %d\n", ret);
else { else {
ret = perf_session_deliver_event(s, iter->event, &sample, tool, ret = perf_session__deliver_event(s, iter->event, &sample, tool,
iter->file_offset); iter->file_offset);
if (ret) if (ret)
return ret; return ret;
...@@ -1003,11 +997,10 @@ perf_session__deliver_sample(struct perf_session *session, ...@@ -1003,11 +997,10 @@ perf_session__deliver_sample(struct perf_session *session,
&sample->read.one, machine); &sample->read.one, machine);
} }
static int perf_session_deliver_event(struct perf_session *session, int perf_session__deliver_event(struct perf_session *session,
union perf_event *event, union perf_event *event,
struct perf_sample *sample, struct perf_sample *sample,
struct perf_tool *tool, struct perf_tool *tool, u64 file_offset)
u64 file_offset)
{ {
struct perf_evsel *evsel; struct perf_evsel *evsel;
struct machine *machine; struct machine *machine;
...@@ -1152,7 +1145,7 @@ static s64 perf_session__process_event(struct perf_session *session, ...@@ -1152,7 +1145,7 @@ static s64 perf_session__process_event(struct perf_session *session,
return ret; return ret;
} }
return perf_session_deliver_event(session, event, &sample, tool, return perf_session__deliver_event(session, event, &sample, tool,
file_offset); file_offset);
} }
......
...@@ -72,6 +72,11 @@ int perf_session_queue_event(struct perf_session *s, union perf_event *event, ...@@ -72,6 +72,11 @@ int perf_session_queue_event(struct perf_session *s, union perf_event *event,
void perf_tool__fill_defaults(struct perf_tool *tool); void perf_tool__fill_defaults(struct perf_tool *tool);
int perf_session__deliver_event(struct perf_session *session,
union perf_event *event,
struct perf_sample *sample,
struct perf_tool *tool, u64 file_offset);
int perf_session__resolve_callchain(struct perf_session *session, int perf_session__resolve_callchain(struct perf_session *session,
struct perf_evsel *evsel, struct perf_evsel *evsel,
struct thread *thread, struct thread *thread,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment