]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
xen/trace: use class for multicall trace
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Tue, 21 Jun 2011 00:52:13 +0000 (17:52 -0700)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Mon, 18 Jul 2011 22:43:46 +0000 (15:43 -0700)
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
include/trace/events/xen.h

index 147eb6ffc13cff3ae6e05b269ac8a93bc8f13040..44d8decee09e65990cde0a9ecac01f0451a77fed 100644 (file)
@@ -9,8 +9,7 @@
 #include <asm/xen/trace_types.h>
 
 /* Multicalls */
-
-TRACE_EVENT(xen_mc_batch,
+DECLARE_EVENT_CLASS(xen_mc__batch,
            TP_PROTO(enum paravirt_lazy_mode mode),
            TP_ARGS(mode),
            TP_STRUCT__entry(
@@ -21,18 +20,13 @@ TRACE_EVENT(xen_mc_batch,
                      (__entry->mode == PARAVIRT_LAZY_MMU) ? "MMU" :
                      (__entry->mode == PARAVIRT_LAZY_CPU) ? "CPU" : "NONE")
        );
+#define DEFINE_XEN_MC_BATCH(name)                      \
+       DEFINE_EVENT(xen_mc__batch, name,               \
+               TP_PROTO(enum paravirt_lazy_mode mode), \
+                    TP_ARGS(mode))
 
-TRACE_EVENT(xen_mc_issue,
-           TP_PROTO(enum paravirt_lazy_mode mode),
-           TP_ARGS(mode),
-           TP_STRUCT__entry(
-                   __field(enum paravirt_lazy_mode, mode)
-                   ),
-           TP_fast_assign(__entry->mode = mode),
-           TP_printk("issue mode LAZY_%s",
-                     (__entry->mode == PARAVIRT_LAZY_MMU) ? "MMU" :
-                     (__entry->mode == PARAVIRT_LAZY_CPU) ? "CPU" : "NONE")
-       );
+DEFINE_XEN_MC_BATCH(xen_mc_batch);
+DEFINE_XEN_MC_BATCH(xen_mc_issue);
 
 TRACE_EVENT(xen_mc_entry,
            TP_PROTO(struct multicall_entry *mc, unsigned nargs),