diff options
Diffstat (limited to 'sys/kern/kern_thr.c')
-rw-r--r-- | sys/kern/kern_thr.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c index 8ad885b42ebe..0e8c2b9f362e 100644 --- a/sys/kern/kern_thr.c +++ b/sys/kern/kern_thr.c @@ -29,7 +29,7 @@ #include "opt_ktrace.h" #include "opt_posix.h" #include "opt_hwpmc_hooks.h" - +#include "opt_hwt_hooks.h" #include <sys/systm.h> #include <sys/kernel.h> #ifdef KTRACE @@ -60,6 +60,9 @@ #ifdef HWPMC_HOOKS #include <sys/pmckern.h> #endif +#ifdef HWT_HOOKS +#include <dev/hwt/hwt_hook.h> +#endif #include <machine/frame.h> @@ -280,6 +283,10 @@ thread_create(struct thread *td, struct rtprio *rtp, PMC_CALL_HOOK_UNLOCKED(newtd, PMC_FN_THR_CREATE_LOG, NULL); #endif +#ifdef HWT_HOOKS + HWT_CALL_HOOK(newtd, HWT_THREAD_CREATE, NULL); +#endif + tidhash_add(newtd); /* ignore timesharing class */ @@ -613,6 +620,9 @@ sys_thr_set_name(struct thread *td, struct thr_set_name_args *uap) if (PMC_PROC_IS_USING_PMCS(p) || PMC_SYSTEM_SAMPLING_ACTIVE()) PMC_CALL_HOOK_UNLOCKED(ttd, PMC_FN_THR_CREATE_LOG, NULL); #endif +#ifdef HWT_HOOKS + HWT_CALL_HOOK(ttd, HWT_THREAD_SET_NAME, NULL); +#endif #ifdef KTR sched_clear_tdname(ttd); #endif |