diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-12-07 07:48:55 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-12-09 09:10:53 -0500 |
commit | 532e7269c01098f0be6e08113c6947ec6ed11bfa (patch) | |
tree | 3707b1041985a928fcb1c53356f0fd9ba18edcf6 /tools | |
parent | f74725dcf2f6931c26bc65e77e34e693eeb8441c (diff) |
perf session: Move dump code to event delivery path
Preparatory patch for ordered perf report -D
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ian Munsie <imunsie@au1.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <20101207124550.918655066@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/session.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index d43e56cd6f28..7c5cc129207a 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -702,10 +702,13 @@ static int perf_session_deliver_event(struct perf_session *session, | |||
702 | event_t *event, | 702 | event_t *event, |
703 | struct sample_data *sample, | 703 | struct sample_data *sample, |
704 | struct perf_event_ops *ops, | 704 | struct perf_event_ops *ops, |
705 | u64 file_offset __used) | 705 | u64 file_offset) |
706 | { | 706 | { |
707 | dump_event(session, event, file_offset, sample); | ||
708 | |||
707 | switch (event->header.type) { | 709 | switch (event->header.type) { |
708 | case PERF_RECORD_SAMPLE: | 710 | case PERF_RECORD_SAMPLE: |
711 | dump_sample(session, event, sample); | ||
709 | return ops->sample(event, sample, session); | 712 | return ops->sample(event, sample, session); |
710 | case PERF_RECORD_MMAP: | 713 | case PERF_RECORD_MMAP: |
711 | return ops->mmap(event, sample, session); | 714 | return ops->mmap(event, sample, session); |
@@ -747,10 +750,8 @@ static int perf_session__process_event(struct perf_session *session, | |||
747 | 750 | ||
748 | if (event->header.type >= PERF_RECORD_USER_TYPE_START) | 751 | if (event->header.type >= PERF_RECORD_USER_TYPE_START) |
749 | dump_event(session, event, file_offset, NULL); | 752 | dump_event(session, event, file_offset, NULL); |
750 | else { | 753 | else |
751 | event__parse_sample(event, session, &sample); | 754 | event__parse_sample(event, session, &sample); |
752 | dump_event(session, event, file_offset, &sample); | ||
753 | } | ||
754 | 755 | ||
755 | /* These events are processed right away */ | 756 | /* These events are processed right away */ |
756 | switch (event->header.type) { | 757 | switch (event->header.type) { |
@@ -765,7 +766,6 @@ static int perf_session__process_event(struct perf_session *session, | |||
765 | return 0; | 766 | return 0; |
766 | } | 767 | } |
767 | } | 768 | } |
768 | dump_sample(session, event, &sample); | ||
769 | break; | 769 | break; |
770 | 770 | ||
771 | case PERF_RECORD_HEADER_ATTR: | 771 | case PERF_RECORD_HEADER_ATTR: |