aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-01-04 13:25:15 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-05 11:53:10 -0500
commit1109599458c06256064213dc44ca5f5fa8ee3833 (patch)
treeedfbdac93a698cfbb36f7ac901d0a7e378a6de46
parentd030260ad33b482a371f999c7e9db79ef7a2111f (diff)
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: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/session.c57
1 files changed, 31 insertions, 26 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index b163dfd6cbc5..6fb4694d05fa 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -838,6 +838,35 @@ static struct thread *perf_session__register_idle_thread(struct perf_session *se
838 return thread; 838 return thread;
839} 839}
840 840
841static void perf_session__warn_about_errors(const struct perf_session *session,
842 const struct perf_event_ops *ops)
843{
844 if (ops->lost == event__process_lost &&
845 session->hists.stats.total_lost != 0) {
846 ui__warning("Processed %Lu events and LOST %Lu!\n\n"
847 "Check IO/CPU overload!\n\n",
848 session->hists.stats.total_period,
849 session->hists.stats.total_lost);
850 }
851
852 if (session->hists.stats.nr_unknown_events != 0) {
853 ui__warning("Found %u unknown events!\n\n"
854 "Is this an older tool processing a perf.data "
855 "file generated by a more recent tool?\n\n"
856 "If that is not the case, consider "
857 "reporting to linux-kernel@vger.kernel.org.\n\n",
858 session->hists.stats.nr_unknown_events);
859 }
860
861 if (session->hists.stats.nr_invalid_chains != 0) {
862 ui__warning("Found invalid callchains!\n\n"
863 "%u out of %u events were discarded for this reason.\n\n"
864 "Consider reporting to linux-kernel@vger.kernel.org.\n\n",
865 session->hists.stats.nr_invalid_chains,
866 session->hists.stats.nr_events[PERF_RECORD_SAMPLE]);
867 }
868}
869
841#define session_done() (*(volatile int *)(&session_done)) 870#define session_done() (*(volatile int *)(&session_done))
842volatile int session_done; 871volatile int session_done;
843 872
@@ -911,6 +940,7 @@ more:
911done: 940done:
912 err = 0; 941 err = 0;
913out_err: 942out_err:
943 perf_session__warn_about_errors(self, ops);
914 perf_session_free_sample_buffers(self); 944 perf_session_free_sample_buffers(self);
915 return err; 945 return err;
916} 946}
@@ -1023,32 +1053,7 @@ more:
1023 flush_sample_queue(session, ops); 1053 flush_sample_queue(session, ops);
1024out_err: 1054out_err:
1025 ui_progress__delete(progress); 1055 ui_progress__delete(progress);
1026 1056 perf_session__warn_about_errors(session, ops);
1027 if (ops->lost == event__process_lost &&
1028 session->hists.stats.total_lost != 0) {
1029 ui__warning("Processed %Lu events and LOST %Lu!\n\n"
1030 "Check IO/CPU overload!\n\n",
1031 session->hists.stats.total_period,
1032 session->hists.stats.total_lost);
1033 }
1034
1035 if (session->hists.stats.nr_unknown_events != 0) {
1036 ui__warning("Found %u unknown events!\n\n"
1037 "Is this an older tool processing a perf.data "
1038 "file generated by a more recent tool?\n\n"
1039 "If that is not the case, consider "
1040 "reporting to linux-kernel@vger.kernel.org.\n\n",
1041 session->hists.stats.nr_unknown_events);
1042 }
1043
1044 if (session->hists.stats.nr_invalid_chains != 0) {
1045 ui__warning("Found invalid callchains!\n\n"
1046 "%u out of %u events were discarded for this reason.\n\n"
1047 "Consider reporting to linux-kernel@vger.kernel.org.\n\n",
1048 session->hists.stats.nr_invalid_chains,
1049 session->hists.stats.nr_events[PERF_RECORD_SAMPLE]);
1050 }
1051
1052 perf_session_free_sample_buffers(session); 1057 perf_session_free_sample_buffers(session);
1053 return err; 1058 return err;
1054} 1059}