Skip to contentSkip to conversation

perf events: Default to using event__process_lost

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Nov 28, 2010 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  37982ba0a0630066a6a0844a66aedaf91c66db84
Gitweb:     http://git.kernel.org/tip/37982ba0a0630066a6a0844a66aedaf91c66db84
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Fri, 26 Nov 2010 18:31:54 -0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 26 Nov 2010 19:39:47 -0200

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.

Cc Frederic Weisbecker <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
CC Thomas Gleixner <[email protected]>
Cc Tom Zanussi <[email protected]>

LKML-Reference: <new-submission>

---
 tools/perf/util/session.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/session.c +1 -1
index fa9d652..3d56047 100644
@@ -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)