[patch 6/9] perf: session: Move dump code to event delivery path
From: Thomas Gleixner
Date: Tue Dec 07 2010 - 07:51:00 EST
Preparatory patch for ordered perf report -D
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
tools/perf/util/session.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: linux-2.6-tip/tools/perf/util/session.c
===================================================================
--- linux-2.6-tip.orig/tools/perf/util/session.c
+++ linux-2.6-tip/tools/perf/util/session.c
@@ -702,10 +702,13 @@ static int perf_session_deliver_event(st
event_t *event,
struct sample_data *sample,
struct perf_event_ops *ops,
- u64 file_offset __used)
+ u64 file_offset)
{
+ dump_event(session, event, file_offset, sample);
+
switch (event->header.type) {
case PERF_RECORD_SAMPLE:
+ dump_sample(session, event, sample);
return ops->sample(event, sample, session);
case PERF_RECORD_MMAP:
return ops->mmap(event, sample, session);
@@ -747,10 +750,8 @@ static int perf_session__process_event(s
if (event->header.type >= PERF_RECORD_USER_TYPE_START)
dump_event(session, event, file_offset, NULL);
- else {
+ else
event__parse_sample(event, session, &sample);
- dump_event(session, event, file_offset, &sample);
- }
/* These events are processed right away */
switch (event->header.type) {
@@ -765,7 +766,6 @@ static int perf_session__process_event(s
return 0;
}
}
- dump_sample(session, event, &sample);
break;
case PERF_RECORD_HEADER_ATTR:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/