Skip to contentSkip to conversation

perf tools: Do not zero sample_id_all for group members

PATCH In review Jiri Olsa 3 participants 3 messages Sep 23, 2018 – Nov 6, 2018 perf events

lore
Share & tools
lore

Jiri Olsa

author reviewer
#0 lore raw

PATCH 1/1 perf tools: Do not zero sample_id_all for group members

Andi reported following malfunction:

  # perf record -e '{ref-cycles,cycles}:S' -a sleep 1
  # perf script
  non matching sample_id_all

That's because we disable sample_id_all bit for non-sampling group members. We can't do that, because it needs to be the same over the whole event list. This patch keeps it untouched again.

Fixes e9add8bac6c6 ("perf evsel: Disable write_backward for leader sampling group events")
---
 tools/perf/tests/attr/test-record-group-sampling | 1 -
 tools/perf/util/evsel.c                          | 1 -
 2 files changed, 2 deletions(-)
tools/perf/tests/attr/test-record-group-sampling +0 -1
index 8a33ca4f9e1f..f0729c454f16 100644
@@ -37,4 +37,3 @@ sample_freq=0
 sample_period=0
 freq=0
 write_backward=0
-sample_id_all=0
tools/perf/util/evsel.c +0 -1
index cb7f01059940..ff5313b70cb5 100644
@@ -952,7 +952,6 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
 		attr->sample_freq    = 0;
 		attr->sample_period  = 0;
 		attr->write_backward = 0;
-		attr->sample_id_all  = 0;
 	}
 
 	if (opts->no_samples)
Signature · 1 line
2.17.1
Tested-by on v1 1/1
#1 lore raw
Quoted 11 lines · Jiri Olsa

Andi reported following malfunction:

  # perf record -e '{ref-cycles,cycles}:S' -a sleep 1
  # perf script
  non matching sample_id_all

That's because we disable sample_id_all bit for non-sampling group members. We can't do that, because it needs to be the same over the whole event list. This patch keeps it untouched again.

Quoted 4 lines
Fixes e9add8bac6c6 ("perf evsel: Disable write_backward for leader sampling group events")

Should be also cc stable please

-Andi

#2 lore raw
In reply to Jiri Olsa
perf tools: Do not zero sample_id_all for group members
Commit-ID:  8e88c29b351ed4e09dd63f825f1c8260b0cb0ab3
Gitweb:     https://git.kernel.org/tip/8e88c29b351ed4e09dd63f825f1c8260b0cb0ab3
Author:     Jiri Olsa <[email protected]>
AuthorDate: Sun, 23 Sep 2018 17:04:20 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 6 Nov 2018 08:29:56 -0300

perf tools: Do not zero sample_id_all for group members

Andi reported following malfunction:

  # perf record -e '{ref-cycles,cycles}:S' -a sleep 1
  # perf script
  non matching sample_id_all

That's because we disable sample_id_all bit for non-sampling group members. We can't do that, because it needs to be the same over the whole event list. This patch keeps it untouched again.

Cc Alexander Shishkin <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
Fixes e9add8bac6c6 ("perf evsel: Disable write_backward for leader sampling group events")
---
 tools/perf/tests/attr/test-record-group-sampling | 1 -
 tools/perf/util/evsel.c                          | 1 -
 2 files changed, 2 deletions(-)
tools/perf/tests/attr/test-record-group-sampling +0 -1
index 8a33ca4f9e1f..f0729c454f16 100644
@@ -37,4 +37,3 @@ sample_freq=0
 sample_period=0
 freq=0
 write_backward=0
-sample_id_all=0
tools/perf/util/evsel.c +0 -1
index 6d187059a373..d37bb1566cd9 100644
@@ -956,7 +956,6 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
 		attr->sample_freq    = 0;
 		attr->sample_period  = 0;
 		attr->write_backward = 0;
-		attr->sample_id_all  = 0;
 	}
 
 	if (opts->no_samples)