mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
f74725dcf2
commit
532e7269c0
|
@ -702,10 +702,13 @@ static int perf_session_deliver_event(struct perf_session *session,
|
||||||
event_t *event,
|
event_t *event,
|
||||||
struct sample_data *sample,
|
struct sample_data *sample,
|
||||||
struct perf_event_ops *ops,
|
struct perf_event_ops *ops,
|
||||||
u64 file_offset __used)
|
u64 file_offset)
|
||||||
{
|
{
|
||||||
|
dump_event(session, event, file_offset, sample);
|
||||||
|
|
||||||
switch (event->header.type) {
|
switch (event->header.type) {
|
||||||
case PERF_RECORD_SAMPLE:
|
case PERF_RECORD_SAMPLE:
|
||||||
|
dump_sample(session, event, sample);
|
||||||
return ops->sample(event, sample, session);
|
return ops->sample(event, sample, session);
|
||||||
case PERF_RECORD_MMAP:
|
case PERF_RECORD_MMAP:
|
||||||
return ops->mmap(event, sample, session);
|
return ops->mmap(event, sample, session);
|
||||||
|
@ -747,10 +750,8 @@ static int perf_session__process_event(struct perf_session *session,
|
||||||
|
|
||||||
if (event->header.type >= PERF_RECORD_USER_TYPE_START)
|
if (event->header.type >= PERF_RECORD_USER_TYPE_START)
|
||||||
dump_event(session, event, file_offset, NULL);
|
dump_event(session, event, file_offset, NULL);
|
||||||
else {
|
else
|
||||||
event__parse_sample(event, session, &sample);
|
event__parse_sample(event, session, &sample);
|
||||||
dump_event(session, event, file_offset, &sample);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* These events are processed right away */
|
/* These events are processed right away */
|
||||||
switch (event->header.type) {
|
switch (event->header.type) {
|
||||||
|
@ -765,7 +766,6 @@ static int perf_session__process_event(struct perf_session *session,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dump_sample(session, event, &sample);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PERF_RECORD_HEADER_ATTR:
|
case PERF_RECORD_HEADER_ATTR:
|
||||||
|
|
Loading…
Reference in New Issue