diff options
| author | Avi Kivity <avi@redhat.com> | 2009-07-01 09:01:02 -0400 |
|---|---|---|
| committer | Avi Kivity <avi@redhat.com> | 2009-09-10 01:33:07 -0400 |
| commit | aec51dc4f1584018d7e35269e04e3dde3d2033e6 (patch) | |
| tree | 8423d4680a2db4417fd99ccfffc935f8650230e1 /include/trace | |
| parent | c323c0e5f06150cc000e09e8e3b22356099e7bde (diff) | |
KVM: Trace mmio
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/trace')
| -rw-r--r-- | include/trace/events/kvm.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index 035232dc84e0..77022af48492 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
| @@ -56,6 +56,39 @@ TRACE_EVENT(kvm_ack_irq, | |||
| 56 | 56 | ||
| 57 | 57 | ||
| 58 | #endif /* defined(__KVM_HAVE_IOAPIC) */ | 58 | #endif /* defined(__KVM_HAVE_IOAPIC) */ |
| 59 | |||
| 60 | #define KVM_TRACE_MMIO_READ_UNSATISFIED 0 | ||
| 61 | #define KVM_TRACE_MMIO_READ 1 | ||
| 62 | #define KVM_TRACE_MMIO_WRITE 2 | ||
| 63 | |||
| 64 | #define kvm_trace_symbol_mmio \ | ||
| 65 | { KVM_TRACE_MMIO_READ_UNSATISFIED, "unsatisfied-read" }, \ | ||
| 66 | { KVM_TRACE_MMIO_READ, "read" }, \ | ||
| 67 | { KVM_TRACE_MMIO_WRITE, "write" } | ||
| 68 | |||
| 69 | TRACE_EVENT(kvm_mmio, | ||
| 70 | TP_PROTO(int type, int len, u64 gpa, u64 val), | ||
| 71 | TP_ARGS(type, len, gpa, val), | ||
| 72 | |||
| 73 | TP_STRUCT__entry( | ||
| 74 | __field( u32, type ) | ||
| 75 | __field( u32, len ) | ||
| 76 | __field( u64, gpa ) | ||
| 77 | __field( u64, val ) | ||
| 78 | ), | ||
| 79 | |||
| 80 | TP_fast_assign( | ||
| 81 | __entry->type = type; | ||
| 82 | __entry->len = len; | ||
| 83 | __entry->gpa = gpa; | ||
| 84 | __entry->val = val; | ||
| 85 | ), | ||
| 86 | |||
| 87 | TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx", | ||
| 88 | __print_symbolic(__entry->type, kvm_trace_symbol_mmio), | ||
| 89 | __entry->len, __entry->gpa, __entry->val) | ||
| 90 | ); | ||
| 91 | |||
| 59 | #endif /* _TRACE_KVM_MAIN_H */ | 92 | #endif /* _TRACE_KVM_MAIN_H */ |
| 60 | 93 | ||
| 61 | /* This part must be outside protection */ | 94 | /* This part must be outside protection */ |
