aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/kvm.h
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2009-06-17 08:22:14 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:32:59 -0400
commit229456fc34b1c9031b04f7581e7b755d1cebfe9c (patch)
tree85fc0b54e9403d6ea059b8f7f78cea49594aaace /include/trace/events/kvm.h
parent219b65dcf6c0bad83d51bfa12e25891c02de2414 (diff)
KVM: convert custom marker based tracing to event traces
This allows use of the powerful ftrace infrastructure. See Documentation/trace/ for usage information. [avi, stephen: various build fixes] [sheng: fix control register breakage] Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/trace/events/kvm.h')
-rw-r--r--include/trace/events/kvm.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
new file mode 100644
index 000000000000..d74b23d803f1
--- /dev/null
+++ b/include/trace/events/kvm.h
@@ -0,0 +1,57 @@
1#if !defined(_TRACE_KVM_MAIN_H) || defined(TRACE_HEADER_MULTI_READ)
2#define _TRACE_KVM_MAIN_H
3
4#include <linux/tracepoint.h>
5
6#undef TRACE_SYSTEM
7#define TRACE_SYSTEM kvm
8#define TRACE_INCLUDE_FILE kvm
9
10#if defined(__KVM_HAVE_IOAPIC)
11TRACE_EVENT(kvm_set_irq,
12 TP_PROTO(unsigned int gsi),
13 TP_ARGS(gsi),
14
15 TP_STRUCT__entry(
16 __field( unsigned int, gsi )
17 ),
18
19 TP_fast_assign(
20 __entry->gsi = gsi;
21 ),
22
23 TP_printk("gsi %u", __entry->gsi)
24);
25
26
27#define kvm_irqchips \
28 {KVM_IRQCHIP_PIC_MASTER, "PIC master"}, \
29 {KVM_IRQCHIP_PIC_SLAVE, "PIC slave"}, \
30 {KVM_IRQCHIP_IOAPIC, "IOAPIC"}
31
32TRACE_EVENT(kvm_ack_irq,
33 TP_PROTO(unsigned int irqchip, unsigned int pin),
34 TP_ARGS(irqchip, pin),
35
36 TP_STRUCT__entry(
37 __field( unsigned int, irqchip )
38 __field( unsigned int, pin )
39 ),
40
41 TP_fast_assign(
42 __entry->irqchip = irqchip;
43 __entry->pin = pin;
44 ),
45
46 TP_printk("irqchip %s pin %u",
47 __print_symbolic(__entry->irqchip, kvm_irqchips),
48 __entry->pin)
49);
50
51
52
53#endif /* defined(__KVM_HAVE_IOAPIC) */
54#endif /* _TRACE_KVM_MAIN_H */
55
56/* This part must be outside protection */
57#include <trace/define_trace.h>