Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1719384 > unrolled thread

[PATCH 04/10] perf record: Set read_format for inherit_stat

Started byJiri Olsa <jolsa@kernel.org>
First post2017-08-24 18:30 +0200
Last post2017-08-24 18:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 04/10] perf record: Set read_format for inherit_stat Jiri Olsa <jolsa@kernel.org> - 2017-08-24 18:30 +0200

#1719384 — [PATCH 04/10] perf record: Set read_format for inherit_stat

FromJiri Olsa <jolsa@kernel.org>
Date2017-08-24 18:30 +0200
Subject[PATCH 04/10] perf record: Set read_format for inherit_stat
Message-ID<ui3b3-tc-5@gated-at.bofh.it>
Set read_format for what we expect to get from read event
generated by perf_event_attr::inherit_stat.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/evsel.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index a5888c704e01..d9bd632ed7db 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -902,8 +902,13 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
 	if (opts->no_samples)
 		attr->sample_freq = 0;
 
-	if (opts->inherit_stat)
+	if (opts->inherit_stat) {
+		evsel->attr.read_format |=
+			PERF_FORMAT_TOTAL_TIME_ENABLED |
+			PERF_FORMAT_TOTAL_TIME_RUNNING |
+			PERF_FORMAT_ID;
 		attr->inherit_stat = 1;
+	}
 
 	if (opts->sample_address) {
 		perf_evsel__set_sample_bit(evsel, ADDR);
-- 
2.9.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web