Namespace all tracepoints
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 3 Nov 2014 20:54:13 +0000 (15:54 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 Apr 2015 20:40:07 +0000 (16:40 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
14 files changed:
instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h
instrumentation/events/lttng-module/btrfs.h
instrumentation/events/lttng-module/compaction.h
instrumentation/events/lttng-module/irq.h
instrumentation/events/lttng-module/kmem.h
instrumentation/events/lttng-module/mm_vmscan.h [new file with mode: 0644]
instrumentation/events/lttng-module/printk.h
instrumentation/events/lttng-module/regmap.h
instrumentation/events/lttng-module/rpc.h [new file with mode: 0644]
instrumentation/events/lttng-module/sunrpc.h [deleted file]
instrumentation/events/lttng-module/timer.h
instrumentation/events/lttng-module/vmscan.h [deleted file]
probes/lttng-probe-sunrpc.c
probes/lttng-probe-vmscan.c

index 2b71d44136b9d699e3c5a71d5d5791f627723d66..a76f059ccdd50e4d8fd128b10b4a9e9203273ff4 100644 (file)
@@ -1,11 +1,11 @@
-#if !defined(LTTNG_TRACE_KVMMMU_H) || defined(TRACE_HEADER_MULTI_READ)
-#define LTTNG_TRACE_KVMMMU_H
+#if !defined(LTTNG_TRACE_KVM_MMU_H) || defined(TRACE_HEADER_MULTI_READ)
+#define LTTNG_TRACE_KVM_MMU_H
 
 #include "../../../../../../probes/lttng-tracepoint-event.h"
 #include <linux/ftrace_event.h>
 
 #undef TRACE_SYSTEM
-#define TRACE_SYSTEM kvmmmu
+#define TRACE_SYSTEM kvm_mmu
 
 #define KVM_MMU_PAGE_FIELDS \
        __field(__u64, gfn) \
@@ -195,8 +195,11 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kvm_mmu_page_class, kvm_mmu_prepare_zap_page,
        TP_ARGS(sp)
 )
 
-LTTNG_TRACEPOINT_EVENT(
+LTTNG_TRACEPOINT_EVENT_MAP(
        mark_mmio_spte,
+
+       kvm_mmu_mark_mmio_spte,
+
        TP_PROTO(u64 *sptep, gfn_t gfn, unsigned access),
        TP_ARGS(sptep, gfn, access),
 
@@ -216,8 +219,11 @@ LTTNG_TRACEPOINT_EVENT(
                  __entry->access)
 )
 
-LTTNG_TRACEPOINT_EVENT(
+LTTNG_TRACEPOINT_EVENT_MAP(
        handle_mmio_page_fault,
+
+       kvm_mmu_handle_mmio_page_fault,
+
        TP_PROTO(u64 addr, gfn_t gfn, unsigned access),
        TP_ARGS(addr, gfn, access),
 
@@ -240,8 +246,11 @@ LTTNG_TRACEPOINT_EVENT(
 #define __spte_satisfied(__spte)                               \
        (__entry->retry && is_writable_pte(__entry->__spte))
 
-LTTNG_TRACEPOINT_EVENT(
+LTTNG_TRACEPOINT_EVENT_MAP(
        fast_page_fault,
+
+       kvm_mmu_fast_page_fault,
+
        TP_PROTO(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code,
                 u64 *sptep, u64 old_spte, bool retry),
        TP_ARGS(vcpu, gva, error_code, sptep, old_spte, retry),
@@ -274,7 +283,7 @@ LTTNG_TRACEPOINT_EVENT(
                  __spte_satisfied(old_spte), __spte_satisfied(new_spte)
        )
 )
-#endif /* LTTNG_TRACE_KVMMMU_H */
+#endif /* LTTNG_TRACE_KVM_MMU_H */
 
 #undef TRACE_INCLUDE_PATH
 #define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module/arch/x86/kvm
index 24be361918285438bf3a8d3d5c91b1f45fa083f8..3aee30be8e51de247c77fbea4cc2dd3229a412f2 100644 (file)
@@ -505,7 +505,11 @@ LTTNG_TRACEPOINT_EVENT_CLASS(btrfs__writepage,
 #endif
 )
 
-LTTNG_TRACEPOINT_EVENT_INSTANCE(btrfs__writepage, __extent_writepage,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(btrfs__writepage,
+
+       __extent_writepage,
+
+       btrfs__extent_writepage,
 
        TP_PROTO(struct page *page, struct inode *inode,
                 struct writeback_control *wbc),
index 7914e234c471631fe927ef9ec9c301aa22e2c2e3..992b5be500e3ce1f94cc2d5745d46530168d9500 100644 (file)
@@ -11,7 +11,7 @@
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
 
-LTTNG_TRACEPOINT_EVENT_CLASS(mm_compaction_isolate_template,
+LTTNG_TRACEPOINT_EVENT_CLASS(compaction_isolate_template,
 
        TP_PROTO(unsigned long start_pfn,
                unsigned long end_pfn,
@@ -41,7 +41,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(mm_compaction_isolate_template,
                __entry->nr_taken)
 )
 
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_compaction_isolate_template, mm_compaction_isolate_migratepages,
+LTTNG_TRACEPOINT_EVENT_INSTANCE(compaction_isolate_template, mm_compaction_isolate_migratepages,
 
        TP_PROTO(unsigned long start_pfn,
                unsigned long end_pfn,
@@ -51,7 +51,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_compaction_isolate_template, mm_compaction_is
        TP_ARGS(start_pfn, end_pfn, nr_scanned, nr_taken)
 )
 
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_compaction_isolate_template, mm_compaction_isolate_freepages,
+LTTNG_TRACEPOINT_EVENT_INSTANCE(compaction_isolate_template, mm_compaction_isolate_freepages,
 
        TP_PROTO(unsigned long start_pfn,
                unsigned long end_pfn,
@@ -63,7 +63,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_compaction_isolate_template, mm_compaction_is
 
 #else /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) */
 
-LTTNG_TRACEPOINT_EVENT_CLASS(mm_compaction_isolate_template,
+LTTNG_TRACEPOINT_EVENT_CLASS(compaction_isolate_template,
 
        TP_PROTO(unsigned long nr_scanned,
                unsigned long nr_taken),
@@ -85,7 +85,11 @@ LTTNG_TRACEPOINT_EVENT_CLASS(mm_compaction_isolate_template,
                __entry->nr_taken)
 )
 
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_compaction_isolate_template, mm_compaction_isolate_migratepages,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template,
+
+       mm_compaction_isolate_migratepages,
+
+       compaction_isolate_migratepages,
 
        TP_PROTO(unsigned long nr_scanned,
                unsigned long nr_taken),
@@ -93,7 +97,12 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_compaction_isolate_template, mm_compaction_is
        TP_ARGS(nr_scanned, nr_taken)
 )
 
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_compaction_isolate_template, mm_compaction_isolate_freepages,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(compaction_isolate_template,
+
+       mm_compaction_isolate_freepages,
+
+       compaction_isolate_freepages,
+
        TP_PROTO(unsigned long nr_scanned,
                unsigned long nr_taken),
 
@@ -105,7 +114,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_compaction_isolate_template, mm_compaction_is
 #if LTTNG_KERNEL_RANGE(3,12,30, 3,13,0) || \
        LTTNG_KERNEL_RANGE(3,14,25, 3,15,0) || \
        (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
-LTTNG_TRACEPOINT_EVENT(mm_compaction_migratepages,
+LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages,
+
+       compaction_migratepages,
 
        TP_PROTO(unsigned long nr_all,
                int migrate_rc,
@@ -146,7 +157,9 @@ LTTNG_TRACEPOINT_EVENT(mm_compaction_migratepages,
                __entry->nr_failed)
 )
 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
-LTTNG_TRACEPOINT_EVENT(mm_compaction_migratepages,
+LTTNG_TRACEPOINT_EVENT_MAP(mm_compaction_migratepages,
+
+       compaction_migratepages,
 
        TP_PROTO(unsigned long nr_migrated,
                unsigned long nr_failed),
index 8517414bde017d245d1bced5729852f31656e826..3b3a8ce75fa13489c15deb59cb609363eab5eb37 100644 (file)
@@ -90,7 +90,7 @@ LTTNG_TRACEPOINT_EVENT(irq_handler_exit,
 )
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
-LTTNG_TRACEPOINT_EVENT_CLASS(softirq,
+LTTNG_TRACEPOINT_EVENT_CLASS(irq_softirq,
 
        TP_PROTO(unsigned int vec_nr),
 
@@ -115,7 +115,9 @@ LTTNG_TRACEPOINT_EVENT_CLASS(softirq,
  * When used in combination with the softirq_exit tracepoint
  * we can determine the softirq handler runtine.
  */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_entry,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_entry,
+
+       irq_softirq_entry,
 
        TP_PROTO(unsigned int vec_nr),
 
@@ -129,7 +131,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_entry,
  * When used in combination with the softirq_entry tracepoint
  * we can determine the softirq handler runtine.
  */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_exit,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_exit,
+
+       irq_softirq_exit,
 
        TP_PROTO(unsigned int vec_nr),
 
@@ -143,14 +147,16 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_exit,
  * When used in combination with the softirq_entry tracepoint
  * we can determine the softirq raise to run latency.
  */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_raise,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_raise,
+
+       irq_softirq_raise,
 
        TP_PROTO(unsigned int vec_nr),
 
        TP_ARGS(vec_nr)
 )
 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
-LTTNG_TRACEPOINT_EVENT_CLASS(softirq,
+LTTNG_TRACEPOINT_EVENT_CLASS(irq_softirq,
 
        TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
 
@@ -176,7 +182,9 @@ LTTNG_TRACEPOINT_EVENT_CLASS(softirq,
  * When used in combination with the softirq_exit tracepoint
  * we can determine the softirq handler runtine.
  */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_entry,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_entry,
+
+       irq_softirq_entry,
 
        TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
 
@@ -191,7 +199,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_entry,
  * When used in combination with the softirq_entry tracepoint
  * we can determine the softirq handler runtine.
  */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_exit,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_exit,
+
+       irq_softirq_exit,
 
        TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
 
@@ -206,7 +216,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_exit,
  * When used in combination with the softirq_entry tracepoint
  * we can determine the softirq raise to run latency.
  */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(softirq, softirq_raise,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_raise,
+
+       irq_softirq_raise,
 
        TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
 
index 710c9fa53af1038ce5f795509e74814727a0feee..c7869f12745d3949d5393252998c04facee93351 100644 (file)
@@ -158,9 +158,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kmem_free, kmem_cache_free,
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
-LTTNG_TRACEPOINT_EVENT(mm_page_free,
+LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free, kmem_mm_page_free,
 #else
-LTTNG_TRACEPOINT_EVENT(mm_page_free_direct,
+LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free_direct, kmem_mm_page_free_direct,
 #endif
 
        TP_PROTO(struct page *page, unsigned int order),
@@ -184,9 +184,9 @@ LTTNG_TRACEPOINT_EVENT(mm_page_free_direct,
 )
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
-LTTNG_TRACEPOINT_EVENT(mm_page_free_batched,
+LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free_batched, kmem_mm_page_free_batched,
 #else
-LTTNG_TRACEPOINT_EVENT(mm_pagevec_free,
+LTTNG_TRACEPOINT_EVENT_MAP(mm_pagevec_free, kmem_pagevec_free,
 #endif
 
        TP_PROTO(struct page *page, int cold),
@@ -209,7 +209,7 @@ LTTNG_TRACEPOINT_EVENT(mm_pagevec_free,
                        __entry->cold)
 )
 
-LTTNG_TRACEPOINT_EVENT(mm_page_alloc,
+LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc, kmem_mm_page_alloc,
 
        TP_PROTO(struct page *page, unsigned int order,
                        gfp_t gfp_flags, int migratetype),
@@ -238,7 +238,7 @@ LTTNG_TRACEPOINT_EVENT(mm_page_alloc,
                show_gfp_flags(__entry->gfp_flags))
 )
 
-LTTNG_TRACEPOINT_EVENT_CLASS(mm_page,
+LTTNG_TRACEPOINT_EVENT_CLASS(kmem_mm_page,
 
        TP_PROTO(struct page *page, unsigned int order, int migratetype),
 
@@ -264,14 +264,18 @@ LTTNG_TRACEPOINT_EVENT_CLASS(mm_page,
                __entry->order == 0)
 )
 
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_page, mm_page_alloc_zone_locked,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(kmem_mm_page, mm_page_alloc_zone_locked,
+
+       kmem_mm_page_alloc_zone_locked,
 
        TP_PROTO(struct page *page, unsigned int order, int migratetype),
 
        TP_ARGS(page, order, migratetype)
 )
 
-LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT(mm_page, mm_page_pcpu_drain,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_PRINT_MAP(kmem_mm_page, mm_page_pcpu_drain,
+
+       kmem_mm_page_pcpu_drain,
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
        TP_PROTO(struct page *page, unsigned int order, int migratetype),
@@ -374,7 +378,9 @@ LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
 
 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
 
-LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
+LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag,
+
+       kmem_mm_page_alloc_extfrag,
 
        TP_PROTO(struct page *page,
                        int alloc_order, int fallback_order,
@@ -418,7 +424,9 @@ LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
 
 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
 
-LTTNG_TRACEPOINT_EVENT(mm_page_alloc_extfrag,
+LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag,
+
+       kmem_mm_page_alloc_extfrag,
 
        TP_PROTO(struct page *page,
                        int alloc_order, int fallback_order,
diff --git a/instrumentation/events/lttng-module/mm_vmscan.h b/instrumentation/events/lttng-module/mm_vmscan.h
new file mode 100644 (file)
index 0000000..870c026
--- /dev/null
@@ -0,0 +1,642 @@
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM mm_vmscan
+
+#if !defined(LTTNG_TRACE_MM_VMSCAN_H) || defined(TRACE_HEADER_MULTI_READ)
+#define LTTNG_TRACE_MM_VMSCAN_H
+
+#include "../../../probes/lttng-tracepoint-event.h"
+#include <linux/types.h>
+#include <linux/mm.h>
+#include <linux/memcontrol.h>
+#include <trace/events/gfpflags.h>
+#include <linux/version.h>
+
+#ifndef _TRACE_VMSCAN_DEF
+#define _TRACE_VMSCAN_DEF
+#define RECLAIM_WB_ANON                0x0001u
+#define RECLAIM_WB_FILE                0x0002u
+#define RECLAIM_WB_MIXED       0x0010u
+#define RECLAIM_WB_SYNC                0x0004u /* Unused, all reclaim async */
+#define RECLAIM_WB_ASYNC       0x0008u
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#define show_reclaim_flags(flags)                              \
+       (flags) ? __print_flags(flags, "|",                     \
+               {RECLAIM_WB_ANON,       "RECLAIM_WB_ANON"},     \
+               {RECLAIM_WB_FILE,       "RECLAIM_WB_FILE"},     \
+               {RECLAIM_WB_MIXED,      "RECLAIM_WB_MIXED"},    \
+               {RECLAIM_WB_SYNC,       "RECLAIM_WB_SYNC"},     \
+               {RECLAIM_WB_ASYNC,      "RECLAIM_WB_ASYNC"}     \
+               ) : "RECLAIM_WB_NONE"
+#else
+#define show_reclaim_flags(flags)                              \
+       (flags) ? __print_flags(flags, "|",                     \
+               {RECLAIM_WB_ANON,       "RECLAIM_WB_ANON"},     \
+               {RECLAIM_WB_FILE,       "RECLAIM_WB_FILE"},     \
+               {RECLAIM_WB_SYNC,       "RECLAIM_WB_SYNC"},     \
+               {RECLAIM_WB_ASYNC,      "RECLAIM_WB_ASYNC"}     \
+               ) : "RECLAIM_WB_NONE"
+#endif
+
+#if ((LINUX_VERSION_CODE <= KERNEL_VERSION(3,0,38)) || \
+       LTTNG_KERNEL_RANGE(3,1,0, 3,2,0))
+typedef int isolate_mode_t;
+#endif
+
+#endif
+
+LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_sleep,
+
+       TP_PROTO(int nid),
+
+       TP_ARGS(nid),
+
+       TP_STRUCT__entry(
+               __field(        int,    nid     )
+       ),
+
+       TP_fast_assign(
+               tp_assign(nid, nid)
+       ),
+
+       TP_printk("nid=%d", __entry->nid)
+)
+
+LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_wake,
+
+       TP_PROTO(int nid, int order),
+
+       TP_ARGS(nid, order),
+
+       TP_STRUCT__entry(
+               __field(        int,    nid     )
+               __field(        int,    order   )
+       ),
+
+       TP_fast_assign(
+               tp_assign(nid, nid)
+               tp_assign(order, order)
+       ),
+
+       TP_printk("nid=%d order=%d", __entry->nid, __entry->order)
+)
+
+LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd,
+
+       TP_PROTO(int nid, int zid, int order),
+
+       TP_ARGS(nid, zid, order),
+
+       TP_STRUCT__entry(
+               __field(        int,            nid     )
+               __field(        int,            zid     )
+               __field(        int,            order   )
+       ),
+
+       TP_fast_assign(
+               tp_assign(nid, nid)
+               tp_assign(zid, zid)
+               tp_assign(order, order)
+       ),
+
+       TP_printk("nid=%d zid=%d order=%d",
+               __entry->nid,
+               __entry->zid,
+               __entry->order)
+)
+
+LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template,
+
+       TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
+
+       TP_ARGS(order, may_writepage, gfp_flags),
+
+       TP_STRUCT__entry(
+               __field(        int,    order           )
+               __field(        int,    may_writepage   )
+               __field(        gfp_t,  gfp_flags       )
+       ),
+
+       TP_fast_assign(
+               tp_assign(order, order)
+               tp_assign(may_writepage, may_writepage)
+               tp_assign(gfp_flags, gfp_flags)
+       ),
+
+       TP_printk("order=%d may_writepage=%d gfp_flags=%s",
+               __entry->order,
+               __entry->may_writepage,
+               show_gfp_flags(__entry->gfp_flags))
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_direct_reclaim_begin,
+
+       TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
+
+       TP_ARGS(order, may_writepage, gfp_flags)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_reclaim_begin,
+
+       TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
+
+       TP_ARGS(order, may_writepage, gfp_flags)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_softlimit_reclaim_begin,
+
+       TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
+
+       TP_ARGS(order, may_writepage, gfp_flags)
+)
+
+LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_end_template,
+
+       TP_PROTO(unsigned long nr_reclaimed),
+
+       TP_ARGS(nr_reclaimed),
+
+       TP_STRUCT__entry(
+               __field(        unsigned long,  nr_reclaimed    )
+       ),
+
+       TP_fast_assign(
+               tp_assign(nr_reclaimed, nr_reclaimed)
+       ),
+
+       TP_printk("nr_reclaimed=%lu", __entry->nr_reclaimed)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_end_template, mm_vmscan_direct_reclaim_end,
+
+       TP_PROTO(unsigned long nr_reclaimed),
+
+       TP_ARGS(nr_reclaimed)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_reclaim_end,
+
+       TP_PROTO(unsigned long nr_reclaimed),
+
+       TP_ARGS(nr_reclaimed)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_softlimit_reclaim_end,
+
+       TP_PROTO(unsigned long nr_reclaimed),
+
+       TP_ARGS(nr_reclaimed)
+)
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
+LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_start,
+
+       mm_vmscan_shrink_slab_start,
+
+       TP_PROTO(struct shrinker *shr, struct shrink_control *sc,
+               long nr_objects_to_shrink, unsigned long pgs_scanned,
+               unsigned long lru_pgs, unsigned long cache_items,
+               unsigned long long delta, unsigned long total_scan),
+
+       TP_ARGS(shr, sc, nr_objects_to_shrink, pgs_scanned, lru_pgs,
+               cache_items, delta, total_scan),
+
+       TP_STRUCT__entry(
+               __field(struct shrinker *, shr)
+               __field(void *, shrink)
+               __field(long, nr_objects_to_shrink)
+               __field(gfp_t, gfp_flags)
+               __field(unsigned long, pgs_scanned)
+               __field(unsigned long, lru_pgs)
+               __field(unsigned long, cache_items)
+               __field(unsigned long long, delta)
+               __field(unsigned long, total_scan)
+       ),
+
+       TP_fast_assign(
+               tp_assign(shr,shr)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+               tp_assign(shrink, shr->scan_objects)
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+               tp_assign(shrink, shr->shrink)
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+               tp_assign(nr_objects_to_shrink, nr_objects_to_shrink)
+               tp_assign(gfp_flags, sc->gfp_mask)
+               tp_assign(pgs_scanned, pgs_scanned)
+               tp_assign(lru_pgs, lru_pgs)
+               tp_assign(cache_items, cache_items)
+               tp_assign(delta, delta)
+               tp_assign(total_scan, total_scan)
+       ),
+
+       TP_printk("%pF %p: objects to shrink %ld gfp_flags %s pgs_scanned %ld lru_pgs %ld cache items %ld delta %lld total_scan %ld",
+               __entry->shrink,
+               __entry->shr,
+               __entry->nr_objects_to_shrink,
+               show_gfp_flags(__entry->gfp_flags),
+               __entry->pgs_scanned,
+               __entry->lru_pgs,
+               __entry->cache_items,
+               __entry->delta,
+               __entry->total_scan)
+)
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
+LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
+
+       mm_vmscan_shrink_slab_end,
+
+       TP_PROTO(struct shrinker *shr, int nid, int shrinker_retval,
+               long unused_scan_cnt, long new_scan_cnt, long total_scan),
+
+       TP_ARGS(shr, nid, shrinker_retval, unused_scan_cnt, new_scan_cnt,
+               total_scan),
+
+       TP_STRUCT__entry(
+               __field(struct shrinker *, shr)
+               __field(int, nid)
+               __field(void *, shrink)
+               __field(long, unused_scan)
+               __field(long, new_scan)
+               __field(int, retval)
+               __field(long, total_scan)
+       ),
+
+       TP_fast_assign(
+               tp_assign(shr, shr)
+               tp_assign(nid, nid)
+               tp_assign(shrink, shr->scan_objects)
+               tp_assign(unused_scan, unused_scan_cnt)
+               tp_assign(new_scan, new_scan_cnt)
+               tp_assign(retval, shrinker_retval)
+               tp_assign(total_scan, total_scan)
+       ),
+
+       TP_printk("%pF %p: nid %d unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d",
+               __entry->shrink,
+               __entry->shr,
+               __entry->nid,
+               __entry->unused_scan,
+               __entry->new_scan,
+               __entry->total_scan,
+               __entry->retval)
+)
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
+LTTNG_TRACEPOINT_EVENT_MAP(mm_shrink_slab_end,
+
+       mm_vmscan_shrink_slab_end,
+
+       TP_PROTO(struct shrinker *shr, int shrinker_retval,
+               long unused_scan_cnt, long new_scan_cnt),
+
+       TP_ARGS(shr, shrinker_retval, unused_scan_cnt, new_scan_cnt),
+
+       TP_STRUCT__entry(
+               __field(struct shrinker *, shr)
+               __field(void *, shrink)
+               __field(long, unused_scan)
+               __field(long, new_scan)
+               __field(int, retval)
+               __field(long, total_scan)
+       ),
+
+       TP_fast_assign(
+               tp_assign(shr, shr)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
+               tp_assign(shrink, shr->scan_objects)
+#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+               tp_assign(shrink, shr->shrink)
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
+               tp_assign(unused_scan, unused_scan_cnt)
+               tp_assign(new_scan, new_scan_cnt)
+               tp_assign(retval, shrinker_retval)
+               tp_assign(total_scan, new_scan_cnt - unused_scan_cnt)
+       ),
+
+       TP_printk("%pF %p: unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d",
+               __entry->shrink,
+               __entry->shr,
+               __entry->unused_scan,
+               __entry->new_scan,
+               __entry->total_scan,
+               __entry->retval)
+)
+#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
+#endif
+
+LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template,
+
+       TP_PROTO(int order,
+               unsigned long nr_requested,
+               unsigned long nr_scanned,
+               unsigned long nr_taken,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+               unsigned long nr_lumpy_taken,
+               unsigned long nr_lumpy_dirty,
+               unsigned long nr_lumpy_failed,
+#endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+               isolate_mode_t isolate_mode
+#else
+               isolate_mode_t isolate_mode,
+               int file
+#endif
+       ),
+
+       TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+               nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
+#endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+               isolate_mode
+#else
+               isolate_mode, file
+#endif
+       ),
+
+
+       TP_STRUCT__entry(
+               __field(int, order)
+               __field(unsigned long, nr_requested)
+               __field(unsigned long, nr_scanned)
+               __field(unsigned long, nr_taken)
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+               __field(unsigned long, nr_lumpy_taken)
+               __field(unsigned long, nr_lumpy_dirty)
+               __field(unsigned long, nr_lumpy_failed)
+#endif
+               __field(isolate_mode_t, isolate_mode)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+               __field(int, file)
+#endif
+       ),
+
+       TP_fast_assign(
+               tp_assign(order, order)
+               tp_assign(nr_requested, nr_requested)
+               tp_assign(nr_scanned, nr_scanned)
+               tp_assign(nr_taken, nr_taken)
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+               tp_assign(nr_lumpy_taken, nr_lumpy_taken)
+               tp_assign(nr_lumpy_dirty, nr_lumpy_dirty)
+               tp_assign(nr_lumpy_failed, nr_lumpy_failed)
+#endif
+               tp_assign(isolate_mode, isolate_mode)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+               tp_assign(file, file)
+#endif
+       ),
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+       TP_printk("isolate_mode=%d order=%d nr_requested=%lu nr_scanned=%lu nr_taken=%lu contig_taken=%lu contig_dirty=%lu contig_failed=%lu",
+               __entry->isolate_mode,
+               __entry->order,
+               __entry->nr_requested,
+               __entry->nr_scanned,
+               __entry->nr_taken,
+               __entry->nr_lumpy_taken,
+               __entry->nr_lumpy_dirty,
+               __entry->nr_lumpy_failed)
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+       TP_printk("isolate_mode=%d order=%d nr_requested=%lu nr_scanned=%lu nr_taken=%lu contig_taken=%lu contig_dirty=%lu contig_failed=%lu file=%d",
+               __entry->isolate_mode,
+               __entry->order,
+               __entry->nr_requested,
+               __entry->nr_scanned,
+               __entry->nr_taken,
+               __entry->nr_lumpy_taken,
+               __entry->nr_lumpy_dirty,
+               __entry->nr_lumpy_failed,
+               __entry->file)
+#else
+       TP_printk("isolate_mode=%d order=%d nr_requested=%lu nr_scanned=%lu nr_taken=%lu file=%d",
+               __entry->isolate_mode,
+               __entry->order,
+               __entry->nr_requested,
+               __entry->nr_scanned,
+               __entry->nr_taken,
+               __entry->file)
+#endif
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate,
+
+       TP_PROTO(int order,
+               unsigned long nr_requested,
+               unsigned long nr_scanned,
+               unsigned long nr_taken,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+               unsigned long nr_lumpy_taken,
+               unsigned long nr_lumpy_dirty,
+               unsigned long nr_lumpy_failed,
+#endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+               isolate_mode_t isolate_mode
+#else
+               isolate_mode_t isolate_mode,
+               int file
+#endif
+       ),
+
+       TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+               nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
+#endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+               isolate_mode
+#else
+               isolate_mode, file
+#endif
+       )
+
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate,
+
+       TP_PROTO(int order,
+               unsigned long nr_requested,
+               unsigned long nr_scanned,
+               unsigned long nr_taken,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+               unsigned long nr_lumpy_taken,
+               unsigned long nr_lumpy_dirty,
+               unsigned long nr_lumpy_failed,
+#endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+               isolate_mode_t isolate_mode
+#else
+               isolate_mode_t isolate_mode,
+               int file
+#endif
+       ),
+
+       TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+               nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
+#endif
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
+               isolate_mode
+#else
+               isolate_mode, file
+#endif
+       )
+)
+
+LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
+
+       TP_PROTO(struct page *page,
+               int reclaim_flags),
+
+       TP_ARGS(page, reclaim_flags),
+
+       TP_STRUCT__entry(
+               __field(struct page *, page)
+               __field(int, reclaim_flags)
+       ),
+
+       TP_fast_assign(
+               tp_assign(page, page)
+               tp_assign(reclaim_flags, reclaim_flags)
+       ),
+
+       TP_printk("page=%p pfn=%lu flags=%s",
+               __entry->page,
+               page_to_pfn(__entry->page),
+               show_reclaim_flags(__entry->reclaim_flags))
+)
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
+
+       TP_PROTO(int nid, int zid,
+                       unsigned long nr_scanned, unsigned long nr_reclaimed,
+                       int priority, int reclaim_flags),
+
+       TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags),
+
+       TP_STRUCT__entry(
+               __field(int, nid)
+               __field(int, zid)
+               __field(unsigned long, nr_scanned)
+               __field(unsigned long, nr_reclaimed)
+               __field(int, priority)
+               __field(int, reclaim_flags)
+       ),
+
+       TP_fast_assign(
+               tp_assign(nid, nid)
+               tp_assign(zid, zid)
+               tp_assign(nr_scanned, nr_scanned)
+               tp_assign(nr_reclaimed, nr_reclaimed)
+               tp_assign(priority, priority)
+               tp_assign(reclaim_flags, reclaim_flags)
+       ),
+
+       TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s",
+               __entry->nid, __entry->zid,
+               __entry->nr_scanned, __entry->nr_reclaimed,
+               __entry->priority,
+               show_reclaim_flags(__entry->reclaim_flags))
+)
+#endif
+
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
+LTTNG_TRACEPOINT_EVENT_MAP(replace_swap_token,
+
+       mm_vmscan_replace_swap_token,
+
+       TP_PROTO(struct mm_struct *old_mm,
+                struct mm_struct *new_mm),
+
+       TP_ARGS(old_mm, new_mm),
+
+       TP_STRUCT__entry(
+               __field(struct mm_struct*,      old_mm)
+               __field(unsigned int,           old_prio)
+               __field(struct mm_struct*,      new_mm)
+               __field(unsigned int,           new_prio)
+       ),
+
+       TP_fast_assign(
+               tp_assign(old_mm, old_mm)
+               tp_assign(old_prio, old_mm ? old_mm->token_priority : 0)
+               tp_assign(new_mm, new_mm)
+               tp_assign(new_prio, new_mm->token_priority)
+       ),
+
+       TP_printk("old_token_mm=%p old_prio=%u new_token_mm=%p new_prio=%u",
+                 __entry->old_mm, __entry->old_prio,
+                 __entry->new_mm, __entry->new_prio)
+)
+
+LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_put_swap_token_template,
+       TP_PROTO(struct mm_struct *swap_token_mm),
+
+       TP_ARGS(swap_token_mm),
+
+       TP_STRUCT__entry(
+               __field(struct mm_struct*, swap_token_mm)
+       ),
+
+       TP_fast_assign(
+               tp_assign(swap_token_mm, swap_token_mm)
+       ),
+
+       TP_printk("token_mm=%p", __entry->swap_token_mm)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(mm_vmscan_put_swap_token_template, put_swap_token,
+
+       mm_vmscan_put_swap_token,
+
+       TP_PROTO(struct mm_struct *swap_token_mm),
+       TP_ARGS(swap_token_mm)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE_CONDITION_MAP(mm_vmscan_put_swap_token_template, disable_swap_token,
+
+       mm_vmscan_disable_swap_token,
+
+       TP_PROTO(struct mm_struct *swap_token_mm),
+       TP_ARGS(swap_token_mm),
+       TP_CONDITION(swap_token_mm != NULL)
+)
+
+LTTNG_TRACEPOINT_EVENT_CONDITION_MAP(update_swap_token_priority,
+
+       mm_vmscan_update_swap_token_priority,
+
+       TP_PROTO(struct mm_struct *mm,
+                unsigned int old_prio,
+                struct mm_struct *swap_token_mm),
+
+       TP_ARGS(mm, old_prio, swap_token_mm),
+
+       TP_CONDITION(mm->token_priority != old_prio),
+
+       TP_STRUCT__entry(
+               __field(struct mm_struct*, mm)
+               __field(unsigned int, old_prio)
+               __field(unsigned int, new_prio)
+               __field(struct mm_struct*, swap_token_mm)
+               __field(unsigned int, swap_token_prio)
+       ),
+
+       TP_fast_assign(
+               tp_assign(mm, mm)
+               tp_assign(old_prio, old_prio)
+               tp_assign(new_prio, mm->token_priority)
+               tp_assign(swap_token_mm, swap_token_mm)
+               tp_assign(swap_token_prio, swap_token_mm ? swap_token_mm->token_priority : 0)
+       ),
+
+       TP_printk("mm=%p old_prio=%u new_prio=%u swap_token_mm=%p token_prio=%u",
+                 __entry->mm, __entry->old_prio, __entry->new_prio,
+                 __entry->swap_token_mm, __entry->swap_token_prio)
+)
+#endif
+
+#endif /* LTTNG_TRACE_MM_VMSCAN_H */
+
+/* This part must be outside protection */
+#include "../../../probes/define_trace.h"
index 16949c4d83da54c25cebc73c01fb655c387da558..fd7cccc3769a9627092e536eede966600be7e1d3 100644 (file)
@@ -9,7 +9,10 @@
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
 
-LTTNG_TRACEPOINT_EVENT(console,
+LTTNG_TRACEPOINT_EVENT_MAP(console,
+
+       printk_console,
+
        TP_PROTO(const char *text, size_t len),
 
        TP_ARGS(text, len),
@@ -27,7 +30,10 @@ LTTNG_TRACEPOINT_EVENT(console,
 
 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
 
-LTTNG_TRACEPOINT_EVENT_CONDITION(console,
+LTTNG_TRACEPOINT_EVENT_CONDITION_MAP(console,
+
+       printk_console,
+
        TP_PROTO(const char *log_buf, unsigned start, unsigned end,
                 unsigned log_buf_len),
 
@@ -48,7 +54,10 @@ LTTNG_TRACEPOINT_EVENT_CONDITION(console,
 
 #else /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) */
 
-LTTNG_TRACEPOINT_EVENT_CONDITION(console,
+LTTNG_TRACEPOINT_EVENT_CONDITION_MAP(console,
+
+       printk_console,
+
        TP_PROTO(const char *log_buf, unsigned start, unsigned end,
                 unsigned log_buf_len),
 
index 87df6a6dc161dd708b1028bb837f03236fafdc9a..69e421610aaec4ae90fa6a12f82785ae7cc5a458 100644 (file)
@@ -121,7 +121,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_write_done,
        TP_ARGS(dev, reg, count)
 )
 
-LTTNG_TRACEPOINT_EVENT(regcache_sync,
+LTTNG_TRACEPOINT_EVENT_MAP(regcache_sync,
+
+       regmap_regcache_sync,
 
        TP_PROTO(struct device *dev, const char *type,
                 const char *status),
diff --git a/instrumentation/events/lttng-module/rpc.h b/instrumentation/events/lttng-module/rpc.h
new file mode 100644 (file)
index 0000000..bcaafbc
--- /dev/null
@@ -0,0 +1,177 @@
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM rpc
+
+#if !defined(LTTNG_TRACE_RPC_H) || defined(TRACE_HEADER_MULTI_READ)
+#define LTTNG_TRACE_RPC_H
+
+#include "../../../probes/lttng-tracepoint-event.h"
+#include <linux/sunrpc/sched.h>
+#include <linux/sunrpc/clnt.h>
+
+LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
+
+       TP_PROTO(struct rpc_task *task),
+
+       TP_ARGS(task),
+
+       TP_STRUCT__entry(
+               __field(const struct rpc_task *, task)
+               __field(const struct rpc_clnt *, clnt)
+               __field(int, status)
+       ),
+
+       TP_fast_assign(
+               tp_assign(task, task)
+               tp_assign(clnt, task->tk_client)
+               tp_assign(status, task->tk_status)
+       ),
+
+       TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status,
+       TP_PROTO(struct rpc_task *task),
+
+       TP_ARGS(task)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
+       TP_PROTO(struct rpc_task *task),
+
+       TP_ARGS(task)
+)
+
+LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
+       TP_PROTO(struct rpc_task *task, int status),
+
+       TP_ARGS(task, status),
+
+       TP_STRUCT__entry(
+               __field(const struct rpc_task *, task)
+               __field(const struct rpc_clnt *, clnt)
+               __field(int, status)
+       ),
+
+       TP_fast_assign(
+               tp_assign(task, task)
+               tp_assign(clnt, task->tk_client)
+               tp_assign(status, status)
+       ),
+
+       TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status)
+)
+
+LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
+
+       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
+
+       TP_ARGS(clnt, task, action),
+
+       TP_STRUCT__entry(
+               __field(const struct rpc_clnt *, clnt)
+               __field(const struct rpc_task *, task)
+               __field(const void *, action)
+               __field(unsigned long, runstate)
+               __field(int, status)
+               __field(unsigned short, flags)
+               ),
+
+       TP_fast_assign(
+               tp_assign(clnt, clnt)
+               tp_assign(task, task)
+               tp_assign(action, action)
+               tp_assign(runstate, task->tk_runstate)
+               tp_assign(status, task->tk_status)
+               tp_assign(flags, task->tk_flags)
+               ),
+
+       TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d action=%pf",
+               __entry->task,
+               __entry->clnt,
+               __entry->flags,
+               __entry->runstate,
+               __entry->status,
+               __entry->action
+               )
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_begin,
+
+       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
+
+       TP_ARGS(clnt, task, action)
+
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action,
+
+       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
+
+       TP_ARGS(clnt, task, action)
+
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete,
+
+       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
+
+       TP_ARGS(clnt, task, action)
+
+)
+
+LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
+
+       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
+
+       TP_ARGS(clnt, task, q),
+
+       TP_STRUCT__entry(
+               __field(const struct rpc_clnt *, clnt)
+               __field(const struct rpc_task *, task)
+               __field(unsigned long, timeout)
+               __field(unsigned long, runstate)
+               __field(int, status)
+               __field(unsigned short, flags)
+               __string(q_name, rpc_qname(q))
+               ),
+
+       TP_fast_assign(
+               tp_assign(clnt, clnt)
+               tp_assign(task, task)
+               tp_assign(timeout, task->tk_timeout)
+               tp_assign(runstate, task->tk_runstate)
+               tp_assign(status, task->tk_status)
+               tp_assign(flags, task->tk_flags)
+               tp_strcpy(q_name, rpc_qname(q))
+               ),
+
+       TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s",
+               __entry->task,
+               __entry->clnt,
+               __entry->flags,
+               __entry->runstate,
+               __entry->status,
+               __entry->timeout,
+               __get_str(q_name)
+               )
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_sleep,
+
+       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
+
+       TP_ARGS(clnt, task, q)
+
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
+
+       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
+
+       TP_ARGS(clnt, task, q)
+
+)
+
+#endif /* LTTNG_TRACE_RPC_H */
+
+#include "../../../probes/define_trace.h"
diff --git a/instrumentation/events/lttng-module/sunrpc.h b/instrumentation/events/lttng-module/sunrpc.h
deleted file mode 100644 (file)
index af9358c..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM sunrpc
-
-#if !defined(LTTNG_TRACE_SUNRPC_H) || defined(TRACE_HEADER_MULTI_READ)
-#define LTTNG_TRACE_SUNRPC_H
-
-#include "../../../probes/lttng-tracepoint-event.h"
-#include <linux/sunrpc/sched.h>
-#include <linux/sunrpc/clnt.h>
-
-LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_status,
-
-       TP_PROTO(struct rpc_task *task),
-
-       TP_ARGS(task),
-
-       TP_STRUCT__entry(
-               __field(const struct rpc_task *, task)
-               __field(const struct rpc_clnt *, clnt)
-               __field(int, status)
-       ),
-
-       TP_fast_assign(
-               tp_assign(task, task)
-               tp_assign(clnt, task->tk_client)
-               tp_assign(status, task->tk_status)
-       ),
-
-       TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status)
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_call_status,
-       TP_PROTO(struct rpc_task *task),
-
-       TP_ARGS(task)
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_status, rpc_bind_status,
-       TP_PROTO(struct rpc_task *task),
-
-       TP_ARGS(task)
-)
-
-LTTNG_TRACEPOINT_EVENT(rpc_connect_status,
-       TP_PROTO(struct rpc_task *task, int status),
-
-       TP_ARGS(task, status),
-
-       TP_STRUCT__entry(
-               __field(const struct rpc_task *, task)
-               __field(const struct rpc_clnt *, clnt)
-               __field(int, status)
-       ),
-
-       TP_fast_assign(
-               tp_assign(task, task)
-               tp_assign(clnt, task->tk_client)
-               tp_assign(status, status)
-       ),
-
-       TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status)
-)
-
-LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_running,
-
-       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
-
-       TP_ARGS(clnt, task, action),
-
-       TP_STRUCT__entry(
-               __field(const struct rpc_clnt *, clnt)
-               __field(const struct rpc_task *, task)
-               __field(const void *, action)
-               __field(unsigned long, runstate)
-               __field(int, status)
-               __field(unsigned short, flags)
-               ),
-
-       TP_fast_assign(
-               tp_assign(clnt, clnt)
-               tp_assign(task, task)
-               tp_assign(action, action)
-               tp_assign(runstate, task->tk_runstate)
-               tp_assign(status, task->tk_status)
-               tp_assign(flags, task->tk_flags)
-               ),
-
-       TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d action=%pf",
-               __entry->task,
-               __entry->clnt,
-               __entry->flags,
-               __entry->runstate,
-               __entry->status,
-               __entry->action
-               )
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_begin,
-
-       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
-
-       TP_ARGS(clnt, task, action)
-
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_run_action,
-
-       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
-
-       TP_ARGS(clnt, task, action)
-
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_running, rpc_task_complete,
-
-       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action),
-
-       TP_ARGS(clnt, task, action)
-
-)
-
-LTTNG_TRACEPOINT_EVENT_CLASS(rpc_task_queued,
-
-       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
-
-       TP_ARGS(clnt, task, q),
-
-       TP_STRUCT__entry(
-               __field(const struct rpc_clnt *, clnt)
-               __field(const struct rpc_task *, task)
-               __field(unsigned long, timeout)
-               __field(unsigned long, runstate)
-               __field(int, status)
-               __field(unsigned short, flags)
-               __string(q_name, rpc_qname(q))
-               ),
-
-       TP_fast_assign(
-               tp_assign(clnt, clnt)
-               tp_assign(task, task)
-               tp_assign(timeout, task->tk_timeout)
-               tp_assign(runstate, task->tk_runstate)
-               tp_assign(status, task->tk_status)
-               tp_assign(flags, task->tk_flags)
-               tp_strcpy(q_name, rpc_qname(q))
-               ),
-
-       TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s",
-               __entry->task,
-               __entry->clnt,
-               __entry->flags,
-               __entry->runstate,
-               __entry->status,
-               __entry->timeout,
-               __get_str(q_name)
-               )
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_sleep,
-
-       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
-
-       TP_ARGS(clnt, task, q)
-
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(rpc_task_queued, rpc_task_wakeup,
-
-       TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q),
-
-       TP_ARGS(clnt, task, q)
-
-)
-
-#endif /* LTTNG_TRACE_SUNRPC_H */
-
-#include "../../../probes/define_trace.h"
index 8bd67e509bd7c394ca98627935bbfeb3737e14f4..5e409a0b83609be5116a8e163e93431110368224 100644 (file)
@@ -134,7 +134,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(timer_class, timer_cancel,
  * @clockid:   the hrtimers clock
  * @mode:      the hrtimers mode
  */
-LTTNG_TRACEPOINT_EVENT(hrtimer_init,
+LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_init,
+
+       timer_hrtimer_init,
 
        TP_PROTO(struct hrtimer *hrtimer, clockid_t clockid,
                 enum hrtimer_mode mode),
@@ -164,7 +166,9 @@ LTTNG_TRACEPOINT_EVENT(hrtimer_init,
  * hrtimer_start - called when the hrtimer is started
  * @timer: pointer to struct hrtimer
  */
-LTTNG_TRACEPOINT_EVENT(hrtimer_start,
+LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_start,
+
+       timer_hrtimer_start,
 
        TP_PROTO(struct hrtimer *hrtimer),
 
@@ -200,7 +204,9 @@ LTTNG_TRACEPOINT_EVENT(hrtimer_start,
  *
  * Allows to determine the timer latency.
  */
-LTTNG_TRACEPOINT_EVENT(hrtimer_expire_entry,
+LTTNG_TRACEPOINT_EVENT_MAP(hrtimer_expire_entry,
+
+       timer_hrtimer_expire_entry,
 
        TP_PROTO(struct hrtimer *hrtimer, ktime_t *now),
 
@@ -222,7 +228,7 @@ LTTNG_TRACEPOINT_EVENT(hrtimer_expire_entry,
                  (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now }))
 )
 
-LTTNG_TRACEPOINT_EVENT_CLASS(hrtimer_class,
+LTTNG_TRACEPOINT_EVENT_CLASS(timer_hrtimer_class,
 
        TP_PROTO(struct hrtimer *hrtimer),
 
@@ -246,7 +252,9 @@ LTTNG_TRACEPOINT_EVENT_CLASS(hrtimer_class,
  * When used in combination with the hrtimer_expire_entry tracepoint we can
  * determine the runtime of the callback function.
  */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(hrtimer_class, hrtimer_expire_exit,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(timer_hrtimer_class, hrtimer_expire_exit,
+
+       timer_hrtimer_expire_exit,
 
        TP_PROTO(struct hrtimer *hrtimer),
 
@@ -257,7 +265,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(hrtimer_class, hrtimer_expire_exit,
  * hrtimer_cancel - called when the hrtimer is canceled
  * @hrtimer:   pointer to struct hrtimer
  */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(hrtimer_class, hrtimer_cancel,
+LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(timer_hrtimer_class, hrtimer_cancel,
+
+       timer_hrtimer_cancel,
 
        TP_PROTO(struct hrtimer *hrtimer),
 
@@ -271,7 +281,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(hrtimer_class, hrtimer_cancel,
  *             zero, otherwise it is started
  * @expires:   the itimers expiry time
  */
-LTTNG_TRACEPOINT_EVENT(itimer_state,
+LTTNG_TRACEPOINT_EVENT_MAP(itimer_state,
+
+       timer_itimer_state,
 
        TP_PROTO(int which, const struct itimerval *const value,
                 cputime_t expires),
@@ -308,7 +320,9 @@ LTTNG_TRACEPOINT_EVENT(itimer_state,
  * @pid:       pid of the process which owns the timer
  * @now:       current time, used to calculate the latency of itimer
  */
-LTTNG_TRACEPOINT_EVENT(itimer_expire,
+LTTNG_TRACEPOINT_EVENT_MAP(itimer_expire,
+
+       timer_itimer_expire,
 
        TP_PROTO(int which, struct pid *pid, cputime_t now),
 
diff --git a/instrumentation/events/lttng-module/vmscan.h b/instrumentation/events/lttng-module/vmscan.h
deleted file mode 100644 (file)
index 4eadc63..0000000
+++ /dev/null
@@ -1,633 +0,0 @@
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM vmscan
-
-#if !defined(LTTNG_TRACE_VMSCAN_H) || defined(TRACE_HEADER_MULTI_READ)
-#define LTTNG_TRACE_VMSCAN_H
-
-#include "../../../probes/lttng-tracepoint-event.h"
-#include <linux/types.h>
-#include <linux/mm.h>
-#include <linux/memcontrol.h>
-#include <trace/events/gfpflags.h>
-#include <linux/version.h>
-
-#ifndef _TRACE_VMSCAN_DEF
-#define _TRACE_VMSCAN_DEF
-#define RECLAIM_WB_ANON                0x0001u
-#define RECLAIM_WB_FILE                0x0002u
-#define RECLAIM_WB_MIXED       0x0010u
-#define RECLAIM_WB_SYNC                0x0004u /* Unused, all reclaim async */
-#define RECLAIM_WB_ASYNC       0x0008u
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
-#define show_reclaim_flags(flags)                              \
-       (flags) ? __print_flags(flags, "|",                     \
-               {RECLAIM_WB_ANON,       "RECLAIM_WB_ANON"},     \
-               {RECLAIM_WB_FILE,       "RECLAIM_WB_FILE"},     \
-               {RECLAIM_WB_MIXED,      "RECLAIM_WB_MIXED"},    \
-               {RECLAIM_WB_SYNC,       "RECLAIM_WB_SYNC"},     \
-               {RECLAIM_WB_ASYNC,      "RECLAIM_WB_ASYNC"}     \
-               ) : "RECLAIM_WB_NONE"
-#else
-#define show_reclaim_flags(flags)                              \
-       (flags) ? __print_flags(flags, "|",                     \
-               {RECLAIM_WB_ANON,       "RECLAIM_WB_ANON"},     \
-               {RECLAIM_WB_FILE,       "RECLAIM_WB_FILE"},     \
-               {RECLAIM_WB_SYNC,       "RECLAIM_WB_SYNC"},     \
-               {RECLAIM_WB_ASYNC,      "RECLAIM_WB_ASYNC"}     \
-               ) : "RECLAIM_WB_NONE"
-#endif
-
-#if ((LINUX_VERSION_CODE <= KERNEL_VERSION(3,0,38)) || \
-       LTTNG_KERNEL_RANGE(3,1,0, 3,2,0))
-typedef int isolate_mode_t;
-#endif
-
-#endif
-
-LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_sleep,
-
-       TP_PROTO(int nid),
-
-       TP_ARGS(nid),
-
-       TP_STRUCT__entry(
-               __field(        int,    nid     )
-       ),
-
-       TP_fast_assign(
-               tp_assign(nid, nid)
-       ),
-
-       TP_printk("nid=%d", __entry->nid)
-)
-
-LTTNG_TRACEPOINT_EVENT(mm_vmscan_kswapd_wake,
-
-       TP_PROTO(int nid, int order),
-
-       TP_ARGS(nid, order),
-
-       TP_STRUCT__entry(
-               __field(        int,    nid     )
-               __field(        int,    order   )
-       ),
-
-       TP_fast_assign(
-               tp_assign(nid, nid)
-               tp_assign(order, order)
-       ),
-
-       TP_printk("nid=%d order=%d", __entry->nid, __entry->order)
-)
-
-LTTNG_TRACEPOINT_EVENT(mm_vmscan_wakeup_kswapd,
-
-       TP_PROTO(int nid, int zid, int order),
-
-       TP_ARGS(nid, zid, order),
-
-       TP_STRUCT__entry(
-               __field(        int,            nid     )
-               __field(        int,            zid     )
-               __field(        int,            order   )
-       ),
-
-       TP_fast_assign(
-               tp_assign(nid, nid)
-               tp_assign(zid, zid)
-               tp_assign(order, order)
-       ),
-
-       TP_printk("nid=%d zid=%d order=%d",
-               __entry->nid,
-               __entry->zid,
-               __entry->order)
-)
-
-LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template,
-
-       TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
-
-       TP_ARGS(order, may_writepage, gfp_flags),
-
-       TP_STRUCT__entry(
-               __field(        int,    order           )
-               __field(        int,    may_writepage   )
-               __field(        gfp_t,  gfp_flags       )
-       ),
-
-       TP_fast_assign(
-               tp_assign(order, order)
-               tp_assign(may_writepage, may_writepage)
-               tp_assign(gfp_flags, gfp_flags)
-       ),
-
-       TP_printk("order=%d may_writepage=%d gfp_flags=%s",
-               __entry->order,
-               __entry->may_writepage,
-               show_gfp_flags(__entry->gfp_flags))
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_direct_reclaim_begin,
-
-       TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
-
-       TP_ARGS(order, may_writepage, gfp_flags)
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_reclaim_begin,
-
-       TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
-
-       TP_ARGS(order, may_writepage, gfp_flags)
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_softlimit_reclaim_begin,
-
-       TP_PROTO(int order, int may_writepage, gfp_t gfp_flags),
-
-       TP_ARGS(order, may_writepage, gfp_flags)
-)
-
-LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_direct_reclaim_end_template,
-
-       TP_PROTO(unsigned long nr_reclaimed),
-
-       TP_ARGS(nr_reclaimed),
-
-       TP_STRUCT__entry(
-               __field(        unsigned long,  nr_reclaimed    )
-       ),
-
-       TP_fast_assign(
-               tp_assign(nr_reclaimed, nr_reclaimed)
-       ),
-
-       TP_printk("nr_reclaimed=%lu", __entry->nr_reclaimed)
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_end_template, mm_vmscan_direct_reclaim_end,
-
-       TP_PROTO(unsigned long nr_reclaimed),
-
-       TP_ARGS(nr_reclaimed)
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_reclaim_end,
-
-       TP_PROTO(unsigned long nr_reclaimed),
-
-       TP_ARGS(nr_reclaimed)
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_softlimit_reclaim_end,
-
-       TP_PROTO(unsigned long nr_reclaimed),
-
-       TP_ARGS(nr_reclaimed)
-)
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
-LTTNG_TRACEPOINT_EVENT(mm_shrink_slab_start,
-       TP_PROTO(struct shrinker *shr, struct shrink_control *sc,
-               long nr_objects_to_shrink, unsigned long pgs_scanned,
-               unsigned long lru_pgs, unsigned long cache_items,
-               unsigned long long delta, unsigned long total_scan),
-
-       TP_ARGS(shr, sc, nr_objects_to_shrink, pgs_scanned, lru_pgs,
-               cache_items, delta, total_scan),
-
-       TP_STRUCT__entry(
-               __field(struct shrinker *, shr)
-               __field(void *, shrink)
-               __field(long, nr_objects_to_shrink)
-               __field(gfp_t, gfp_flags)
-               __field(unsigned long, pgs_scanned)
-               __field(unsigned long, lru_pgs)
-               __field(unsigned long, cache_items)
-               __field(unsigned long long, delta)
-               __field(unsigned long, total_scan)
-       ),
-
-       TP_fast_assign(
-               tp_assign(shr,shr)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
-               tp_assign(shrink, shr->scan_objects)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
-               tp_assign(shrink, shr->shrink)
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
-               tp_assign(nr_objects_to_shrink, nr_objects_to_shrink)
-               tp_assign(gfp_flags, sc->gfp_mask)
-               tp_assign(pgs_scanned, pgs_scanned)
-               tp_assign(lru_pgs, lru_pgs)
-               tp_assign(cache_items, cache_items)
-               tp_assign(delta, delta)
-               tp_assign(total_scan, total_scan)
-       ),
-
-       TP_printk("%pF %p: objects to shrink %ld gfp_flags %s pgs_scanned %ld lru_pgs %ld cache items %ld delta %lld total_scan %ld",
-               __entry->shrink,
-               __entry->shr,
-               __entry->nr_objects_to_shrink,
-               show_gfp_flags(__entry->gfp_flags),
-               __entry->pgs_scanned,
-               __entry->lru_pgs,
-               __entry->cache_items,
-               __entry->delta,
-               __entry->total_scan)
-)
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
-LTTNG_TRACEPOINT_EVENT(mm_shrink_slab_end,
-       TP_PROTO(struct shrinker *shr, int nid, int shrinker_retval,
-               long unused_scan_cnt, long new_scan_cnt, long total_scan),
-
-       TP_ARGS(shr, nid, shrinker_retval, unused_scan_cnt, new_scan_cnt,
-               total_scan),
-
-       TP_STRUCT__entry(
-               __field(struct shrinker *, shr)
-               __field(int, nid)
-               __field(void *, shrink)
-               __field(long, unused_scan)
-               __field(long, new_scan)
-               __field(int, retval)
-               __field(long, total_scan)
-       ),
-
-       TP_fast_assign(
-               tp_assign(shr, shr)
-               tp_assign(nid, nid)
-               tp_assign(shrink, shr->scan_objects)
-               tp_assign(unused_scan, unused_scan_cnt)
-               tp_assign(new_scan, new_scan_cnt)
-               tp_assign(retval, shrinker_retval)
-               tp_assign(total_scan, total_scan)
-       ),
-
-       TP_printk("%pF %p: nid %d unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d",
-               __entry->shrink,
-               __entry->shr,
-               __entry->nid,
-               __entry->unused_scan,
-               __entry->new_scan,
-               __entry->total_scan,
-               __entry->retval)
-)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
-LTTNG_TRACEPOINT_EVENT(mm_shrink_slab_end,
-       TP_PROTO(struct shrinker *shr, int shrinker_retval,
-               long unused_scan_cnt, long new_scan_cnt),
-
-       TP_ARGS(shr, shrinker_retval, unused_scan_cnt, new_scan_cnt),
-
-       TP_STRUCT__entry(
-               __field(struct shrinker *, shr)
-               __field(void *, shrink)
-               __field(long, unused_scan)
-               __field(long, new_scan)
-               __field(int, retval)
-               __field(long, total_scan)
-       ),
-
-       TP_fast_assign(
-               tp_assign(shr, shr)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
-               tp_assign(shrink, shr->scan_objects)
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
-               tp_assign(shrink, shr->shrink)
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
-               tp_assign(unused_scan, unused_scan_cnt)
-               tp_assign(new_scan, new_scan_cnt)
-               tp_assign(retval, shrinker_retval)
-               tp_assign(total_scan, new_scan_cnt - unused_scan_cnt)
-       ),
-
-       TP_printk("%pF %p: unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d",
-               __entry->shrink,
-               __entry->shr,
-               __entry->unused_scan,
-               __entry->new_scan,
-               __entry->total_scan,
-               __entry->retval)
-)
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) */
-#endif
-
-LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_lru_isolate_template,
-
-       TP_PROTO(int order,
-               unsigned long nr_requested,
-               unsigned long nr_scanned,
-               unsigned long nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
-               unsigned long nr_lumpy_taken,
-               unsigned long nr_lumpy_dirty,
-               unsigned long nr_lumpy_failed,
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
-               isolate_mode_t isolate_mode
-#else
-               isolate_mode_t isolate_mode,
-               int file
-#endif
-       ),
-
-       TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
-               nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
-               isolate_mode
-#else
-               isolate_mode, file
-#endif
-       ),
-
-
-       TP_STRUCT__entry(
-               __field(int, order)
-               __field(unsigned long, nr_requested)
-               __field(unsigned long, nr_scanned)
-               __field(unsigned long, nr_taken)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
-               __field(unsigned long, nr_lumpy_taken)
-               __field(unsigned long, nr_lumpy_dirty)
-               __field(unsigned long, nr_lumpy_failed)
-#endif
-               __field(isolate_mode_t, isolate_mode)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
-               __field(int, file)
-#endif
-       ),
-
-       TP_fast_assign(
-               tp_assign(order, order)
-               tp_assign(nr_requested, nr_requested)
-               tp_assign(nr_scanned, nr_scanned)
-               tp_assign(nr_taken, nr_taken)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
-               tp_assign(nr_lumpy_taken, nr_lumpy_taken)
-               tp_assign(nr_lumpy_dirty, nr_lumpy_dirty)
-               tp_assign(nr_lumpy_failed, nr_lumpy_failed)
-#endif
-               tp_assign(isolate_mode, isolate_mode)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
-               tp_assign(file, file)
-#endif
-       ),
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
-       TP_printk("isolate_mode=%d order=%d nr_requested=%lu nr_scanned=%lu nr_taken=%lu contig_taken=%lu contig_dirty=%lu contig_failed=%lu",
-               __entry->isolate_mode,
-               __entry->order,
-               __entry->nr_requested,
-               __entry->nr_scanned,
-               __entry->nr_taken,
-               __entry->nr_lumpy_taken,
-               __entry->nr_lumpy_dirty,
-               __entry->nr_lumpy_failed)
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
-       TP_printk("isolate_mode=%d order=%d nr_requested=%lu nr_scanned=%lu nr_taken=%lu contig_taken=%lu contig_dirty=%lu contig_failed=%lu file=%d",
-               __entry->isolate_mode,
-               __entry->order,
-               __entry->nr_requested,
-               __entry->nr_scanned,
-               __entry->nr_taken,
-               __entry->nr_lumpy_taken,
-               __entry->nr_lumpy_dirty,
-               __entry->nr_lumpy_failed,
-               __entry->file)
-#else
-       TP_printk("isolate_mode=%d order=%d nr_requested=%lu nr_scanned=%lu nr_taken=%lu file=%d",
-               __entry->isolate_mode,
-               __entry->order,
-               __entry->nr_requested,
-               __entry->nr_scanned,
-               __entry->nr_taken,
-               __entry->file)
-#endif
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate,
-
-       TP_PROTO(int order,
-               unsigned long nr_requested,
-               unsigned long nr_scanned,
-               unsigned long nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
-               unsigned long nr_lumpy_taken,
-               unsigned long nr_lumpy_dirty,
-               unsigned long nr_lumpy_failed,
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
-               isolate_mode_t isolate_mode
-#else
-               isolate_mode_t isolate_mode,
-               int file
-#endif
-       ),
-
-       TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
-               nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
-               isolate_mode
-#else
-               isolate_mode, file
-#endif
-       )
-
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate,
-
-       TP_PROTO(int order,
-               unsigned long nr_requested,
-               unsigned long nr_scanned,
-               unsigned long nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
-               unsigned long nr_lumpy_taken,
-               unsigned long nr_lumpy_dirty,
-               unsigned long nr_lumpy_failed,
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
-               isolate_mode_t isolate_mode
-#else
-               isolate_mode_t isolate_mode,
-               int file
-#endif
-       ),
-
-       TP_ARGS(order, nr_requested, nr_scanned, nr_taken,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
-               nr_lumpy_taken, nr_lumpy_dirty, nr_lumpy_failed,
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
-               isolate_mode
-#else
-               isolate_mode, file
-#endif
-       )
-)
-
-LTTNG_TRACEPOINT_EVENT(mm_vmscan_writepage,
-
-       TP_PROTO(struct page *page,
-               int reclaim_flags),
-
-       TP_ARGS(page, reclaim_flags),
-
-       TP_STRUCT__entry(
-               __field(struct page *, page)
-               __field(int, reclaim_flags)
-       ),
-
-       TP_fast_assign(
-               tp_assign(page, page)
-               tp_assign(reclaim_flags, reclaim_flags)
-       ),
-
-       TP_printk("page=%p pfn=%lu flags=%s",
-               __entry->page,
-               page_to_pfn(__entry->page),
-               show_reclaim_flags(__entry->reclaim_flags))
-)
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
-LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
-
-       TP_PROTO(int nid, int zid,
-                       unsigned long nr_scanned, unsigned long nr_reclaimed,
-                       int priority, int reclaim_flags),
-
-       TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags),
-
-       TP_STRUCT__entry(
-               __field(int, nid)
-               __field(int, zid)
-               __field(unsigned long, nr_scanned)
-               __field(unsigned long, nr_reclaimed)
-               __field(int, priority)
-               __field(int, reclaim_flags)
-       ),
-
-       TP_fast_assign(
-               tp_assign(nid, nid)
-               tp_assign(zid, zid)
-               tp_assign(nr_scanned, nr_scanned)
-               tp_assign(nr_reclaimed, nr_reclaimed)
-               tp_assign(priority, priority)
-               tp_assign(reclaim_flags, reclaim_flags)
-       ),
-
-       TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s",
-               __entry->nid, __entry->zid,
-               __entry->nr_scanned, __entry->nr_reclaimed,
-               __entry->priority,
-               show_reclaim_flags(__entry->reclaim_flags))
-)
-#endif
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
-LTTNG_TRACEPOINT_EVENT_MAP(replace_swap_token,
-
-       mm_vmscan_replace_swap_token,
-
-       TP_PROTO(struct mm_struct *old_mm,
-                struct mm_struct *new_mm),
-
-       TP_ARGS(old_mm, new_mm),
-
-       TP_STRUCT__entry(
-               __field(struct mm_struct*,      old_mm)
-               __field(unsigned int,           old_prio)
-               __field(struct mm_struct*,      new_mm)
-               __field(unsigned int,           new_prio)
-       ),
-
-       TP_fast_assign(
-               tp_assign(old_mm, old_mm)
-               tp_assign(old_prio, old_mm ? old_mm->token_priority : 0)
-               tp_assign(new_mm, new_mm)
-               tp_assign(new_prio, new_mm->token_priority)
-       ),
-
-       TP_printk("old_token_mm=%p old_prio=%u new_token_mm=%p new_prio=%u",
-                 __entry->old_mm, __entry->old_prio,
-                 __entry->new_mm, __entry->new_prio)
-)
-
-LTTNG_TRACEPOINT_EVENT_CLASS(mm_vmscan_put_swap_token_template,
-       TP_PROTO(struct mm_struct *swap_token_mm),
-
-       TP_ARGS(swap_token_mm),
-
-       TP_STRUCT__entry(
-               __field(struct mm_struct*, swap_token_mm)
-       ),
-
-       TP_fast_assign(
-               tp_assign(swap_token_mm, swap_token_mm)
-       ),
-
-       TP_printk("token_mm=%p", __entry->swap_token_mm)
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(mm_vmscan_put_swap_token_template, put_swap_token,
-
-       mm_vmscan_put_swap_token,
-
-       TP_PROTO(struct mm_struct *swap_token_mm),
-       TP_ARGS(swap_token_mm)
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE_CONDITION_MAP(mm_vmscan_put_swap_token_template, disable_swap_token,
-
-       mm_vmscan_disable_swap_token,
-
-       TP_PROTO(struct mm_struct *swap_token_mm),
-       TP_ARGS(swap_token_mm),
-       TP_CONDITION(swap_token_mm != NULL)
-)
-
-LTTNG_TRACEPOINT_EVENT_CONDITION_MAP(update_swap_token_priority,
-
-       mm_vmscan_update_swap_token_priority,
-
-       TP_PROTO(struct mm_struct *mm,
-                unsigned int old_prio,
-                struct mm_struct *swap_token_mm),
-
-       TP_ARGS(mm, old_prio, swap_token_mm),
-
-       TP_CONDITION(mm->token_priority != old_prio),
-
-       TP_STRUCT__entry(
-               __field(struct mm_struct*, mm)
-               __field(unsigned int, old_prio)
-               __field(unsigned int, new_prio)
-               __field(struct mm_struct*, swap_token_mm)
-               __field(unsigned int, swap_token_prio)
-       ),
-
-       TP_fast_assign(
-               tp_assign(mm, mm)
-               tp_assign(old_prio, old_prio)
-               tp_assign(new_prio, mm->token_priority)
-               tp_assign(swap_token_mm, swap_token_mm)
-               tp_assign(swap_token_prio, swap_token_mm ? swap_token_mm->token_priority : 0)
-       ),
-
-       TP_printk("mm=%p old_prio=%u new_prio=%u swap_token_mm=%p token_prio=%u",
-                 __entry->mm, __entry->old_prio, __entry->new_prio,
-                 __entry->swap_token_mm, __entry->swap_token_prio)
-)
-#endif
-
-#endif /* LTTNG_TRACE_VMSCAN_H */
-
-/* This part must be outside protection */
-#include "../../../probes/define_trace.h"
index d990c1bc3116250628b6cd011fe4f69fc2a950d2..258dbc1897b1ac988dfc7aa46d112080500eeeff 100644 (file)
@@ -37,7 +37,7 @@
 #define CREATE_TRACE_POINTS
 #define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module
 
-#include "../instrumentation/events/lttng-module/sunrpc.h"
+#include "../instrumentation/events/lttng-module/rpc.h"
 
 MODULE_LICENSE("GPL and additional rights");
 MODULE_AUTHOR("Andrew Gabbasov <andrew_gabbasov@mentor.com>");
index 994e5145350502f65018fa2d59d9fe0dcadb85fa..c1e84a77711c6dfc137efce488b624663a3c4b96 100644 (file)
@@ -39,7 +39,7 @@
 #define CREATE_TRACE_POINTS
 #define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module
 
-#include "../instrumentation/events/lttng-module/vmscan.h"
+#include "../instrumentation/events/lttng-module/mm_vmscan.h"
 
 MODULE_LICENSE("GPL and additional rights");
 MODULE_AUTHOR("Wade Farnsworth <wade_farnsworth@mentor.com>, Paul Woegerer <paul_woegerer@mentor.com>, and Andrew Gabbasov <andrew_gabbasov@mentor.com>");
This page took 0.051267 seconds and 4 git commands to generate.