diff options
author | Matt Macy <mmacy@FreeBSD.org> | 2018-06-05 04:26:40 +0000 |
---|---|---|
committer | Matt Macy <mmacy@FreeBSD.org> | 2018-06-05 04:26:40 +0000 |
commit | ebfaf69cc0a741100c3ef6ec6960d3a3ba0d1168 (patch) | |
tree | 43428d2c3cb5da86f51cf6b8a2bffa67d47f84d8 /sys/kern/kern_thread.c | |
parent | a12a06fae282272577b48a4c8b722f659bbf053e (diff) | |
download | src-ebfaf69cc0a741100c3ef6ec6960d3a3ba0d1168.tar.gz src-ebfaf69cc0a741100c3ef6ec6960d3a3ba0d1168.zip |
hwpmc: log name->pid, name->tid mappings
By logging all threads and processes 'pmc filter'
can now filter on process or thread name, relieving
the user of the burden of determining which tid or
pid was which when the sample was taken.
% pmc filter -T if_io_tqg -P nginx pmc.log pmc-iflib.log
% pmc filter -x -T idle pmc.log pmc-noidle.log
Notes
Notes:
svn path=/head/; revision=334647
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 86bcdc90bfa0..a3a6e87d2c4a 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -589,7 +589,8 @@ thread_exit(void) if (PMC_PROC_IS_USING_PMCS(td->td_proc)) { PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_OUT); PMC_CALL_HOOK_UNLOCKED(td, PMC_FN_THR_EXIT, NULL); - } + } else if (PMC_SYSTEM_SAMPLING_ACTIVE()) + PMC_CALL_HOOK_UNLOCKED(td, PMC_FN_THR_EXIT_LOG, NULL); #endif PROC_UNLOCK(p); PROC_STATLOCK(p); |