hwpmc: Reenable PME before reenabling counters.
Doing otherwise may lead to lost interrupts, that in combination with hardware PMCs freezing may leave them frozen forever. It may also slightly improve profiling accuracy. MFC after: 2 weeks
This commit is contained in:
parent
918505d0a0
commit
f9e62419f6
@ -1204,6 +1204,9 @@ core2_intr(struct trapframe *tf)
|
||||
else
|
||||
counter_u64_add(pmc_stats.pm_intr_ignored, 1);
|
||||
|
||||
if (found_interrupt)
|
||||
lapic_reenable_pmc();
|
||||
|
||||
/*
|
||||
* Reenable all non-stalled PMCs.
|
||||
*/
|
||||
@ -1224,9 +1227,6 @@ core2_intr(struct trapframe *tf)
|
||||
(uintmax_t) rdmsr(IA_GLOBAL_CTRL),
|
||||
(uintmax_t) rdmsr(IA_GLOBAL_STATUS));
|
||||
|
||||
if (found_interrupt)
|
||||
lapic_reenable_pmc();
|
||||
|
||||
return (found_interrupt);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user