1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/sys/dev/hwpmc
Bjoern A. Zeeb e6f4757735 When forking a child process with PMC_F_DESCENDANTS set in pmc_attach()
in the parent, we will inherit the pmcids but cannot execute any operations
on them in the child.  The reason for this is that pmc_find_pmc() only
tries to find the current process on the owners hash list, but given the
child does not own the attachment, we cannot find it.
Thus, in case the initial lookup fails, try to find the pmc_process state
affiliated with the child process, lookup the pmc from there using the
row index, and get the owner process from that pmc.
Then continue as normal and lookup the pmc context of the owner (process).

This allows us to call, e.g., pmc_start() in the child process before we
start the work there, but to collect the accumulated results later in
the parent.

Sponsored by:		DARPA,AFRL
Obtained from:		L41
Tested by:		rwatson, L41
MFC after:		4 weeks
Reviewed by:		gnn
Differential Revision:	https://reviews.freebsd.org/D2052
2015-08-24 18:57:32 +00:00
..
hwpmc_amd.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_amd.h
hwpmc_arm64_md.c Add Performance Monitoring Counters support for AArch64. 2015-05-19 15:25:47 +00:00
hwpmc_arm64.c Add Performance Monitoring Counters support for AArch64. 2015-05-19 15:25:47 +00:00
hwpmc_arm64.h Add Performance Monitoring Counters support for AArch64. 2015-05-19 15:25:47 +00:00
hwpmc_arm.c Rather than defining our own magic checks here use INKERNEL() for 2015-03-27 08:47:16 +00:00
hwpmc_armv7.c o Rework ARMv7 events list using aliases - same way as we have for arm64. 2015-06-10 12:42:30 +00:00
hwpmc_armv7.h o Rework ARMv7 events list using aliases - same way as we have for arm64. 2015-06-10 12:42:30 +00:00
hwpmc_core.c Fix two bugs that could result in PMC sampling effectively stopping. 2015-05-19 19:15:19 +00:00
hwpmc_core.h
hwpmc_e500.c Convert remaining hwpmc(4) debug printfs over to KTR to unbreak the build 2015-05-09 09:21:59 +00:00
hwpmc_intel.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_logging.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_mips24k.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_mips74k.c Convert remaining hwpmc(4) debug printfs over to KTR to unbreak the build 2015-05-09 09:21:59 +00:00
hwpmc_mips.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_mod.c When forking a child process with PMC_F_DESCENDANTS set in pmc_attach() 2015-08-24 18:57:32 +00:00
hwpmc_mpc7xxx.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_octeon.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_pentium.c
hwpmc_pentium.h
hwpmc_piv.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_piv.h
hwpmc_powerpc.c Implement hwpmc(4) for Freescale e500 core. 2015-04-18 21:39:17 +00:00
hwpmc_powerpc.h Implement hwpmc(4) for Freescale e500 core. 2015-04-18 21:39:17 +00:00
hwpmc_ppc970.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_ppro.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_ppro.h
hwpmc_soft.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_soft.h
hwpmc_sparc64.c
hwpmc_tsc.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_tsc.h
hwpmc_uncore.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_uncore.h
hwpmc_x86.c
hwpmc_xscale.c Convert hwpmc(4) debug printfs over to KTR. 2015-05-08 19:40:00 +00:00
hwpmc_xscale.h
pmc_events.h o Rework ARMv7 events list using aliases - same way as we have for arm64. 2015-06-10 12:42:30 +00:00