aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-01-04 13:27:30 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-05 11:53:43 -0500
commit6d8afb56300c53a250c6de0f973ef502e54aabf3 (patch)
treed184ba187d150ac84f53190b44be021b92e38829
parent1109599458c06256064213dc44ca5f5fa8ee3833 (diff)
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 <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/builtin-script.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 43480fd66db7..27d568daac77 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -99,16 +99,6 @@ static int process_sample_event(event_t *event, struct sample_data *sample,
99 return 0; 99 return 0;
100} 100}
101 101
102static u64 nr_lost;
103
104static int process_lost_event(event_t *event, struct sample_data *sample __used,
105 struct perf_session *session __used)
106{
107 nr_lost += event->lost.lost;
108
109 return 0;
110}
111
112static struct perf_event_ops event_ops = { 102static struct perf_event_ops event_ops = {
113 .sample = process_sample_event, 103 .sample = process_sample_event,
114 .comm = event__process_comm, 104 .comm = event__process_comm,
@@ -116,7 +106,6 @@ static struct perf_event_ops event_ops = {
116 .event_type = event__process_event_type, 106 .event_type = event__process_event_type,
117 .tracing_data = event__process_tracing_data, 107 .tracing_data = event__process_tracing_data,
118 .build_id = event__process_build_id, 108 .build_id = event__process_build_id,
119 .lost = process_lost_event,
120 .ordering_requires_timestamps = true, 109 .ordering_requires_timestamps = true,
121 .ordered_samples = true, 110 .ordered_samples = true,
122}; 111};
@@ -136,10 +125,8 @@ static int __cmd_script(struct perf_session *session)
136 125
137 ret = perf_session__process_events(session, &event_ops); 126 ret = perf_session__process_events(session, &event_ops);
138 127
139 if (debug_mode) { 128 if (debug_mode)
140 pr_err("Misordered timestamps: %llu\n", nr_unordered); 129 pr_err("Misordered timestamps: %llu\n", nr_unordered);
141 pr_err("Lost events: %llu\n", nr_lost);
142 }
143 130
144 return ret; 131 return ret;
145} 132}