A process-mode PMC is loaded only at context switch-in. After
pmcstat -t starts a PMC on a process, its running threads keep
running without it. At the end of a time slice the scheduler can pick
the same thread and skip the switch hooks, so a CPU-bound thread alone
on its CPU counts 0 until it blocks.
At PMC_OP_PMCSTART for a process-mode PMC, send the TDA_HWPMC AST to
the running threads of each target. The handler loads the PMCs that
are not loaded on the CPU yet.
Add a test: start a counting PMC on a child that spins and never
blocks, and check that it counts.
Sponsored by: AMD