lo2s
lo2s copied to clipboard
Function group heuristics for kernel threads
For userspace threads, our naming based on the comm of threads and processes works just well. For kernel threads, it would be very convenient to apply some heuristic, e.g.: for watchdog/<cpuid>
, it would be great if it ends up in the same function group. But also things like ptlrpcd_07_15
, kiblnd_sd_06_00
.
According to this Stackoverflow answer, one can check the flags
field of /proc/[pid]/stat
for the PF_KTHREAD bit to check if it is a kernel thread.
I have implemented this in the https://github.com/tud-zih-energy/lo2s/tree/issue-328-group-kernel-threads branch. please check if this matches your expectation. For me it looks fine in Vampir.