2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-16 17:23:55 +08:00

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>
This commit is contained in:
Xiao Guangrong 2010-11-01 16:59:39 +08:00 committed by Avi Kivity
parent c9b263d2be
commit 0730388b97

View File

@ -216,59 +216,71 @@ TRACE_EVENT(kvm_age_page,
); );
#ifdef CONFIG_KVM_ASYNC_PF #ifdef CONFIG_KVM_ASYNC_PF
TRACE_EVENT( DECLARE_EVENT_CLASS(kvm_async_get_page_class,
kvm_try_async_get_page,
TP_PROTO(u64 gva, u64 gfn), TP_PROTO(u64 gva, u64 gfn),
TP_ARGS(gva, gfn), TP_ARGS(gva, gfn),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(u64, gva) __field(__u64, gva)
__field(u64, gfn) __field(u64, gfn)
), ),
TP_fast_assign( TP_fast_assign(
__entry->gva = gva; __entry->gva = gva;
__entry->gfn = gfn; __entry->gfn = gfn;
), ),
TP_printk("gva = %#llx, gfn = %#llx", __entry->gva, __entry->gfn) TP_printk("gva = %#llx, gfn = %#llx", __entry->gva, __entry->gfn)
); );
TRACE_EVENT( DEFINE_EVENT(kvm_async_get_page_class, kvm_try_async_get_page,
kvm_async_pf_not_present,
TP_PROTO(u64 token, u64 gva),
TP_ARGS(token, gva),
TP_STRUCT__entry( TP_PROTO(u64 gva, u64 gfn),
__field(__u64, token)
__field(__u64, gva)
),
TP_fast_assign( TP_ARGS(gva, gfn)
__entry->token = token;
__entry->gva = gva;
),
TP_printk("token %#llx gva %#llx not present", __entry->token,
__entry->gva)
); );
TRACE_EVENT( DEFINE_EVENT(kvm_async_get_page_class, kvm_async_pf_doublefault,
kvm_async_pf_ready,
TP_PROTO(u64 gva, u64 gfn),
TP_ARGS(gva, gfn)
);
DECLARE_EVENT_CLASS(kvm_async_pf_nopresent_ready,
TP_PROTO(u64 token, u64 gva), TP_PROTO(u64 token, u64 gva),
TP_ARGS(token, gva), TP_ARGS(token, gva),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(__u64, token) __field(__u64, token)
__field(__u64, gva) __field(__u64, gva)
), ),
TP_fast_assign( TP_fast_assign(
__entry->token = token; __entry->token = token;
__entry->gva = gva; __entry->gva = gva;
), ),
TP_printk("token %#llx gva %#llx ready", __entry->token, __entry->gva) TP_printk("token %#llx gva %#llx", __entry->token, __entry->gva)
);
DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_not_present,
TP_PROTO(u64 token, u64 gva),
TP_ARGS(token, gva)
);
DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_ready,
TP_PROTO(u64 token, u64 gva),
TP_ARGS(token, gva)
); );
TRACE_EVENT( TRACE_EVENT(
@ -292,24 +304,6 @@ TRACE_EVENT(
__entry->address, __entry->pfn) __entry->address, __entry->pfn)
); );
TRACE_EVENT(
kvm_async_pf_doublefault,
TP_PROTO(u64 gva, u64 gfn),
TP_ARGS(gva, gfn),
TP_STRUCT__entry(
__field(u64, gva)
__field(u64, gfn)
),
TP_fast_assign(
__entry->gva = gva;
__entry->gfn = gfn;
),
TP_printk("gva = %#llx, gfn = %#llx", __entry->gva, __entry->gfn)
);
#endif #endif
#endif /* _TRACE_KVM_MAIN_H */ #endif /* _TRACE_KVM_MAIN_H */