diff --git a/sys/amd64/amd64/genassym.c b/sys/amd64/amd64/genassym.c index f749dd62aadf..1924be7f534b 100644 --- a/sys/amd64/amd64/genassym.c +++ b/sys/amd64/amd64/genassym.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#include "opt_hwpmc_hooks.h" #include "opt_kstack_pages.h" #include @@ -44,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef HWPMC_HOOKS +#include +#endif #include #include #include @@ -216,3 +220,7 @@ ASSYM(KUC32SEL, GSEL(GUCODE32_SEL, SEL_UPL)); ASSYM(SEL_RPL_MASK, SEL_RPL_MASK); ASSYM(MSR_GSBASE, MSR_GSBASE); + +#ifdef HWPMC_HOOKS +ASSYM(PMC_FN_USER_CALLCHAIN, PMC_FN_USER_CALLCHAIN); +#endif diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c index 4a76e0ae8b21..059e2ab394c2 100644 --- a/sys/i386/i386/genassym.c +++ b/sys/i386/i386/genassym.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include "opt_apic.h" #include "opt_compat.h" +#include "opt_hwpmc_hooks.h" #include "opt_kstack_pages.h" #include @@ -44,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef HWPMC_HOOKS +#include +#endif #include #include #include @@ -234,3 +238,7 @@ ASSYM(BUS_SPACE_HANDLE_IAT, offsetof(struct bus_space_handle, bsh_iat)); ASSYM(PC_CR3, offsetof(struct pcpu, pc_cr3)); ASSYM(HYPERVISOR_VIRT_START, __HYPERVISOR_VIRT_START); #endif + +#ifdef HWPMC_HOOKS +ASSYM(PMC_FN_USER_CALLCHAIN, PMC_FN_USER_CALLCHAIN); +#endif