]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
trace/events/mm_mt: Add maple tree mm tracepoints.
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 8 May 2020 14:14:25 +0000 (10:14 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:04:48 +0000 (15:04 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
include/trace/events/mm_mt.h
mm/mmap.c

index 9bc7fd4d46aef59f0b10d39e5f33877b6fb03ca8..a73468be8890f815da7c4754354d373f19434785 100644 (file)
@@ -12,26 +12,29 @@ struct mm_struct;
 struct vm_area_struct;
 
 TRACE_EVENT(__vma_mt_erase,
+
        TP_PROTO(struct mm_struct *mm, struct vm_area_struct *vma),
 
        TP_ARGS(mm, vma),
 
-       TP_STRUCT__entry(
-                       __field( struct mm_struct, mm)
-                       __field( struct vma_area_struct vma)
+       TP_STRUCT__entry (
+                       __field( struct mm_struct *, mm)
+                       __field( struct vm_area_struct *, vma)
+                       __field( unsigned long, vm_start)
+                       __field( unsigned long, vm_end)
        ),
 
        TP_fast_assign(
                        __entry->mm             = mm;
                        __entry->vma            = vma;
                        __entry->vm_start       = vma->vm_start;
-                       __entry->vm_end         = vma->vm_end;
+                       __entry->vm_end         = vma->vm_end - 1;
        ),
 
        TP_printk("mt_mod %p, (%p), ERASE, %lu, %lu\n",
                  __entry->mm, __entry->vma,
                  (unsigned long) __entry->vm_start,
-                 (unsigned long) __entry->vm_end - 1
+                 (unsigned long) __entry->vm_end
        )
 );
 
@@ -41,15 +44,17 @@ TRACE_EVENT(__vma_mt_szero,
        TP_ARGS(mm, vma),
 
        TP_STRUCT__entry(
-                       __field( struct mm_struct, mm)
-                       __field( struct vma_area_struct vma)
+                       __field( struct mm_struct*, mm)
+                       __field( struct vm_area_struct*, vma)
+                       __field( unsigned long, vm_start)
+                       __field( unsigned long, vm_end)
        ),
 
        TP_fast_assign(
                        __entry->mm             = mm;
                        __entry->vma            = vma;
                        __entry->vm_start       = vma->vm_start;
-                       __entry->vm_end         = vma->vm_end;
+                       __entry->vm_end         = vma->vm_end - 1;
        ),
 
        TP_printk("mt_mod %p, (%p), SNULL, %lu, %lu\n",
@@ -65,15 +70,17 @@ TRACE_EVENT(__vma_mt_store,
        TP_ARGS(mm, vma),
 
        TP_STRUCT__entry(
-                       __field( struct mm_struct, mm)
-                       __field( struct vma_area_struct vma)
+                       __field( struct mm_struct*, mm)
+                       __field( struct vm_area_struct*, vma)
+                       __field( unsigned long, vm_start)
+                       __field( unsigned long, vm_end)
        ),
 
        TP_fast_assign(
                        __entry->mm             = mm;
                        __entry->vma            = vma;
                        __entry->vm_start       = vma->vm_start;
-                       __entry->vm_end         = vma->vm_end;
+                       __entry->vm_end         = vma->vm_end - 1;
        ),
 
        TP_printk("mt_mod %p, (%p), STORE, %lu, %lu\n",
@@ -90,7 +97,7 @@ TRACE_EVENT(exit_mmap,
        TP_ARGS(mm),
 
        TP_STRUCT__entry(
-                       __field( struct mm_struct, mm)
+                       __field( struct mm_struct*, mm)
        ),
 
        TP_fast_assign(
index 4ac71a1825da178fff2d7df5b1e4dc7db1f020ba..738ab776a92265869ee714f5d170f5b1c302f8e5 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -57,6 +57,7 @@
 #include <trace/events/mmap.h>
 
 #include "internal.h"
+#define CREATE_TRACE_POINTS
 #include <trace/events/mm_mt.h>
 #define CONFIG_DEBUG_MAPLE_TREE
 #define CONFIG_DEBUG_VM_RB 1