diff options
author | Emmanuel Ackaouy <ack@xensource.com> | 2007-01-05 17:34:37 +0000 |
---|---|---|
committer | Emmanuel Ackaouy <ack@xensource.com> | 2007-01-05 17:34:37 +0000 |
commit | b0a4c24ddae72f424710456f054297153565222f (patch) | |
tree | 3602d32ea8b6193e8d6dcf7317cab176276e7074 /xen/include/xen/xenoprof.h | |
parent | 62320af21e472e4e27791dd5858cc323776aa340 (diff) | |
download | xen-b0a4c24ddae72f424710456f054297153565222f.tar.gz xen-b0a4c24ddae72f424710456f054297153565222f.tar.bz2 xen-b0a4c24ddae72f424710456f054297153565222f.zip |
Enable compatibility mode operation for HYPERVISOR_xenoprof_op.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/include/xen/xenoprof.h')
-rw-r--r-- | xen/include/xen/xenoprof.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/xen/include/xen/xenoprof.h b/xen/include/xen/xenoprof.h index b9fe9de528..8983f0c987 100644 --- a/xen/include/xen/xenoprof.h +++ b/xen/include/xen/xenoprof.h @@ -10,6 +10,7 @@ #ifndef __XEN_XENOPROF_H__ #define __XEN_XENOPROF_H__ +#include <xen/config.h> #include <public/xenoprof.h> #include <asm/xenoprof.h> @@ -22,9 +23,19 @@ #define XENOPROF_READY 2 #define XENOPROF_PROFILING 3 +#ifndef CONFIG_COMPAT +typedef 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; +#endif + struct xenoprof_vcpu { int event_size; - struct xenoprof_buf *buffer; + xenoprof_buf_t *buffer; }; struct xenoprof { @@ -35,9 +46,22 @@ struct xenoprof { 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)) +#endif + struct domain; void free_xenoprof_pages(struct domain *d); |