aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2024-08-29 10:42:30 -0700
committerAlexei Starovoitov <[email protected]>2024-09-11 09:58:31 -0700
commit4f4c4fc0153fb11ac40b16c24a24543dc9689d8c (patch)
treed688b45a81dc448c74453fc2a16eaacf4c5047e1 /scripts/gdb/linux/tasks.py
parentcdbb44f9a74fe7d01090ae492672e89cf7d83ce5 (diff)
bpf: decouple stack_map_get_build_id_offset() from perf_callchain_entry
Change stack_map_get_build_id_offset() which is used to convert stack trace IP addresses into build ID+offset pairs. Right now this function accepts an array of u64s as an input, and uses array of struct bpf_stack_build_id as an output. This is problematic because u64 array is coming from perf_callchain_entry, which is (non-sleepable) RCU protected, so once we allows sleepable build ID fetching, this all breaks down. But its actually pretty easy to make stack_map_get_build_id_offset() works with array of struct bpf_stack_build_id as both input and output. Which is what this patch is doing, eliminating the dependency on perf_callchain_entry. We require caller to fill out bpf_stack_build_id.ip fields (all other can be left uninitialized), and update in place as we do build ID resolution. We make sure to READ_ONCE() and cache locally current IP value as we used it in a few places to find matching VMA and so on. Given this data is directly accessible and modifiable by user's BPF code, we should make sure to have a consistent view of it. Reviewed-by: Eduard Zingerman <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions