aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kvm/trace.h')
-rw-r--r--arch/powerpc/kvm/trace.h104
1 files changed, 104 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/trace.h b/arch/powerpc/kvm/trace.h
new file mode 100644
index 000000000000..67f219de0455
--- /dev/null
+++ b/arch/powerpc/kvm/trace.h
@@ -0,0 +1,104 @@
1#if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ)
2#define _TRACE_KVM_H
3
4#include <linux/tracepoint.h>
5
6#undef TRACE_SYSTEM
7#define TRACE_SYSTEM kvm
8#define TRACE_INCLUDE_PATH .
9#define TRACE_INCLUDE_FILE trace
10
11/*
12 * Tracepoint for guest mode entry.
13 */
14TRACE_EVENT(kvm_ppc_instr,
15 TP_PROTO(unsigned int inst, unsigned long pc, unsigned int emulate),
16 TP_ARGS(inst, pc, emulate),
17
18 TP_STRUCT__entry(
19 __field( unsigned int, inst )
20 __field( unsigned long, pc )
21 __field( unsigned int, emulate )
22 ),
23
24 TP_fast_assign(
25 __entry->inst = inst;
26 __entry->pc = pc;
27 __entry->emulate = emulate;
28 ),
29
30 TP_printk("inst %u pc 0x%lx emulate %u\n",
31 __entry->inst, __entry->pc, __entry->emulate)
32);
33
34TRACE_EVENT(kvm_stlb_inval,
35 TP_PROTO(unsigned int stlb_index),
36 TP_ARGS(stlb_index),
37
38 TP_STRUCT__entry(
39 __field( unsigned int, stlb_index )
40 ),
41
42 TP_fast_assign(
43 __entry->stlb_index = stlb_index;
44 ),
45
46 TP_printk("stlb_index %u", __entry->stlb_index)
47);
48
49TRACE_EVENT(kvm_stlb_write,
50 TP_PROTO(unsigned int victim, unsigned int tid, unsigned int word0,
51 unsigned int word1, unsigned int word2),
52 TP_ARGS(victim, tid, word0, word1, word2),
53
54 TP_STRUCT__entry(
55 __field( unsigned int, victim )
56 __field( unsigned int, tid )
57 __field( unsigned int, word0 )
58 __field( unsigned int, word1 )
59 __field( unsigned int, word2 )
60 ),
61
62 TP_fast_assign(
63 __entry->victim = victim;
64 __entry->tid = tid;
65 __entry->word0 = word0;
66 __entry->word1 = word1;
67 __entry->word2 = word2;
68 ),
69
70 TP_printk("victim %u tid %u w0 %u w1 %u w2 %u",
71 __entry->victim, __entry->tid, __entry->word0,
72 __entry->word1, __entry->word2)
73);
74
75TRACE_EVENT(kvm_gtlb_write,
76 TP_PROTO(unsigned int gtlb_index, unsigned int tid, unsigned int word0,
77 unsigned int word1, unsigned int word2),
78 TP_ARGS(gtlb_index, tid, word0, word1, word2),
79
80 TP_STRUCT__entry(
81 __field( unsigned int, gtlb_index )
82 __field( unsigned int, tid )
83 __field( unsigned int, word0 )
84 __field( unsigned int, word1 )
85 __field( unsigned int, word2 )
86 ),
87
88 TP_fast_assign(
89 __entry->gtlb_index = gtlb_index;
90 __entry->tid = tid;
91 __entry->word0 = word0;
92 __entry->word1 = word1;
93 __entry->word2 = word2;
94 ),
95
96 TP_printk("gtlb_index %u tid %u w0 %u w1 %u w2 %u",
97 __entry->gtlb_index, __entry->tid, __entry->word0,
98 __entry->word1, __entry->word2)
99);
100
101#endif /* _TRACE_KVM_H */
102
103/* This part must be outside protection */
104#include <trace/define_trace.h>