📄 xenoprof.h
字号:
/****************************************************************************** * xenoprof.h * * Xenoprof: Xenoprof enables performance profiling in Xen * * Copyright (C) 2005 Hewlett-Packard Co. * written by Aravind Menon & Jose Renato Santos */#ifndef __XEN_XENOPROF_H__#define __XEN_XENOPROF_H__#include <xen/config.h>#include <public/xenoprof.h>#include <asm/xenoprof.h>#define XENOPROF_DOMAIN_IGNORED 0#define XENOPROF_DOMAIN_ACTIVE 1#define XENOPROF_DOMAIN_PASSIVE 2#define XENOPROF_IDLE 0#define XENOPROF_COUNTERS_RESERVED 1#define XENOPROF_READY 2#define XENOPROF_PROFILING 3#ifndef CONFIG_COMPATtypedef struct xenoprof_buf xenoprof_buf_t;#else#include <compat/xenoprof.h>typedef union { struct xenoprof_buf native; struct compat_oprof_buf compat;} xenoprof_buf_t;#endifstruct xenoprof_vcpu { int event_size; xenoprof_buf_t *buffer;};struct xenoprof { char *rawbuf; int npages; int nbuf; int bufsize; int domain_type; int domain_ready; int is_primary;#ifdef CONFIG_COMPAT int is_compat;#endif struct xenoprof_vcpu vcpu [MAX_VIRT_CPUS];};#ifndef CONFIG_COMPAT#define XENOPROF_COMPAT(x) 0#define xenoprof_buf(d, b, field) ((b)->field)#else#define XENOPROF_COMPAT(x) ((x)->is_compat)#define xenoprof_buf(d, b, field) (*(!(d)->xenoprof->is_compat ? \ &(b)->native.field : \ &(b)->compat.field))#endifstruct domain;void free_xenoprof_pages(struct domain *d);int do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg);int xenoprof_add_trace(struct domain *d, struct vcpu *v, unsigned long eip, int mode);#define PMU_OWNER_NONE 0#define PMU_OWNER_XENOPROF 1#define PMU_OWNER_HVM 2int acquire_pmu_ownship(int pmu_ownership);void release_pmu_ownship(int pmu_ownership);#endif /* __XEN__XENOPROF_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -