Page MenuHomeFreeBSD

D60565.id.diff
No OneTemporary

D60565.id.diff

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

Mime Type
text/plain
Expires
Sun, Oct 11, 8:43 PM (8 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40578079
Default Alt Text
D60565.id.diff (816 B)

Event Timeline