aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Olsa <[email protected]>2019-02-20 13:27:56 +0100
committerArnaldo Carvalho de Melo <[email protected]>2019-02-20 16:08:59 -0300
commit6e7e8b9fec45f7bef11a5d9d2dd9febe439d4047 (patch)
treedf4461ae6ce64070b505c830cbf48ab0f8abf8f1
parent529c1a9e18c3b470d2eff7879923eda40b1431db (diff)
perf evsel: Force sample_type for slave events
Force sample_type setup for slave events in group leader sessions. We don't get sample for slave events, we make them when delivering group leader sample. Set the slave event to follow the master sample_type to ease up report. Signed-off-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/evsel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 684c893ca6bc..dfe2958e6287 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -956,6 +956,14 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
attr->sample_freq = 0;
attr->sample_period = 0;
attr->write_backward = 0;
+
+ /*
+ * We don't get sample for slave events, we make them
+ * when delivering group leader sample. Set the slave
+ * event to follow the master sample_type to ease up
+ * report.
+ */
+ attr->sample_type = leader->attr.sample_type;
}
if (opts->no_samples)