Skip to contentSkip to conversation

perf events: Account PERF_RECORD_LOST events in event__process

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Jan 31, 2011 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  ef2bf6d043ac9bd4a6f38d862af407154a4754d9
Gitweb:     http://git.kernel.org/tip/ef2bf6d043ac9bd4a6f38d862af407154a4754d9
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Sat, 29 Jan 2011 09:04:40 -0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Sat, 29 Jan 2011 16:24:24 -0200

perf events: Account PERF_RECORD_LOST events in event__process

Right now this function is only used by perf top, that uses PROT_READ only, i.e. overwrite mode, so no PERF_RECORD_LOST events are generated, but don't forget those events.

The patch that moved this out of perf top was made so that this routine could be used by 'perf probe' in the uprobes patchset, so perhaps there they need to check for LOST events and warn the user, as will be done in the following patches that will switch 'perf top' to non overwrite mode (mmap with PROT_READ|PROT_WRITE).

Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Srikar Dronamraju <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Tom Zanussi <[email protected]>
LKML-Reference: <new-submission>

---
 tools/perf/util/event.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
tools/perf/util/event.c +2 -0
index e4db8b8..b9d4ac8 100644
@@ -646,6 +646,8 @@ int event__process(event_t *event, struct sample_data *sample,
 	case PERF_RECORD_EXIT:
 		event__process_task(event, sample, session);
 		break;
+	case PERF_RECORD_LOST:
+		event__process_lost(event, sample, session);
 	default:
 		break;
 	}