From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 2/6] perf tools: Force sample_type for slave events
Date: Wed, 20 Feb 2019 13:27:56 +0100 [thread overview]
Message-ID: <20190220122800.864-3-jolsa@kernel.org> (raw)
In-Reply-To: <20190220122800.864-1-jolsa@kernel.org>
Forcing 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.
Link: http://lkml.kernel.org/n/tip-mqhyqhxm0p2jyzqjffwgbll0@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/util/evsel.c | 8 ++++++++
1 file changed, 8 insertions(+)
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)
--
2.17.2
next prev parent reply other threads:[~2019-02-20 12:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 12:27 [PATCH 0/6] perf tools: Assorted fixes Jiri Olsa
2019-02-20 12:27 ` [PATCH 1/6] perf tools: Don't report zero period samples for slave events Jiri Olsa
2019-02-28 7:44 ` [tip:perf/core] perf session: " tip-bot for Jiri Olsa
2019-02-20 12:27 ` Jiri Olsa [this message]
2019-02-28 7:45 ` [tip:perf/core] perf evsel: Force sample_type " tip-bot for Jiri Olsa
2019-02-20 12:27 ` [PATCH 3/6] perf script: Allow +- operator for type specific fields option Jiri Olsa
2019-02-28 7:45 ` [tip:perf/core] " tip-bot for Jiri Olsa
2019-02-20 12:27 ` [PATCH 4/6] perf tools: Add missing new line into pr_debug call Jiri Olsa
2019-02-20 19:23 ` Arnaldo Carvalho de Melo
2019-02-28 7:46 ` [tip:perf/core] perf bpf-event: " tip-bot for Jiri Olsa
2019-02-20 12:27 ` [PATCH 5/6] perf tools: Increase debug leve for cpu_map__snprint verbose output Jiri Olsa
2019-02-28 7:47 ` [tip:perf/core] perf cpumap: Increase debug level " tip-bot for Jiri Olsa
2019-02-20 12:28 ` [PATCH 6/6] perf tools: Make rm_rf to remove single file Jiri Olsa
2019-02-28 7:47 ` [tip:perf/core] perf tools: Make rm_rf() " tip-bot for Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190220122800.864-3-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).