Namhyung Kim 49c692b7df perf offcpu: Accept allowed sample types only
As offcpu-time event is synthesized at the end, it could not get the
all the sample info.  Define OFFCPU_SAMPLE_TYPES for allowed ones and
mask out others in evsel__config() to prevent parse errors.

Because perf sample parsing assumes a specific ordering with the
sample types, setting unsupported one would make it fail to read
data like perf record -d/--data.

Fixes: edc41a1099c2d08c ("perf record: Enable off-cpu analysis with BPF")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Blake Jones <blakejones@google.com>
Cc: Hao Luo <haoluo@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: bpf@vger.kernel.org
Link: http://lore.kernel.org/lkml/20220624231313.367909-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2022-06-28 11:45:45 -03:00
..
2022-01-12 17:01:38 -08:00
2019-02-19 16:11:56 -03:00
2022-02-14 16:47:13 -03:00
2022-01-12 14:28:23 -03:00
2021-09-03 08:15:10 -03:00
2021-04-29 10:30:58 -03:00
2022-05-23 10:11:39 -03:00
2022-05-23 10:11:39 -03:00
2021-08-11 09:35:44 -03:00
2021-08-11 09:35:44 -03:00
2022-01-12 14:28:23 -03:00
2022-01-12 14:28:23 -03:00
2022-05-23 10:18:38 -03:00
2022-04-11 16:37:26 -03:00
2021-11-07 12:27:38 -03:00
2021-02-03 13:10:44 -03:00
2021-07-15 17:30:22 -03:00
2022-05-23 10:18:38 -03:00
2022-05-23 10:18:38 -03:00
2022-02-14 16:56:32 -03:00
2022-02-11 14:05:49 -03:00
2021-11-07 12:27:38 -03:00
2022-05-23 10:18:38 -03:00
2019-01-25 15:12:09 +01:00
2020-10-14 13:34:26 -03:00
2021-02-17 15:15:06 -03:00
2021-02-17 15:15:06 -03:00
2020-04-18 09:05:01 -03:00
2020-04-18 09:05:01 -03:00
2022-02-15 17:15:29 -03:00