ia64/xen-unstable

view xen/include/xen/xenoprof.h @ 12541:1d7d5d48fcdc

[XENOPROFILE] Make xenoprof arch-generic with dynamic mapping/unmapping xenoprof
buffer support and auto translated mode support.
renamed xenoprof_get_buffer::buf_maddr, xenoprof_passive::buf_maddr to
xenoprof_get_buffer::buf_gmaddr, xenoprof_passive::buf_gmaddr
to support auto translated mode. With auto translated mode enabled,
it is gmaddr, not maddr.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>

Simplify the share function.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Nov 22 10:09:28 2006 +0000 (2006-11-22)
parents da5c5fc8908f
children 62f3df867d0e
line source
1 /******************************************************************************
2 * xenoprof.h
3 *
4 * Xenoprof: Xenoprof enables performance profiling in Xen
5 *
6 * Copyright (C) 2005 Hewlett-Packard Co.
7 * written by Aravind Menon & Jose Renato Santos
8 */
10 #ifndef __XEN_XENOPROF_H__
11 #define __XEN_XENOPROF_H__
13 #include <public/xenoprof.h>
14 #include <asm/xenoprof.h>
16 #define XENOPROF_DOMAIN_IGNORED 0
17 #define XENOPROF_DOMAIN_ACTIVE 1
18 #define XENOPROF_DOMAIN_PASSIVE 2
20 #define XENOPROF_IDLE 0
21 #define XENOPROF_COUNTERS_RESERVED 1
22 #define XENOPROF_READY 2
23 #define XENOPROF_PROFILING 3
25 struct xenoprof_vcpu {
26 int event_size;
27 struct xenoprof_buf *buffer;
28 };
30 struct xenoprof {
31 char *rawbuf;
32 int npages;
33 int nbuf;
34 int bufsize;
35 int domain_type;
36 int domain_ready;
37 int is_primary;
38 struct xenoprof_vcpu vcpu [MAX_VIRT_CPUS];
39 };
41 struct domain;
42 void free_xenoprof_pages(struct domain *d);
44 int do_xenoprof_op(int op, XEN_GUEST_HANDLE(void) arg);
46 extern struct domain *xenoprof_primary_profiler;
48 #endif /* __XEN__XENOPROF_H__ */