diff options
author | Namhyung Kim <[email protected]> | 2023-01-17 22:05:56 -0800 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2023-01-18 11:57:20 +0100 |
commit | bb447c27a4674628ea50341cfa4b31618f2010af (patch) | |
tree | d119eb43c79cc18fda7eeeec39dbd4697e3ab5e7 /scripts/gdb/linux/modules.py | |
parent | eb55b455ef9c7123bdfa7e8a7f1ebeaa8034eb83 (diff) |
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 <[email protected]>
Signed-off-by: Namhyung Kim <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Tested-by: Jiri Olsa <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions