mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-08 18:43:21 +01:00
perf evsel: Disable write_backward for leader sampling group events
.. and other related fields that do not need to be enabled
for events that have sampling leader.
It fixes the perf top usage Ingo reported broken:
# perf top -e '{cycles,msr/aperf/}:S'
The 'msr/aperf/' event is configured for write_back sampling, which is
not allowed by the MSR PMU, so it fails to create the event.
Adjusting related attr test.
Reported-by: Ingo Molnar <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Kan Liang <[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]>
This commit is contained in:
1 parent
9a4a931ce8
commit
e9add8bac6
2 files changed
+8
-2
No files matched your search
@@ -35,3 +35,6 @@ inherit=0
|
||||
# sampling disabled
|
||||
sample_freq=0
|
||||
sample_period=0
|
||||
freq=0
|
||||
write_backward=0
|
||||
sample_id_all=0
|
||||
@@ -930,8 +930,11 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
|
||||
* than leader in case leader 'leads' the sampling.
|
||||
*/
|
||||
if ((leader != evsel) && leader->sample_read) {
|
||||
attr->sample_freq = 0;
|
||||
attr->sample_period = 0;
|
||||
attr->freq = 0;
|
||||
attr->sample_freq = 0;
|
||||
attr->sample_period = 0;
|
||||
attr->write_backward = 0;
|
||||
attr->sample_id_all = 0;
|
||||
}
|
||||
|
||||
if (opts->no_samples)
|
||||
|
||||
Reference in new issue
Block a user