diff options
author | Jiri Olsa <jolsa@kernel.org> | 2019-02-20 15:27:55 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-02-20 22:07:51 +0300 |
commit | 529c1a9e18c3b470d2eff7879923eda40b1431db (patch) | |
tree | 5137d628a7b12a4761bfb8693abf3059a62771e7 | |
parent | ff7a4f98d52cd3f13b1f4f6f22208498b0c113f7 (diff) | |
download | linux-529c1a9e18c3b470d2eff7879923eda40b1431db.tar.xz |
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: Jiri 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.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r-- | tools/perf/util/session.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 18fb9c8cbf9c..c764bbc91009 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1202,6 +1202,13 @@ static int deliver_sample_value(struct perf_evlist *evlist, 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); } |