Commit | Line | Data |
---|---|---|
46f43c6e MT |
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 | */ | |
14 | TRACE_EVENT(kvm_ppc_instr, | |
346b2762 AG |
15 | TP_PROTO(unsigned int inst, unsigned long _pc, unsigned int emulate), |
16 | TP_ARGS(inst, _pc, emulate), | |
46f43c6e MT |
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; | |
346b2762 | 26 | __entry->pc = _pc; |
46f43c6e MT |
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 | ||
34 | TRACE_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 | ||
49 | TRACE_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 | ||
75 | TRACE_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 | ||
6346046c AG |
101 | TRACE_EVENT(kvm_check_requests, |
102 | TP_PROTO(struct kvm_vcpu *vcpu), | |
103 | TP_ARGS(vcpu), | |
104 | ||
105 | TP_STRUCT__entry( | |
106 | __field( __u32, cpu_nr ) | |
107 | __field( __u32, requests ) | |
108 | ), | |
109 | ||
110 | TP_fast_assign( | |
111 | __entry->cpu_nr = vcpu->vcpu_id; | |
112 | __entry->requests = vcpu->requests; | |
113 | ), | |
114 | ||
115 | TP_printk("vcpu=%x requests=%x", | |
116 | __entry->cpu_nr, __entry->requests) | |
117 | ); | |
118 | ||
46f43c6e MT |
119 | #endif /* _TRACE_KVM_H */ |
120 | ||
121 | /* This part must be outside protection */ | |
122 | #include <trace/define_trace.h> |