]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
maple_tree and mm/mmap: Try to stop tracepoints on BUG_ON
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Sat, 9 May 2020 01:02:27 +0000 (21:02 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:04:49 +0000 (15:04 -0400)
Restore printk's until we know it happens.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
include/trace/events/mm_mt.h
mm/mmap.c

index 989386cdca116d421e0d48e13e72ff442937f08d..88cd76573345de6f7e853a85493ad54e661551f2 100644 (file)
 struct mm_struct;
 struct vm_area_struct;
 
+/**
+ * __vma_mt_erase - called to erase an entry from the mm_mt
+ *
+ * @mm:                the mm_struct which contains the mt
+ * @vma:       the vma that is to be erased.
+ *
+ */
 TRACE_EVENT(__vma_mt_erase,
 
        TP_PROTO(struct mm_struct *mm, struct vm_area_struct *vma),
@@ -31,13 +38,17 @@ TRACE_EVENT(__vma_mt_erase,
                        __entry->vm_end         = vma->vm_end - 1;
        ),
 
-       TP_printk("mt_mod %p, (%p), ERASE, %lu, %lu\n",
+       TP_printk("mt_mod %p, (%p), ERASE, %lu, %lu",
                  __entry->mm, __entry->vma,
                  (unsigned long) __entry->vm_start,
                  (unsigned long) __entry->vm_end
        )
 );
 
+/**
+ * __vma_mt_szero - Called to set a range to NULL in the mm_mt
+ *
+ */
 TRACE_EVENT(__vma_mt_szero,
        TP_PROTO(struct mm_struct *mm, unsigned long start,
                 unsigned long end),
@@ -56,7 +67,7 @@ TRACE_EVENT(__vma_mt_szero,
                        __entry->end            = end - 1;
        ),
 
-       TP_printk("mt_mod %p, (NULL), SNULL, %lu, %lu\n",
+       TP_printk("mt_mod %p, (NULL), SNULL, %lu, %lu",
                  __entry->mm,
                  (unsigned long) __entry->start,
                  (unsigned long) __entry->end
@@ -82,7 +93,7 @@ TRACE_EVENT(__vma_mt_store,
                        __entry->vm_end         = vma->vm_end - 1;
        ),
 
-       TP_printk("mt_mod %p, (%p), STORE, %lu, %lu\n",
+       TP_printk("mt_mod %p, (%p), STORE, %lu, %lu",
                  __entry->mm, __entry->vma,
                  (unsigned long) __entry->vm_start,
                  (unsigned long) __entry->vm_end - 1
index 738ab776a92265869ee714f5d170f5b1c302f8e5..9d46cd436987c10502a411b38d654725b02e21f6 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -823,16 +823,25 @@ static void __vma_link_file(struct vm_area_struct *vma)
 }
 static void __vma_mt_erase(struct mm_struct *mm, struct vm_area_struct *vma)
 {
+       trace___vma_mt_erase(mm, vma);
+       printk("mt_mod %px, (%px), ERASE, %lu, %lu", mm, vma, vma->vm_start,
+              vma->vm_end);
        mtree_erase(&mm->mm_mt, vma->vm_start);
        mt_validate(&mm->mm_mt);
 }
 static void __vma_mt_szero(struct mm_struct *mm, unsigned long start,
                unsigned long end)
 {
+       printk("mt_mod %px, (NULL), SNULL, %lu, %lu", mm, start,
+              end);
+       trace___vma_mt_szero(mm, start, end);
        mtree_store_range(&mm->mm_mt, start, end - 1, NULL, GFP_KERNEL);
 }
 static void __vma_mt_store(struct mm_struct *mm, struct vm_area_struct *vma)
 {
+       trace___vma_mt_store(mm, vma);
+       printk("mt_mod %px, (%px), STORE, %lu, %lu", mm, vma, vma->vm_start,
+              vma->vm_end);
        mtree_store_range(&mm->mm_mt, vma->vm_start, vma->vm_end - 1, vma,
                GFP_KERNEL);
        mt_validate(&mm->mm_mt);