Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e30b88a7 authored by David Ahern's avatar David Ahern Committed by Arnaldo Carvalho de Melo
Browse files

perf session: Export queue_event function



Taking a lesson from perf-trace and bringing in control of event
processing to perf-kvm-stat-live: parse the sample to get access the
time leaving just the need to queue it to the ordered samples list.  For
that the queue_event function needs to be exported.

Unexport perf_session__process_event.

Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Reviewed-by: default avatarXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Runzhen Wang <runzhen@linux.vnet.ibm.com>
Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1375753297-69645-2-git-send-email-dsahern@gmail.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e6f65388
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -643,7 +643,7 @@ static void __queue_event(struct sample_queue *new, struct perf_session *s)

#define MAX_SAMPLE_BUFFER	(64 * 1024 / sizeof(struct sample_queue))

static int perf_session_queue_event(struct perf_session *s, union perf_event *event,
int perf_session_queue_event(struct perf_session *s, union perf_event *event,
				    struct perf_sample *sample, u64 file_offset)
{
	struct ordered_samples *os = &s->ordered_samples;
@@ -1049,7 +1049,7 @@ static void event_swap(union perf_event *event, bool sample_id_all)
		swap(event, sample_id_all);
}

int perf_session__process_event(struct perf_session *session,
static int perf_session__process_event(struct perf_session *session,
				       union perf_event *event,
				       struct perf_tool *tool,
				       u64 file_offset)
+2 −4
Original line number Diff line number Diff line
@@ -56,10 +56,8 @@ int __perf_session__process_events(struct perf_session *self,
int perf_session__process_events(struct perf_session *self,
				 struct perf_tool *tool);

int perf_session__process_event(struct perf_session *session,
				union perf_event *event,
				struct perf_tool *tool,
				u64 file_offset);
int perf_session_queue_event(struct perf_session *s, union perf_event *event,
			     struct perf_sample *sample, u64 file_offset);

void perf_tool__fill_defaults(struct perf_tool *tool);