diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2010-11-01 04:59:39 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:28:57 -0500 |
commit | 0730388b97d20cc568c25b42b9a23b28959b481f (patch) | |
tree | 6e0cdedd190b73575314138f8b67ee064afa3ee2 /include/trace/events/kvm.h | |
parent | c9b263d2be9c535b410f6617710534f798bf0ff0 (diff) |
KVM: cleanup async_pf tracepoints
Use 'DECLARE_EVENT_CLASS' to cleanup async_pf tracepoints
Acked-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include/trace/events/kvm.h')
-rw-r--r-- | include/trace/events/kvm.h | 76 |
1 files changed, 35 insertions, 41 deletions
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index d94d6c312ca1..46e3cd8e197a 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
@@ -216,59 +216,71 @@ TRACE_EVENT(kvm_age_page, | |||
216 | ); | 216 | ); |
217 | 217 | ||
218 | #ifdef CONFIG_KVM_ASYNC_PF | 218 | #ifdef CONFIG_KVM_ASYNC_PF |
219 | TRACE_EVENT( | 219 | DECLARE_EVENT_CLASS(kvm_async_get_page_class, |
220 | kvm_try_async_get_page, | 220 | |
221 | TP_PROTO(u64 gva, u64 gfn), | 221 | TP_PROTO(u64 gva, u64 gfn), |
222 | |||
222 | TP_ARGS(gva, gfn), | 223 | TP_ARGS(gva, gfn), |
223 | 224 | ||
224 | TP_STRUCT__entry( | 225 | TP_STRUCT__entry( |
225 | __field(u64, gva) | 226 | __field(__u64, gva) |
226 | __field(u64, gfn) | 227 | __field(u64, gfn) |
227 | ), | 228 | ), |
228 | 229 | ||
229 | TP_fast_assign( | 230 | TP_fast_assign( |
230 | __entry->gva = gva; | 231 | __entry->gva = gva; |
231 | __entry->gfn = gfn; | 232 | __entry->gfn = gfn; |
232 | ), | 233 | ), |
233 | 234 | ||
234 | TP_printk("gva = %#llx, gfn = %#llx", __entry->gva, __entry->gfn) | 235 | TP_printk("gva = %#llx, gfn = %#llx", __entry->gva, __entry->gfn) |
235 | ); | 236 | ); |
236 | 237 | ||
237 | TRACE_EVENT( | 238 | DEFINE_EVENT(kvm_async_get_page_class, kvm_try_async_get_page, |
238 | kvm_async_pf_not_present, | 239 | |
240 | TP_PROTO(u64 gva, u64 gfn), | ||
241 | |||
242 | TP_ARGS(gva, gfn) | ||
243 | ); | ||
244 | |||
245 | DEFINE_EVENT(kvm_async_get_page_class, kvm_async_pf_doublefault, | ||
246 | |||
247 | TP_PROTO(u64 gva, u64 gfn), | ||
248 | |||
249 | TP_ARGS(gva, gfn) | ||
250 | ); | ||
251 | |||
252 | DECLARE_EVENT_CLASS(kvm_async_pf_nopresent_ready, | ||
253 | |||
239 | TP_PROTO(u64 token, u64 gva), | 254 | TP_PROTO(u64 token, u64 gva), |
255 | |||
240 | TP_ARGS(token, gva), | 256 | TP_ARGS(token, gva), |
241 | 257 | ||
242 | TP_STRUCT__entry( | 258 | TP_STRUCT__entry( |
243 | __field(__u64, token) | 259 | __field(__u64, token) |
244 | __field(__u64, gva) | 260 | __field(__u64, gva) |
245 | ), | 261 | ), |
246 | 262 | ||
247 | TP_fast_assign( | 263 | TP_fast_assign( |
248 | __entry->token = token; | 264 | __entry->token = token; |
249 | __entry->gva = gva; | 265 | __entry->gva = gva; |
250 | ), | 266 | ), |
267 | |||
268 | TP_printk("token %#llx gva %#llx", __entry->token, __entry->gva) | ||
251 | 269 | ||
252 | TP_printk("token %#llx gva %#llx not present", __entry->token, | ||
253 | __entry->gva) | ||
254 | ); | 270 | ); |
255 | 271 | ||
256 | TRACE_EVENT( | 272 | DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_not_present, |
257 | kvm_async_pf_ready, | 273 | |
258 | TP_PROTO(u64 token, u64 gva), | 274 | TP_PROTO(u64 token, u64 gva), |
259 | TP_ARGS(token, gva), | ||
260 | 275 | ||
261 | TP_STRUCT__entry( | 276 | TP_ARGS(token, gva) |
262 | __field(__u64, token) | 277 | ); |
263 | __field(__u64, gva) | ||
264 | ), | ||
265 | 278 | ||
266 | TP_fast_assign( | 279 | DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_ready, |
267 | __entry->token = token; | 280 | |
268 | __entry->gva = gva; | 281 | TP_PROTO(u64 token, u64 gva), |
269 | ), | ||
270 | 282 | ||
271 | TP_printk("token %#llx gva %#llx ready", __entry->token, __entry->gva) | 283 | TP_ARGS(token, gva) |
272 | ); | 284 | ); |
273 | 285 | ||
274 | TRACE_EVENT( | 286 | TRACE_EVENT( |
@@ -292,24 +304,6 @@ TRACE_EVENT( | |||
292 | __entry->address, __entry->pfn) | 304 | __entry->address, __entry->pfn) |
293 | ); | 305 | ); |
294 | 306 | ||
295 | TRACE_EVENT( | ||
296 | kvm_async_pf_doublefault, | ||
297 | TP_PROTO(u64 gva, u64 gfn), | ||
298 | TP_ARGS(gva, gfn), | ||
299 | |||
300 | TP_STRUCT__entry( | ||
301 | __field(u64, gva) | ||
302 | __field(u64, gfn) | ||
303 | ), | ||
304 | |||
305 | TP_fast_assign( | ||
306 | __entry->gva = gva; | ||
307 | __entry->gfn = gfn; | ||
308 | ), | ||
309 | |||
310 | TP_printk("gva = %#llx, gfn = %#llx", __entry->gva, __entry->gfn) | ||
311 | ); | ||
312 | |||
313 | #endif | 307 | #endif |
314 | 308 | ||
315 | #endif /* _TRACE_KVM_MAIN_H */ | 309 | #endif /* _TRACE_KVM_MAIN_H */ |