perf session: Warn about errors when processing pipe events too

Just like we do at __perf_session__process_events

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent d030260a
...@@ -838,6 +838,35 @@ static struct thread *perf_session__register_idle_thread(struct perf_session *se ...@@ -838,6 +838,35 @@ static struct thread *perf_session__register_idle_thread(struct perf_session *se
return thread; return thread;
} }
static void perf_session__warn_about_errors(const struct perf_session *session,
const struct perf_event_ops *ops)
{
if (ops->lost == event__process_lost &&
session->hists.stats.total_lost != 0) {
ui__warning("Processed %Lu events and LOST %Lu!\n\n"
"Check IO/CPU overload!\n\n",
session->hists.stats.total_period,
session->hists.stats.total_lost);
}
if (session->hists.stats.nr_unknown_events != 0) {
ui__warning("Found %u unknown events!\n\n"
"Is this an older tool processing a perf.data "
"file generated by a more recent tool?\n\n"
"If that is not the case, consider "
"reporting to linux-kernel@vger.kernel.org.\n\n",
session->hists.stats.nr_unknown_events);
}
if (session->hists.stats.nr_invalid_chains != 0) {
ui__warning("Found invalid callchains!\n\n"
"%u out of %u events were discarded for this reason.\n\n"
"Consider reporting to linux-kernel@vger.kernel.org.\n\n",
session->hists.stats.nr_invalid_chains,
session->hists.stats.nr_events[PERF_RECORD_SAMPLE]);
}
}
#define session_done() (*(volatile int *)(&session_done)) #define session_done() (*(volatile int *)(&session_done))
volatile int session_done; volatile int session_done;
...@@ -911,6 +940,7 @@ static int __perf_session__process_pipe_events(struct perf_session *self, ...@@ -911,6 +940,7 @@ static int __perf_session__process_pipe_events(struct perf_session *self,
done: done:
err = 0; err = 0;
out_err: out_err:
perf_session__warn_about_errors(self, ops);
perf_session_free_sample_buffers(self); perf_session_free_sample_buffers(self);
return err; return err;
} }
...@@ -1023,32 +1053,7 @@ int __perf_session__process_events(struct perf_session *session, ...@@ -1023,32 +1053,7 @@ int __perf_session__process_events(struct perf_session *session,
flush_sample_queue(session, ops); flush_sample_queue(session, ops);
out_err: out_err:
ui_progress__delete(progress); ui_progress__delete(progress);
perf_session__warn_about_errors(session, ops);
if (ops->lost == event__process_lost &&
session->hists.stats.total_lost != 0) {
ui__warning("Processed %Lu events and LOST %Lu!\n\n"
"Check IO/CPU overload!\n\n",
session->hists.stats.total_period,
session->hists.stats.total_lost);
}
if (session->hists.stats.nr_unknown_events != 0) {
ui__warning("Found %u unknown events!\n\n"
"Is this an older tool processing a perf.data "
"file generated by a more recent tool?\n\n"
"If that is not the case, consider "
"reporting to linux-kernel@vger.kernel.org.\n\n",
session->hists.stats.nr_unknown_events);
}
if (session->hists.stats.nr_invalid_chains != 0) {
ui__warning("Found invalid callchains!\n\n"
"%u out of %u events were discarded for this reason.\n\n"
"Consider reporting to linux-kernel@vger.kernel.org.\n\n",
session->hists.stats.nr_invalid_chains,
session->hists.stats.nr_events[PERF_RECORD_SAMPLE]);
}
perf_session_free_sample_buffers(session); perf_session_free_sample_buffers(session);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment