linux-yocto/tools/perf/tests/attr/test-record-group-sampling
James Clark e28039667c perf test: Fix attr tests for PERF_FORMAT_LOST
Since PERF_FORMAT_LOST was added, the default read format has that bit
set, so add it to the tests. Keep the old value as well so that the test
still passes on older kernels.

This fixes the following failure:

  expected read_format=0|4, got 20
  FAILED './tests/attr/test-record-C0' - match failure

Fixes: 85b425f31c8866e0 ("perf record: Set PERF_FORMAT_LOST by default")
Signed-off-by: James Clark <james.clark@arm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20221012094633.21669-2-james.clark@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-10-15 10:13:16 -03:00

566 B

[config] command = record args = --no-bpf-event -e '{cycles,cache-misses}:S' kill >/dev/null 2>&1 ret = 1

[event-1:base-record] fd=1 group_fd=-1 sample_type=343 read_format=12|28 inherit=0

[event-2:base-record] fd=2 group_fd=1

cache-misses

type=0 config=3

default | PERF_SAMPLE_READ

sample_type=343

PERF_FORMAT_ID | PERF_FORMAT_GROUP | PERF_FORMAT_LOST

read_format=12|28 task=0 mmap=0 comm=0 enable_on_exec=0 disabled=0

inherit is disabled for group sampling

inherit=0

sampling disabled

sample_freq=0 sample_period=0 freq=0 write_backward=0