lo2s icon indicating copy to clipboard operation
lo2s copied to clipboard

Function group heuristics for kernel threads

Open tilsche opened this issue 11 months ago • 2 comments

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.

tilsche avatar Mar 20 '24 13:03 tilsche

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.

cvonelm avatar Mar 20 '24 13:03 cvonelm

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.

cvonelm avatar Aug 15 '24 07:08 cvonelm