perf evsel: Disable write_backward for leader sampling group events
authorJiri Olsa <jolsa@kernel.org>
Mon, 23 Apr 2018 09:08:19 +0000 (11:08 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 23 Apr 2018 14:21:56 +0000 (11:21 -0300)
commite9add8bac6c69edb4bf391e537faa659b2ed70d2
tree9ea7858fa103f9fc527e58ed672f80c6d89393f5
parent9a4a931ce847f4aaa12edf11b2e050e18bf45910
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 <mingo@kernel.org>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180423090823.32309-6-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/attr/test-record-group-sampling
tools/perf/util/evsel.c