Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/vmm/vmm_stat.h
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | |||||
#define VMM_STAT_ARRAY(type, nelems, desc) \ | #define VMM_STAT_ARRAY(type, nelems, desc) \ | ||||
VMM_STAT_DEFINE(type, nelems, desc, VMM_STAT_SCOPE_ANY) | VMM_STAT_DEFINE(type, nelems, desc, VMM_STAT_SCOPE_ANY) | ||||
void *vmm_stat_alloc(void); | void *vmm_stat_alloc(void); | ||||
void vmm_stat_init(void *vp); | void vmm_stat_init(void *vp); | ||||
void vmm_stat_free(void *vp); | void vmm_stat_free(void *vp); | ||||
/* | int vmm_stat_copy(struct vm *vm, int vcpu, int index, int count, | ||||
* 'buf' should be at least fit 'MAX_VMM_STAT_TYPES' entries | int *num_stats, uint64_t *buf); | ||||
*/ | |||||
int vmm_stat_copy(struct vm *vm, int vcpu, int *num_stats, uint64_t *buf); | |||||
int vmm_stat_desc_copy(int index, char *buf, int buflen); | int vmm_stat_desc_copy(int index, char *buf, int buflen); | ||||
static void __inline | static void __inline | ||||
vmm_stat_array_incr(struct vm *vm, int vcpu, struct vmm_stat_type *vst, | vmm_stat_array_incr(struct vm *vm, int vcpu, struct vmm_stat_type *vst, | ||||
int statidx, uint64_t x) | int statidx, uint64_t x) | ||||
{ | { | ||||
#ifdef VMM_KEEP_STATS | #ifdef VMM_KEEP_STATS | ||||
uint64_t *stats; | uint64_t *stats; | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |