Bug 205002 - pmcstat cannot track thread ids
Summary: pmcstat cannot track thread ids
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Some People
Assignee: George V. Neville-Neil
Keywords: needs-qa
Depends on:
Reported: 2015-12-04 00:23 UTC by Jason Eggleston
Modified: 2021-09-18 00:24 UTC (History)
6 users (show)

See Also:
koobs: maintainer-feedback? (eggnet)


Note You need to log in before you can comment on or make changes to this bug.
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.