Add counter to keep track of the number of timer interrupts generated by
the local apic for each virtual cpu.
This commit is contained in:
parent
10098a6ec2
commit
77d8fd9bb3
@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/vmm.h>
|
||||
|
||||
#include "vmm_stat.h"
|
||||
#include "vmm_lapic.h"
|
||||
#include "vmm_ktr.h"
|
||||
#include "vdev.h"
|
||||
@ -410,6 +411,8 @@ vlapic_periodic_timer(struct vlapic *vlapic)
|
||||
return (vlapic_get_lvt_field(lvt, APIC_LVTT_TM_PERIODIC));
|
||||
}
|
||||
|
||||
static VMM_STAT(VLAPIC_INTR_TIMER, "timer interrupts generated by vlapic");
|
||||
|
||||
static void
|
||||
vlapic_fire_timer(struct vlapic *vlapic)
|
||||
{
|
||||
@ -419,6 +422,7 @@ vlapic_fire_timer(struct vlapic *vlapic)
|
||||
lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_TIMER_LVT);
|
||||
|
||||
if (!vlapic_get_lvt_field(lvt, APIC_LVTT_M)) {
|
||||
vmm_stat_incr(vlapic->vm, vlapic->vcpuid, VLAPIC_INTR_TIMER, 1);
|
||||
vector = vlapic_get_lvt_field(lvt,APIC_LVTT_VECTOR);
|
||||
vlapic_set_intr_ready(vlapic, vector);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user