You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
below/src/bpf/exitstat.bpf.c
Comment show that code logic will check tas->signal.live as last thread, but I never found it in all files
so comment is wrong?
// sched:sched_process_exit is triggered right before process/thread exits. At// this point we capture last taskstats to account resource usage of short-lived// processes. We also check tas->signal.live counter to determine if this thread// is the last thread in a process and thus is also a process exit.SEC("tracepoint/sched/sched_process_exit")
inttracepoint__sched__sched_process_exit(
structtrace_event_raw_sched_process_template*args
) {
structtask_struct*task= (structtask_struct*)bpf_get_current_task();
u64pid_tgid=bpf_get_current_pid_tgid();
u64now=bpf_ktime_get_ns();
The text was updated successfully, but these errors were encountered:
Good catch. sched_process_exit is triggered on thread exit and we aren't checking signal.live so this means we end up catching threads not just processes. Now I think about it, it may be a bit confusing since this means we are showing threads not just processes in the process view.
below/src/bpf/exitstat.bpf.c
Comment show that code logic will check tas->signal.live as last thread, but I never found it in all files
so comment is wrong?
The text was updated successfully, but these errors were encountered: