Commit 2ed152af authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Avi Kivity

KVM: cleanup kvm trace

This patch does:

 - no need call tracepoint_synchronize_unregister() when kvm module
   is unloaded since ftrace can handle it

 - cleanup ftrace's macro
Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 06056bfb
...@@ -148,7 +148,6 @@ module_param(oos_shadow, bool, 0644); ...@@ -148,7 +148,6 @@ module_param(oos_shadow, bool, 0644);
#include <trace/events/kvm.h> #include <trace/events/kvm.h>
#undef TRACE_INCLUDE_FILE
#define CREATE_TRACE_POINTS #define CREATE_TRACE_POINTS
#include "mmutrace.h" #include "mmutrace.h"
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
#undef TRACE_SYSTEM #undef TRACE_SYSTEM
#define TRACE_SYSTEM kvmmmu #define TRACE_SYSTEM kvmmmu
#define TRACE_INCLUDE_PATH .
#define TRACE_INCLUDE_FILE mmutrace
#define KVM_MMU_PAGE_FIELDS \ #define KVM_MMU_PAGE_FIELDS \
__field(__u64, gfn) \ __field(__u64, gfn) \
...@@ -216,5 +214,10 @@ TRACE_EVENT( ...@@ -216,5 +214,10 @@ TRACE_EVENT(
#endif /* _TRACE_KVMMMU_H */ #endif /* _TRACE_KVMMMU_H */
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE mmutrace
/* This part must be outside protection */ /* This part must be outside protection */
#include <trace/define_trace.h> #include <trace/define_trace.h>
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
#undef TRACE_SYSTEM #undef TRACE_SYSTEM
#define TRACE_SYSTEM kvm #define TRACE_SYSTEM kvm
#define TRACE_INCLUDE_PATH arch/x86/kvm
#define TRACE_INCLUDE_FILE trace
/* /*
* Tracepoint for guest mode entry. * Tracepoint for guest mode entry.
...@@ -575,5 +573,10 @@ TRACE_EVENT(kvm_skinit, ...@@ -575,5 +573,10 @@ TRACE_EVENT(kvm_skinit,
#endif /* _TRACE_KVM_H */ #endif /* _TRACE_KVM_H */
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH arch/x86/kvm
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE trace
/* This part must be outside protection */ /* This part must be outside protection */
#include <trace/define_trace.h> #include <trace/define_trace.h>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include <linux/srcu.h> #include <linux/srcu.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <trace/events/kvm.h> #include <trace/events/kvm.h>
#undef TRACE_INCLUDE_FILE
#define CREATE_TRACE_POINTS #define CREATE_TRACE_POINTS
#include "trace.h" #include "trace.h"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#undef TRACE_SYSTEM #undef TRACE_SYSTEM
#define TRACE_SYSTEM kvm #define TRACE_SYSTEM kvm
#define TRACE_INCLUDE_FILE kvm
#if defined(__KVM_HAVE_IOAPIC) #if defined(__KVM_HAVE_IOAPIC)
TRACE_EVENT(kvm_set_irq, TRACE_EVENT(kvm_set_irq,
......
...@@ -2279,7 +2279,6 @@ EXPORT_SYMBOL_GPL(kvm_init); ...@@ -2279,7 +2279,6 @@ EXPORT_SYMBOL_GPL(kvm_init);
void kvm_exit(void) void kvm_exit(void)
{ {
tracepoint_synchronize_unregister();
kvm_exit_debug(); kvm_exit_debug();
misc_deregister(&kvm_dev); misc_deregister(&kvm_dev);
kmem_cache_destroy(kvm_vcpu_cache); kmem_cache_destroy(kvm_vcpu_cache);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment