KVM: cleanup kvm trace
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Wed, 10 Mar 2010 11:00:43 +0000 (19:00 +0800)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:15:22 +0000 (12:15 +0300)
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: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/mmu.c
arch/x86/kvm/mmutrace.h
arch/x86/kvm/trace.h
arch/x86/kvm/x86.c
include/trace/events/kvm.h
virt/kvm/kvm_main.c

index 19a8906bcaa2c5301dddf55821078248a85e23a7..3af2dfd8778e40e2068d2224a15a736f951990a6 100644 (file)
@@ -148,7 +148,6 @@ module_param(oos_shadow, bool, 0644);
 
 #include <trace/events/kvm.h>
 
-#undef TRACE_INCLUDE_FILE
 #define CREATE_TRACE_POINTS
 #include "mmutrace.h"
 
index 3e4a5c6ca2a9df76f82273918513f24db621d6aa..1fe956ab76171e1e27fb86f1089d81dca7a0af66 100644 (file)
@@ -6,8 +6,6 @@
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM kvmmmu
-#define TRACE_INCLUDE_PATH .
-#define TRACE_INCLUDE_FILE mmutrace
 
 #define KVM_MMU_PAGE_FIELDS \
        __field(__u64, gfn) \
@@ -216,5 +214,10 @@ TRACE_EVENT(
 
 #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 */
 #include <trace/define_trace.h>
index 17b52ccd977411fc04e102a836775c5a504dc2f9..b75efef79e56e187f0ca3aa0f43dd22aea9a85c3 100644 (file)
@@ -5,8 +5,6 @@
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM kvm
-#define TRACE_INCLUDE_PATH arch/x86/kvm
-#define TRACE_INCLUDE_FILE trace
 
 /*
  * Tracepoint for guest mode entry.
@@ -575,5 +573,10 @@ TRACE_EVENT(kvm_skinit,
 
 #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 */
 #include <trace/define_trace.h>
index 2b34dc705cfb2b51d9b94aa59de37a34953427c9..74e70d975ffad0e3de822d2f1c8fa5b7f2a2f62d 100644 (file)
@@ -41,7 +41,7 @@
 #include <linux/srcu.h>
 #include <linux/slab.h>
 #include <trace/events/kvm.h>
-#undef TRACE_INCLUDE_FILE
+
 #define CREATE_TRACE_POINTS
 #include "trace.h"
 
index b17d49dfc3ef7dc55946726d432162f1f5b0501d..6dd3a51ab1cb2e09a092434ebe3aa545d69124dc 100644 (file)
@@ -5,7 +5,6 @@
 
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM kvm
-#define TRACE_INCLUDE_FILE kvm
 
 #if defined(__KVM_HAVE_IOAPIC)
 TRACE_EVENT(kvm_set_irq,
index 5bac6eb0f0a9b4a9ac00e3a6fb5a953d77386d6d..b152b23cd09564d2f056fc5a1237a25e1428d2c0 100644 (file)
@@ -2279,7 +2279,6 @@ EXPORT_SYMBOL_GPL(kvm_init);
 
 void kvm_exit(void)
 {
-       tracepoint_synchronize_unregister();
        kvm_exit_debug();
        misc_deregister(&kvm_dev);
        kmem_cache_destroy(kvm_vcpu_cache);