ia64/xen-unstable

view xen/include/public/trace.h @ 9447:dfbf0939350c

This patch is mainly a cleanup of vmx related xentrace code. One minor
xentrace bug is fixed.

Signed-off-by: Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Yunfeng Zhao <yunfeng.zhao@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Mar 24 10:59:31 2006 +0100 (2006-03-24)
parents 36ab34f1c31e
children e05d60be5adb
line source
1 /******************************************************************************
2 * include/public/trace.h
3 *
4 * Mark Williamson, (C) 2004 Intel Research Cambridge
5 * Copyright (C) 2005 Bin Ren
6 */
8 #ifndef __XEN_PUBLIC_TRACE_H__
9 #define __XEN_PUBLIC_TRACE_H__
11 /* Trace classes */
12 #define TRC_CLS_SHIFT 16
13 #define TRC_GEN 0x0001f000 /* General trace */
14 #define TRC_SCHED 0x0002f000 /* Xen Scheduler trace */
15 #define TRC_DOM0OP 0x0004f000 /* Xen DOM0 operation trace */
16 #define TRC_VMX 0x0008f000 /* Xen VMX trace */
17 #define TRC_MEM 0x000af000 /* Xen memory trace */
18 #define TRC_ALL 0xfffff000
20 /* Trace subclasses */
21 #define TRC_SUBCLS_SHIFT 12
22 /* trace subclasses for VMX */
23 #define TRC_VMXEXIT 0x00081000 /* VMX exit trace */
24 #define TRC_VMXTIMER 0x00082000 /* VMX timer trace */
25 #define TRC_VMXINT 0x00084000 /* VMX interrupt trace */
26 #define TRC_VMXIO 0x00088000 /* VMX io emulation trace */
28 /* Trace events per class */
30 #define TRC_SCHED_DOM_ADD (TRC_SCHED + 1)
31 #define TRC_SCHED_DOM_REM (TRC_SCHED + 2)
32 #define TRC_SCHED_SLEEP (TRC_SCHED + 3)
33 #define TRC_SCHED_WAKE (TRC_SCHED + 4)
34 #define TRC_SCHED_YIELD (TRC_SCHED + 5)
35 #define TRC_SCHED_BLOCK (TRC_SCHED + 6)
36 #define TRC_SCHED_SHUTDOWN (TRC_SCHED + 7)
37 #define TRC_SCHED_CTL (TRC_SCHED + 8)
38 #define TRC_SCHED_ADJDOM (TRC_SCHED + 9)
39 #define TRC_SCHED_SWITCH (TRC_SCHED + 10)
40 #define TRC_SCHED_S_TIMER_FN (TRC_SCHED + 11)
41 #define TRC_SCHED_T_TIMER_FN (TRC_SCHED + 12)
42 #define TRC_SCHED_DOM_TIMER_FN (TRC_SCHED + 13)
43 #define TRC_SCHED_SWITCH_INFPREV (TRC_SCHED + 14)
44 #define TRC_SCHED_SWITCH_INFNEXT (TRC_SCHED + 15)
46 #define TRC_MEM_PAGE_GRANT_MAP (TRC_MEM + 1)
47 #define TRC_MEM_PAGE_GRANT_UNMAP (TRC_MEM + 2)
48 #define TRC_MEM_PAGE_GRANT_TRANSFER (TRC_MEM + 3)
50 /* trace events per subclass */
51 #define TRC_VMX_VMEXIT (TRC_VMXEXIT + 1)
52 #define TRC_VMX_VMENTRY (TRC_VMXEXIT + 2)
54 #define TRC_VMX_TIMER_INTR (TRC_VMXTIMER + 1)
56 #define TRC_VMX_INT (TRC_VMXINT + 1)
59 /* This structure represents a single trace buffer record. */
60 struct t_rec {
61 uint64_t cycles; /* cycle counter timestamp */
62 uint32_t event; /* event ID */
63 unsigned long data[5]; /* event data items */
64 };
66 /*
67 * This structure contains the metadata for a single trace buffer. The head
68 * field, indexes into an array of struct t_rec's.
69 */
70 struct t_buf {
71 uint32_t cons; /* Next item to be consumed by control tools. */
72 uint32_t prod; /* Next item to be produced by Xen. */
73 /* 'nr_recs' records follow immediately after the meta-data header. */
74 };
76 #endif /* __XEN_PUBLIC_TRACE_H__ */
78 /*
79 * Local variables:
80 * mode: C
81 * c-set-style: "BSD"
82 * c-basic-offset: 4
83 * tab-width: 4
84 * indent-tabs-mode: nil
85 * End:
86 */