perf script: Use the default lost event handler
Commit-ID: 6d8afb56300c53a250c6de0f973ef502e54aabf3 Gitweb: http://git.kernel.org/tip/6d8afb56300c53a250c6de0f973ef502e54aabf3 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Tue, 4 Jan 2011 16:27:30 -0200 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 5 Jan 2011 14:53:43 -0200
perf script: Use the default lost event handler
That already does what was being done here. The warning is now unconditionally given by __perf_session__process_pipe_events, just like for non pipe processing.
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: Stephane Eranian <[email protected]>
Cc: Tom Zanussi <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/builtin-script.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-)
tools/perf/builtin-script.c +1 -14
@@ -99,16 +99,6 @@ static int process_sample_event(event_t *event, struct sample_data *sample,return 0 ; } -static u64 nr_lost; - -static int process_lost_event (event_t *event,struct sample_data *sample__used , -struct perf_session *session__used ) -{ - nr_lost += event->lost.lost; - -return 0 ; -} -static struct perf_event_ops event_ops = { .sample = process_sample_event, .comm = event__process_comm,
@@ -116,7 +106,6 @@ static struct perf_event_ops event_ops = { .event_type = event__process_event_type, .tracing_data = event__process_tracing_data, .build_id = event__process_build_id, - .lost = process_lost_event, .ordering_requires_timestamps = true, .ordered_samples = true, };
@@ -136,10 +125,8 @@ static int __cmd_script(struct perf_session *session) ret =perf_session__process_events (session, &event_ops); -if (debug_mode) { +if (debug_mode)pr_err ("Misordered timestamps: %llu\n" , nr_unordered); -pr_err ("Lost events: %llu\n" , nr_lost); - }return ret; }