aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/check-perf-trace.py
diff options
context:
space:
mode:
authorDavid Vernet <[email protected]>2022-11-22 08:52:59 -0600
committerAlexei Starovoitov <[email protected]>2022-11-23 17:45:23 -0800
commit3f0e6f2b41d35d4446160c745e8f09037447dd8f (patch)
treeb175c6182c6108a34cfe5d9eda1218fd17cd0151 /tools/perf/scripts/python/check-perf-trace.py
parent5bad3587b7a292148cea10185cd8770baaeb7445 (diff)
bpf: Add bpf_task_from_pid() kfunc
Callers can currently store tasks as kptrs using bpf_task_acquire(), bpf_task_kptr_get(), and bpf_task_release(). These are useful if a caller already has a struct task_struct *, but there may be some callers who only have a pid, and want to look up the associated struct task_struct * from that to e.g. find task->comm. This patch therefore adds a new bpf_task_from_pid() kfunc which allows BPF programs to get a struct task_struct * kptr from a pid. Signed-off-by: David Vernet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions