ia64/xen-unstable

view xen/include/public/trace.h @ 6788:e939d5c5e646

Pass the root directory to Doxyfilter and thence pythfilter.py so that the latter can get the namespace/packages correct.
author ewan@linford.intra
date Tue Sep 13 14:42:21 2005 +0100 (2005-09-13)
parents dd668f7527cb
children b2f4823b6ff0 b35215021b32 9af349b055e5 3233e7ecfa9f
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_ALL 0xfffff000
19 /* Trace subclasses */
20 #define TRC_SUBCLS_SHIFT 12
21 /* trace subclasses for VMX */
22 #define TRC_VMXEXIT 0x00081000 /* VMX exit trace */
23 #define TRC_VMXTIMER 0x00082000 /* VMX timer trace */
24 #define TRC_VMXINT 0x00084000 /* VMX interrupt trace */
25 #define TRC_VMXIO 0x00088000 /* VMX io emulation trace */
26 #define TRC_VMEXIT_HANDLER 0x00090000 /* VMX handler 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)
44 /* trace events per subclass */
45 #define TRC_VMX_VMEXIT (TRC_VMXEXIT + 1)
46 #define TRC_VMX_VECTOR (TRC_VMXEXIT + 2)
48 #define TRC_VMX_TIMER_INTR (TRC_VMXTIMER + 1)
50 #define TRC_VMX_INT (TRC_VMXINT + 1)
52 #define TRC_VMEXIT (TRC_VMEXIT_HANDLER + 1)
53 #define TRC_VMENTRY (TRC_VMEXIT_HANDLER + 2)
56 /* This structure represents a single trace buffer record. */
57 struct t_rec {
58 u64 cycles; /* cycle counter timestamp */
59 u32 event; /* event ID */
60 unsigned long data[5]; /* event data items */
61 };
63 /*
64 * This structure contains the metadata for a single trace buffer. The head
65 * field, indexes into an array of struct t_rec's.
66 */
67 struct t_buf {
68 /* Used by both Xen and user space. */
69 atomic_t rec_idx; /* the next record to save to */
70 unsigned int rec_num; /* number of records in this trace buffer */
71 /* Used by Xen only. */
72 struct t_rec *rec; /* start of records */
73 /* Used by user space only. */
74 unsigned long rec_addr; /* machine address of the start of records */
75 };
77 #endif /* __XEN_PUBLIC_TRACE_H__ */