aboutsummaryrefslogtreecommitdiff
path: root/include/linux/overflow.h
diff options
context:
space:
mode:
authorSong Liu <[email protected]>2020-06-29 23:28:44 -0700
committerAlexei Starovoitov <[email protected]>2020-07-01 08:23:19 -0700
commitfa28dcb82a38f8e3993b0fae9106b1a80b59e4f0 (patch)
treedf5f451d9328757debc8dd7b81a5e34149577f90 /include/linux/overflow.h
parentd141b8bc5773cbbaf5b8530f08f94fc10fff9e8c (diff)
bpf: Introduce helper bpf_get_task_stack()
Introduce helper bpf_get_task_stack(), which dumps stack trace of given task. This is different to bpf_get_stack(), which gets stack track of current task. One potential use case of bpf_get_task_stack() is to call it from bpf_iter__task and dump all /proc/<pid>/stack to a seq_file. bpf_get_task_stack() uses stack_trace_save_tsk() instead of get_perf_callchain() for kernel stack. The benefit of this choice is that stack_trace_save_tsk() doesn't require changes in arch/. The downside of using stack_trace_save_tsk() is that stack_trace_save_tsk() dumps the stack trace to unsigned long array. For 32-bit systems, we need to translate it to u64 array. Signed-off-by: Song Liu <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'include/linux/overflow.h')
0 files changed, 0 insertions, 0 deletions