summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/trace.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-07-01 18:25:44 +0300
committerAvi Kivity <avi@redhat.com>2009-09-10 08:33:07 +0300
commitcb24772140e09cb2503af7a4736ae3e08e9ac7d3 (patch)
tree0275071b7c1f5ad9b4c2dba0fd974caf0cd3d6a9 /arch/x86/kvm/trace.h
parentaec51dc4f1584018d7e35269e04e3dde3d2033e6 (diff)
downloadlinux-cb24772140e09cb2503af7a4736ae3e08e9ac7d3.tar.gz
linux-cb24772140e09cb2503af7a4736ae3e08e9ac7d3.tar.bz2
linux-cb24772140e09cb2503af7a4736ae3e08e9ac7d3.zip
KVM: Trace apic registers using their symbolic names
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/trace.h')
-rw-r--r--arch/x86/kvm/trace.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/x86/kvm/trace.h b/arch/x86/kvm/trace.h
index cd8c90db41a5..6c2c87fa6e4f 100644
--- a/arch/x86/kvm/trace.h
+++ b/arch/x86/kvm/trace.h
@@ -111,6 +111,15 @@ TRACE_EVENT(kvm_cpuid,
__entry->rbx, __entry->rcx, __entry->rdx)
);
+#define AREG(x) { APIC_##x, "APIC_" #x }
+
+#define kvm_trace_symbol_apic \
+ AREG(ID), AREG(LVR), AREG(TASKPRI), AREG(ARBPRI), AREG(PROCPRI), \
+ AREG(EOI), AREG(RRR), AREG(LDR), AREG(DFR), AREG(SPIV), AREG(ISR), \
+ AREG(TMR), AREG(IRR), AREG(ESR), AREG(ICR), AREG(ICR2), AREG(LVTT), \
+ AREG(LVTTHMR), AREG(LVTPC), AREG(LVT0), AREG(LVT1), AREG(LVTERR), \
+ AREG(TMICT), AREG(TMCCT), AREG(TDCR), AREG(SELF_IPI), AREG(EFEAT), \
+ AREG(ECTRL)
/*
* Tracepoint for apic access.
*/
@@ -130,9 +139,10 @@ TRACE_EVENT(kvm_apic,
__entry->val = val;
),
- TP_printk("apic_%s 0x%x = 0x%x",
+ TP_printk("apic_%s %s = 0x%x",
__entry->rw ? "write" : "read",
- __entry->reg, __entry->val)
+ __print_symbolic(__entry->reg, kvm_trace_symbol_apic),
+ __entry->val)
);
#define trace_kvm_apic_read(reg, val) trace_kvm_apic(0, reg, val)