freebsd-skq/sys/dev/hwpmc
Jonathan T. Looney a39249680f Fix hwpmc "stalled" behavior
Currently, there is a single pm_stalled flag that tracks whether a
performance monitor was "stalled" due to insufficent ring buffer
space for samples. However, because the same performance monitor
can run on multiple processes or threads at the same time, a single
pm_stalled flag that impacts them all seems insufficient.

In particular, you can hit corner cases where the code fails to stop
performance monitors during a context switch out, because it thinks
the performance monitor is already stopped. However, in reality,
it may be that only the monitor running on a different CPU was stalled.

This patch attempts to fix that behavior by tracking on a per-CPU basis
whether a PM desires to run and whether it is "stalled". This lets the
code make better decisions about when to stop PMs and when to try to
restart them. Ideally, we should avoid the case where the code fails
to stop a PM during a context switch out.

Sponsored by:	Juniper Networks
Reviewed by:	jhb
Approved by:	gnn (mentor)
Differential Revision:	https://reviews.freebsd.org/D4124
2015-11-14 01:40:12 +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 Remove some prototypes for undefined functions. 2014-05-15 21:19:13 +00:00
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 Fix hwpmc "stalled" behavior 2015-11-14 01:40:12 +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 Remove some prototypes for undefined functions. 2014-05-15 21:19:13 +00:00
hwpmc_x86.c Update the hwpmc driver to have the new type HASWELL_XEON. Also 2015-01-14 12:46:58 +00:00
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 Now that we can detect the Cortex-A8 properly, fix the event list 2015-10-14 17:20:19 +00:00