perf session: Export queue_event function
authorDavid Ahern <dsahern@gmail.com>
Tue, 6 Aug 2013 01:41:33 +0000 (21:41 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 7 Aug 2013 20:35:37 +0000 (17:35 -0300)
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: David Ahern <dsahern@gmail.com>
Reviewed-by: Xiao 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: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/session.c
tools/perf/util/session.h

index b5ebd4751a0407106f81c104f577c5e2c740afd9..dedaeb22b7b9e1e6f38525f2f588937984f9af18 100644 (file)
@@ -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,10 +1049,10 @@ 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,
-                               union perf_event *event,
-                               struct perf_tool *tool,
-                               u64 file_offset)
+static int perf_session__process_event(struct perf_session *session,
+                                      union perf_event *event,
+                                      struct perf_tool *tool,
+                                      u64 file_offset)
 {
        struct perf_sample sample;
        int ret;
index 9818fc25a62f15a90a7f38cdfe6328afa1396d6f..8bed17e64a967c6b2ebdd9cf26a9464402dd6786 100644 (file)
@@ -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);