win-pvdrivers

annotate common/include/public/trace.h @ 62:edd4a2ad5b44

Removed old inf files
author James Harper <james.harper@bendigoit.com.au>
date Wed Dec 19 10:22:50 2007 +1100 (2007-12-19)
parents 5712dede5a1b
children b474e898b409
rev   line source
andy@12 1 /******************************************************************************
andy@12 2 * include/public/trace.h
andy@12 3 *
andy@12 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
andy@12 5 * of this software and associated documentation files (the "Software"), to
andy@12 6 * deal in the Software without restriction, including without limitation the
andy@12 7 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
andy@12 8 * sell copies of the Software, and to permit persons to whom the Software is
andy@12 9 * furnished to do so, subject to the following conditions:
andy@12 10 *
andy@12 11 * The above copyright notice and this permission notice shall be included in
andy@12 12 * all copies or substantial portions of the Software.
andy@12 13 *
andy@12 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
andy@12 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
andy@12 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
andy@12 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
andy@12 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
andy@12 19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
andy@12 20 * DEALINGS IN THE SOFTWARE.
andy@12 21 *
andy@12 22 * Mark Williamson, (C) 2004 Intel Research Cambridge
andy@12 23 * Copyright (C) 2005 Bin Ren
andy@12 24 */
andy@12 25
andy@12 26 #ifndef __XEN_PUBLIC_TRACE_H__
andy@12 27 #define __XEN_PUBLIC_TRACE_H__
andy@12 28
andy@12 29 /* Trace classes */
andy@12 30 #define TRC_CLS_SHIFT 16
andy@12 31 #define TRC_GEN 0x0001f000 /* General trace */
andy@12 32 #define TRC_SCHED 0x0002f000 /* Xen Scheduler trace */
andy@12 33 #define TRC_DOM0OP 0x0004f000 /* Xen DOM0 operation trace */
andy@12 34 #define TRC_HVM 0x0008f000 /* Xen HVM trace */
andy@12 35 #define TRC_MEM 0x0010f000 /* Xen memory trace */
andy@12 36 #define TRC_ALL 0xfffff000
andy@12 37
andy@12 38 /* Trace subclasses */
andy@12 39 #define TRC_SUBCLS_SHIFT 12
andy@12 40
andy@12 41 /* trace subclasses for SVM */
andy@12 42 #define TRC_HVM_ENTRYEXIT 0x00081000 /* VMENTRY and #VMEXIT */
andy@12 43 #define TRC_HVM_HANDLER 0x00082000 /* various HVM handlers */
andy@12 44
andy@12 45 /* Trace events per class */
andy@12 46 #define TRC_LOST_RECORDS (TRC_GEN + 1)
andy@12 47
andy@12 48 #define TRC_SCHED_DOM_ADD (TRC_SCHED + 1)
andy@12 49 #define TRC_SCHED_DOM_REM (TRC_SCHED + 2)
andy@12 50 #define TRC_SCHED_SLEEP (TRC_SCHED + 3)
andy@12 51 #define TRC_SCHED_WAKE (TRC_SCHED + 4)
andy@12 52 #define TRC_SCHED_YIELD (TRC_SCHED + 5)
andy@12 53 #define TRC_SCHED_BLOCK (TRC_SCHED + 6)
andy@12 54 #define TRC_SCHED_SHUTDOWN (TRC_SCHED + 7)
andy@12 55 #define TRC_SCHED_CTL (TRC_SCHED + 8)
andy@12 56 #define TRC_SCHED_ADJDOM (TRC_SCHED + 9)
andy@12 57 #define TRC_SCHED_SWITCH (TRC_SCHED + 10)
andy@12 58 #define TRC_SCHED_S_TIMER_FN (TRC_SCHED + 11)
andy@12 59 #define TRC_SCHED_T_TIMER_FN (TRC_SCHED + 12)
andy@12 60 #define TRC_SCHED_DOM_TIMER_FN (TRC_SCHED + 13)
andy@12 61 #define TRC_SCHED_SWITCH_INFPREV (TRC_SCHED + 14)
andy@12 62 #define TRC_SCHED_SWITCH_INFNEXT (TRC_SCHED + 15)
andy@12 63
andy@12 64 #define TRC_MEM_PAGE_GRANT_MAP (TRC_MEM + 1)
andy@12 65 #define TRC_MEM_PAGE_GRANT_UNMAP (TRC_MEM + 2)
andy@12 66 #define TRC_MEM_PAGE_GRANT_TRANSFER (TRC_MEM + 3)
andy@12 67
andy@12 68 /* trace events per subclass */
andy@12 69 #define TRC_HVM_VMENTRY (TRC_HVM_ENTRYEXIT + 0x01)
andy@12 70 #define TRC_HVM_VMEXIT (TRC_HVM_ENTRYEXIT + 0x02)
andy@12 71 #define TRC_HVM_PF_XEN (TRC_HVM_HANDLER + 0x01)
andy@12 72 #define TRC_HVM_PF_INJECT (TRC_HVM_HANDLER + 0x02)
andy@12 73 #define TRC_HVM_INJ_EXC (TRC_HVM_HANDLER + 0x03)
andy@12 74 #define TRC_HVM_INJ_VIRQ (TRC_HVM_HANDLER + 0x04)
andy@12 75 #define TRC_HVM_REINJ_VIRQ (TRC_HVM_HANDLER + 0x05)
andy@12 76 #define TRC_HVM_IO_READ (TRC_HVM_HANDLER + 0x06)
andy@12 77 #define TRC_HVM_IO_WRITE (TRC_HVM_HANDLER + 0x07)
andy@12 78 #define TRC_HVM_CR_READ (TRC_HVM_HANDLER + 0x08)
andy@12 79 #define TRC_HVM_CR_WRITE (TRC_HVM_HANDLER + 0x09)
andy@12 80 #define TRC_HVM_DR_READ (TRC_HVM_HANDLER + 0x0A)
andy@12 81 #define TRC_HVM_DR_WRITE (TRC_HVM_HANDLER + 0x0B)
andy@12 82 #define TRC_HVM_MSR_READ (TRC_HVM_HANDLER + 0x0C)
andy@12 83 #define TRC_HVM_MSR_WRITE (TRC_HVM_HANDLER + 0x0D)
andy@12 84 #define TRC_HVM_CPUID (TRC_HVM_HANDLER + 0x0E)
andy@12 85 #define TRC_HVM_INTR (TRC_HVM_HANDLER + 0x0F)
andy@12 86 #define TRC_HVM_NMI (TRC_HVM_HANDLER + 0x10)
andy@12 87 #define TRC_HVM_SMI (TRC_HVM_HANDLER + 0x11)
andy@12 88 #define TRC_HVM_VMMCALL (TRC_HVM_HANDLER + 0x12)
andy@12 89 #define TRC_HVM_HLT (TRC_HVM_HANDLER + 0x13)
andy@12 90 #define TRC_HVM_INVLPG (TRC_HVM_HANDLER + 0x14)
andy@12 91 #define TRC_HVM_MCE (TRC_HVM_HANDLER + 0x15)
andy@12 92
andy@12 93 /* This structure represents a single trace buffer record. */
andy@12 94 struct t_rec {
andy@12 95 uint64_t cycles; /* cycle counter timestamp */
andy@12 96 uint32_t event; /* event ID */
andy@12 97 unsigned long data[5]; /* event data items */
andy@12 98 };
andy@12 99
andy@12 100 /*
andy@12 101 * This structure contains the metadata for a single trace buffer. The head
andy@12 102 * field, indexes into an array of struct t_rec's.
andy@12 103 */
andy@12 104 struct t_buf {
andy@12 105 uint32_t cons; /* Next item to be consumed by control tools. */
andy@12 106 uint32_t prod; /* Next item to be produced by Xen. */
andy@12 107 /* 'nr_recs' records follow immediately after the meta-data header. */
andy@12 108 };
andy@12 109
andy@12 110 #endif /* __XEN_PUBLIC_TRACE_H__ */
andy@12 111
andy@12 112 /*
andy@12 113 * Local variables:
andy@12 114 * mode: C
andy@12 115 * c-set-style: "BSD"
andy@12 116 * c-basic-offset: 4
andy@12 117 * tab-width: 4
andy@12 118 * indent-tabs-mode: nil
andy@12 119 * End:
andy@12 120 */