summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2023-01-18 09:05:56 +0300
committerIngo Molnar <mingo@kernel.org>2023-01-18 13:57:20 +0300
commitbb447c27a4674628ea50341cfa4b31618f2010af (patch)
treed119eb43c79cc18fda7eeeec39dbd4697e3ab5e7 /tools/perf/scripts/python/export-to-sqlite.py
parenteb55b455ef9c7123bdfa7e8a7f1ebeaa8034eb83 (diff)
downloadlinux-bb447c27a4674628ea50341cfa4b31618f2010af.tar.xz
perf/core: Set data->sample_flags in perf_prepare_sample()
The perf_prepare_sample() function sets the perf_sample_data according to the attr->sample_type before copying it to the ring buffer. But BPF also wants to access the sample data so it needs to prepare the sample even before the regular path. That means perf_prepare_sample() can be called more than once. Set the data->sample_flags consistently so that it can indicate which fields are set already and skip them if sets. Also update the filtered_sample_type to have the dependent flags to reduce the number of branches. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Tested-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20230118060559.615653-6-namhyung@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions