diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2011-06-20 20:48:40 -0400 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2011-07-18 18:43:46 -0400 |
commit | c43ed60cbf3bd7d4bd6603258429361cffa09547 (patch) | |
tree | 746e24363e80741167b1e878c1243be2446e8c19 /include/trace | |
parent | 2a6f6d095509c7dc6e9ff8d9fd9fba0b730ecce3 (diff) |
xen/trace: convert mmu events to use DECLARE_EVENT_CLASS()/DEFINE_EVENT()
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/xen.h | 70 |
1 files changed, 23 insertions, 47 deletions
diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h index 1f71f2297c00..147eb6ffc13c 100644 --- a/include/trace/events/xen.h +++ b/include/trace/events/xen.h | |||
@@ -127,7 +127,7 @@ TRACE_EVENT(xen_mc_extend_args, | |||
127 | ); | 127 | ); |
128 | 128 | ||
129 | /* mmu */ | 129 | /* mmu */ |
130 | TRACE_EVENT(xen_mmu_set_pte, | 130 | DECLARE_EVENT_CLASS(xen_mmu__set_pte, |
131 | TP_PROTO(pte_t *ptep, pte_t pteval), | 131 | TP_PROTO(pte_t *ptep, pte_t pteval), |
132 | TP_ARGS(ptep, pteval), | 132 | TP_ARGS(ptep, pteval), |
133 | TP_STRUCT__entry( | 133 | TP_STRUCT__entry( |
@@ -142,20 +142,13 @@ TRACE_EVENT(xen_mmu_set_pte, | |||
142 | (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval) | 142 | (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval) |
143 | ); | 143 | ); |
144 | 144 | ||
145 | TRACE_EVENT(xen_mmu_set_pte_atomic, | 145 | #define DEFINE_XEN_MMU_SET_PTE(name) \ |
146 | TP_PROTO(pte_t *ptep, pte_t pteval), | 146 | DEFINE_EVENT(xen_mmu__set_pte, name, \ |
147 | TP_ARGS(ptep, pteval), | 147 | TP_PROTO(pte_t *ptep, pte_t pteval), \ |
148 | TP_STRUCT__entry( | 148 | TP_ARGS(ptep, pteval)) |
149 | __field(pte_t *, ptep) | 149 | |
150 | __field(pteval_t, pteval) | 150 | DEFINE_XEN_MMU_SET_PTE(xen_mmu_set_pte); |
151 | ), | 151 | DEFINE_XEN_MMU_SET_PTE(xen_mmu_set_pte_atomic); |
152 | TP_fast_assign(__entry->ptep = ptep; | ||
153 | __entry->pteval = pteval.pte), | ||
154 | TP_printk("ptep %p pteval %0*llx (raw %0*llx)", | ||
155 | __entry->ptep, | ||
156 | (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)), | ||
157 | (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval) | ||
158 | ); | ||
159 | 152 | ||
160 | TRACE_EVENT(xen_mmu_set_domain_pte, | 153 | TRACE_EVENT(xen_mmu_set_domain_pte, |
161 | TP_PROTO(pte_t *ptep, pte_t pteval, unsigned domid), | 154 | TP_PROTO(pte_t *ptep, pte_t pteval, unsigned domid), |
@@ -307,7 +300,7 @@ TRACE_EVENT(xen_mmu_pgd_clear, | |||
307 | TP_printk("pgdp %p", __entry->pgdp) | 300 | TP_printk("pgdp %p", __entry->pgdp) |
308 | ); | 301 | ); |
309 | 302 | ||
310 | TRACE_EVENT(xen_mmu_ptep_modify_prot_start, | 303 | DECLARE_EVENT_CLASS(xen_mmu_ptep_modify_prot, |
311 | TP_PROTO(struct mm_struct *mm, unsigned long addr, | 304 | TP_PROTO(struct mm_struct *mm, unsigned long addr, |
312 | pte_t *ptep, pte_t pteval), | 305 | pte_t *ptep, pte_t pteval), |
313 | TP_ARGS(mm, addr, ptep, pteval), | 306 | TP_ARGS(mm, addr, ptep, pteval), |
@@ -326,26 +319,14 @@ TRACE_EVENT(xen_mmu_ptep_modify_prot_start, | |||
326 | (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)), | 319 | (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)), |
327 | (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval) | 320 | (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval) |
328 | ); | 321 | ); |
322 | #define DEFINE_XEN_MMU_PTEP_MODIFY_PROT(name) \ | ||
323 | DEFINE_EVENT(xen_mmu_ptep_modify_prot, name, \ | ||
324 | TP_PROTO(struct mm_struct *mm, unsigned long addr, \ | ||
325 | pte_t *ptep, pte_t pteval), \ | ||
326 | TP_ARGS(mm, addr, ptep, pteval)) | ||
329 | 327 | ||
330 | TRACE_EVENT(xen_mmu_ptep_modify_prot_commit, | 328 | DEFINE_XEN_MMU_PTEP_MODIFY_PROT(xen_mmu_ptep_modify_prot_start); |
331 | TP_PROTO(struct mm_struct *mm, unsigned long addr, | 329 | DEFINE_XEN_MMU_PTEP_MODIFY_PROT(xen_mmu_ptep_modify_prot_commit); |
332 | pte_t *ptep, pte_t pteval), | ||
333 | TP_ARGS(mm, addr, ptep, pteval), | ||
334 | TP_STRUCT__entry( | ||
335 | __field(struct mm_struct *, mm) | ||
336 | __field(unsigned long, addr) | ||
337 | __field(pte_t *, ptep) | ||
338 | __field(pteval_t, pteval) | ||
339 | ), | ||
340 | TP_fast_assign(__entry->mm = mm; | ||
341 | __entry->addr = addr; | ||
342 | __entry->ptep = ptep; | ||
343 | __entry->pteval = pteval.pte), | ||
344 | TP_printk("mm %p addr %lx ptep %p pteval %0*llx (raw %0*llx)", | ||
345 | __entry->mm, __entry->addr, __entry->ptep, | ||
346 | (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)), | ||
347 | (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval) | ||
348 | ); | ||
349 | 330 | ||
350 | TRACE_EVENT(xen_mmu_alloc_ptpage, | 331 | TRACE_EVENT(xen_mmu_alloc_ptpage, |
351 | TP_PROTO(struct mm_struct *mm, unsigned long pfn, unsigned level, bool pinned), | 332 | TP_PROTO(struct mm_struct *mm, unsigned long pfn, unsigned level, bool pinned), |
@@ -381,7 +362,7 @@ TRACE_EVENT(xen_mmu_release_ptpage, | |||
381 | __entry->pinned ? "" : "un") | 362 | __entry->pinned ? "" : "un") |
382 | ); | 363 | ); |
383 | 364 | ||
384 | TRACE_EVENT(xen_mmu_pgd_pin, | 365 | DECLARE_EVENT_CLASS(xen_mmu_pgd, |
385 | TP_PROTO(struct mm_struct *mm, pgd_t *pgd), | 366 | TP_PROTO(struct mm_struct *mm, pgd_t *pgd), |
386 | TP_ARGS(mm, pgd), | 367 | TP_ARGS(mm, pgd), |
387 | TP_STRUCT__entry( | 368 | TP_STRUCT__entry( |
@@ -392,18 +373,13 @@ TRACE_EVENT(xen_mmu_pgd_pin, | |||
392 | __entry->pgd = pgd), | 373 | __entry->pgd = pgd), |
393 | TP_printk("mm %p pgd %p", __entry->mm, __entry->pgd) | 374 | TP_printk("mm %p pgd %p", __entry->mm, __entry->pgd) |
394 | ); | 375 | ); |
376 | #define DEFINE_XEN_MMU_PGD_EVENT(name) \ | ||
377 | DEFINE_EVENT(xen_mmu_pgd, name, \ | ||
378 | TP_PROTO(struct mm_struct *mm, pgd_t *pgd), \ | ||
379 | TP_ARGS(mm, pgd)) | ||
395 | 380 | ||
396 | TRACE_EVENT(xen_mmu_pgd_unpin, | 381 | DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_pin); |
397 | TP_PROTO(struct mm_struct *mm, pgd_t *pgd), | 382 | DEFINE_XEN_MMU_PGD_EVENT(xen_mmu_pgd_unpin); |
398 | TP_ARGS(mm, pgd), | ||
399 | TP_STRUCT__entry( | ||
400 | __field(struct mm_struct *, mm) | ||
401 | __field(pgd_t *, pgd) | ||
402 | ), | ||
403 | TP_fast_assign(__entry->mm = mm; | ||
404 | __entry->pgd = pgd), | ||
405 | TP_printk("mm %p pgd %p", __entry->mm, __entry->pgd) | ||
406 | ); | ||
407 | 383 | ||
408 | TRACE_EVENT(xen_mmu_flush_tlb, | 384 | TRACE_EVENT(xen_mmu_flush_tlb, |
409 | TP_PROTO(int x), | 385 | TP_PROTO(int x), |