aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-11-26 23:41:01 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-11-26 23:41:01 -0500
commit068ffaa8bfb67c2ddb3ecaf38cc90f94a1a92fe3 (patch)
tree7e57995a5a2844f9a2d33859216b5f4b55e47f14 /tools/perf/util/session.c
parent008f29d3865828bb27e35d6d3fa889d0853b469f (diff)
perf tools: Fix lost and unknown events handling
Fix it by explaining what can be happening and giving the number of processed and lost events. Also holler if unknown events were found, that can be due to processing a perf.data file collected using a newer tool where newer events got added on reporting using an older perf tool, that or a bug, so ask for a report to be made. Works on both --tui and --stdio. Suggested-by: Thomas Gleixner <tglx@linutronix.de> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r--tools/perf/util/session.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 3d5604739493..3ae69550fa0b 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -852,6 +852,24 @@ done:
852 flush_sample_queue(self, ops); 852 flush_sample_queue(self, ops);
853out_err: 853out_err:
854 ui_progress__delete(progress); 854 ui_progress__delete(progress);
855
856 if (ops->lost == event__process_lost &&
857 self->hists.stats.total_lost != 0) {
858 ui__warning("Processed %Lu events and LOST %Lu!\n\n"
859 "Check IO/CPU overload!\n\n",
860 self->hists.stats.total_period,
861 self->hists.stats.total_lost);
862 }
863
864 if (self->hists.stats.nr_unknown_events != 0) {
865 ui__warning("Found %u unknown events!\n\n"
866 "Is this an older tool processing a perf.data "
867 "file generated by a more recent tool?\n\n"
868 "If that is not the case, consider "
869 "reporting to linux-kernel@vger.kernel.org.\n\n",
870 self->hists.stats.nr_unknown_events);
871 }
872
855 return err; 873 return err;
856} 874}
857 875