From: Arnaldo Carvalho de Melo Date: Fri, 26 Nov 2010 20:31:54 +0000 (-0200) Subject: perf events: Default to using event__process_lost X-Git-Tag: MMI-PSA29.97-13-9~20972^2~104 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=37982ba0a0630066a6a0844a66aedaf91c66db84;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git perf events: Default to using event__process_lost Tool developers have to fill in a 'perf_event_ops' method table to specify how to handle each event, so far the ones that were not explicitely especified would get a stub that would just discard the event. Change that so that tool developers can get the lost event details and the total number of such events at the end of 'perf report -D' output. Suggested-by: Thomas Gleixner Cc: Frederic Weisbecker Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian CC: Thomas Gleixner Cc: Tom Zanussi LKML-Reference: Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index fa9d652c2dc3..3d5604739493 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -262,7 +262,7 @@ static void perf_event_ops__fill_defaults(struct perf_event_ops *handler) if (handler->exit == NULL) handler->exit = process_event_stub; if (handler->lost == NULL) - handler->lost = process_event_stub; + handler->lost = event__process_lost; if (handler->read == NULL) handler->read = process_event_stub; if (handler->throttle == NULL)