Bug 205002

Summary: pmcstat cannot track thread ids
Product: Base System Reporter: Jason Eggleston <eggnet>
Component: kernAssignee: George V. Neville-Neil <gnn>
Status: In Progress ---    
Severity: Affects Some People CC: bz, eggnet, gnn, j, jmg, kbowling
Priority: --- Keywords: needs-qa
Version: CURRENTFlags: koobs: maintainer-feedback? (eggnet)
Hardware: amd64   
OS: Any   

Description Jason Eggleston 2015-12-04 00:23:08 UTC
Currently pmcstat cannot track thread IDs:

# ps -auxwwH -O lwp,comm | grep init
root       1  0.0  0.0    9476     248  -  SLs  25Nov15     0:01.03 /sbin/init --        1 100002 init                    -  SLs      0:01.03 /sbin/init --

this is of course pid 1, but thread id 100002

# pmcstat -t 100002 -P unhalted-cycles -O /dev/null
pmcstat: ERROR: No processes were attached to.

When debugging multithreaded applications it can be beneficial to focus on specific threads, if different threads are performing different types of tasks.
Comment 1 John-Mark Gurney freebsd_committer 2021-03-02 02:04:54 UTC
This looks to now be supported by pmcstat -i lwp, please confirm that this works for you.