diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/xen.h | 13 | ||||
-rw-r--r-- | include/trace/trace_events.h | 26 |
2 files changed, 32 insertions, 7 deletions
diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h index 31acce9019a6..b70a38b7fa84 100644 --- a/include/trace/events/xen.h +++ b/include/trace/events/xen.h @@ -30,6 +30,8 @@ DECLARE_EVENT_CLASS(xen_mc__batch, DEFINE_XEN_MC_BATCH(xen_mc_batch); DEFINE_XEN_MC_BATCH(xen_mc_issue); +TRACE_DEFINE_SIZEOF(ulong); + TRACE_EVENT(xen_mc_entry, TP_PROTO(struct multicall_entry *mc, unsigned nargs), TP_ARGS(mc, nargs), @@ -40,8 +42,8 @@ TRACE_EVENT(xen_mc_entry, ), TP_fast_assign(__entry->op = mc->op; __entry->nargs = nargs; - memcpy(__entry->args, mc->args, sizeof(unsigned long) * nargs); - memset(__entry->args + nargs, 0, sizeof(unsigned long) * (6 - nargs)); + memcpy(__entry->args, mc->args, sizeof(ulong) * nargs); + memset(__entry->args + nargs, 0, sizeof(ulong) * (6 - nargs)); ), TP_printk("op %u%s args [%lx, %lx, %lx, %lx, %lx, %lx]", __entry->op, xen_hypercall_name(__entry->op), @@ -122,6 +124,7 @@ TRACE_EVENT(xen_mc_extend_args, __entry->res == XEN_MC_XE_NO_SPACE ? "NO_SPACE" : "???") ); +TRACE_DEFINE_SIZEOF(pteval_t); /* mmu */ DECLARE_EVENT_CLASS(xen_mmu__set_pte, TP_PROTO(pte_t *ptep, pte_t pteval), @@ -199,6 +202,8 @@ TRACE_EVENT(xen_mmu_pte_clear, __entry->mm, __entry->addr, __entry->ptep) ); +TRACE_DEFINE_SIZEOF(pmdval_t); + TRACE_EVENT(xen_mmu_set_pmd, TP_PROTO(pmd_t *pmdp, pmd_t pmdval), TP_ARGS(pmdp, pmdval), @@ -226,6 +231,8 @@ TRACE_EVENT(xen_mmu_pmd_clear, #if CONFIG_PGTABLE_LEVELS >= 4 +TRACE_DEFINE_SIZEOF(pudval_t); + TRACE_EVENT(xen_mmu_set_pud, TP_PROTO(pud_t *pudp, pud_t pudval), TP_ARGS(pudp, pudval), @@ -241,6 +248,8 @@ TRACE_EVENT(xen_mmu_set_pud, (int)sizeof(pudval_t) * 2, (unsigned long long)__entry->pudval) ); +TRACE_DEFINE_SIZEOF(p4dval_t); + TRACE_EVENT(xen_mmu_set_p4d, TP_PROTO(p4d_t *p4dp, p4d_t *user_p4dp, p4d_t p4dval), TP_ARGS(p4dp, user_p4dp, p4dval), diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h index 00f643164ca2..3976fa1f6e42 100644 --- a/include/trace/trace_events.h +++ b/include/trace/trace_events.h @@ -35,15 +35,28 @@ TRACE_MAKE_SYSTEM_STR(); #undef TRACE_DEFINE_ENUM #define TRACE_DEFINE_ENUM(a) \ - static struct trace_enum_map __used __initdata \ + static struct trace_eval_map __used __initdata \ __##TRACE_SYSTEM##_##a = \ { \ .system = TRACE_SYSTEM_STRING, \ - .enum_string = #a, \ - .enum_value = a \ + .eval_string = #a, \ + .eval_value = a \ }; \ - static struct trace_enum_map __used \ - __attribute__((section("_ftrace_enum_map"))) \ + static struct trace_eval_map __used \ + __attribute__((section("_ftrace_eval_map"))) \ + *TRACE_SYSTEM##_##a = &__##TRACE_SYSTEM##_##a + +#undef TRACE_DEFINE_SIZEOF +#define TRACE_DEFINE_SIZEOF(a) \ + static struct trace_eval_map __used __initdata \ + __##TRACE_SYSTEM##_##a = \ + { \ + .system = TRACE_SYSTEM_STRING, \ + .eval_string = "sizeof(" #a ")", \ + .eval_value = sizeof(a) \ + }; \ + static struct trace_eval_map __used \ + __attribute__((section("_ftrace_eval_map"))) \ *TRACE_SYSTEM##_##a = &__##TRACE_SYSTEM##_##a /* @@ -158,6 +171,9 @@ TRACE_MAKE_SYSTEM_STR(); #undef TRACE_DEFINE_ENUM #define TRACE_DEFINE_ENUM(a) +#undef TRACE_DEFINE_SIZEOF +#define TRACE_DEFINE_SIZEOF(a) + #undef __field #define __field(type, item) |