Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176928166
D60565.1793620029.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
816 B
Referenced Files
None
Subscribers
None
D60565.1793620029.diff
View Options
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -34,6 +34,7 @@
* SUCH DAMAGE.
*/
+#include "opt_hwpmc_hooks.h"
#include "opt_ktrace.h"
#include "opt_kstack_pages.h"
@@ -57,6 +58,9 @@
#include <sys/msan.h>
#include <sys/mutex.h>
#include <sys/priv.h>
+#ifdef HWPMC_HOOKS
+#include <sys/pmckern.h>
+#endif
#include <sys/proc.h>
#include <sys/procdesc.h>
#include <sys/ptrace.h>
@@ -1220,6 +1224,12 @@
sched_fork_exit(td);
+#ifdef HWPMC_HOOKS
+ /* First-run threads bypass the normal scheduler switch-in path. */
+ if (PMC_PROC_IS_USING_PMCS(p))
+ PMC_SWITCH_CONTEXT(td, PMC_FN_CSW_IN);
+#endif
+
/*
* Processes normally resume in mi_switch() after being
* cpu_switch()'ed to, but when children start up they arrive here
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 2, 11:47 AM (7 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40578079
Default Alt Text
D60565.1793620029.diff (816 B)
Attached To
Mode
D60565: hwpmc: switch in process PMCs on a thread's first run
Attached
Detach File
Event Timeline