diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index a7aa771a98e6..56bbca5bc2dc 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1770,8 +1770,10 @@ static int trace__process_sample(struct perf_tool *tool, if (!trace->full_time && trace->base_time == 0) trace->base_time = sample->time; - if (handler) + if (handler) { + ++trace->nr_events; handler(trace, evsel, sample); + } return err; }