aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-09-28 11:25:54 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2026-10-01 17:39:14 +0200
commit559e1b470d32751b08a6f986451448625d5af09f (patch)
tree11eb4289bc7544855210771c00ed6caee93fbd9a /scripts/Makefile.thinlto
parentperf thread_map: Add thread_map__tgid() (diff)
perf trace: Filter the target's tasks in BPF
The augmented syscalls BPF programs are attached to raw_syscalls system wide, so they run for every task. To make the bpf-output event system wide, and so augment the target's children, they need to know which tasks are the target's. Add a pids_to_trace map, seeded from the target's thread map, that sys_enter and sys_exit check, leaving other tasks' events alone. tp_btf programs add children on fork when inheriting, remove exited tasks and follow a thread that exec gives the leader's pid. Tasks that don't fit in the map, including when seeding, are counted and reported as lost. Other forks drop any entry for the child's pid, seeded for a task that had exited, such as a zombie. A workload waits for its exec, like enable_on_exec. When inheriting, unless given threads with -t, key the map by tgid, like off-cpu's task_filter, so a process's threads share its entry. New threads are then traced with their process, which is forgotten when its last thread exits, and exec keeps the key. The sched programs attach when the skeleton loads and the map is seeded before the events are opened, so the forks and exits that follow are seen. sys_enter and sys_exit now attach once the maps are populated, rather than at load where the empty prog arrays made them veto every raw_syscalls event. Reviewed-by: Namhyung Kim <namhyung@kernel.org> Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions