Commit 529c1a9e authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

perf session: Don't report zero period samples for slave events

There's no reason to deliver a sample with zero period.  It means there
was no value for slave event since its last group leader sample.
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190220122800.864-2-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent ff7a4f98
...@@ -1202,6 +1202,13 @@ static int deliver_sample_value(struct perf_evlist *evlist, ...@@ -1202,6 +1202,13 @@ static int deliver_sample_value(struct perf_evlist *evlist,
return 0; return 0;
} }
/*
* There's no reason to deliver sample
* for zero period, bail out.
*/
if (!sample->period)
return 0;
return tool->sample(tool, event, sample, sid->evsel, machine); return tool->sample(tool, event, sample, sid->evsel, machine);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment