]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/mmap: Change debug for maple tree
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Sat, 11 Jul 2020 00:48:21 +0000 (20:48 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:05:09 +0000 (15:05 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
mm/mmap.c

index c0019060b713b303777534c24bc9022176a2c6f3..10be7be153aeb7bc48b1171b7db88aa184eb9cb7 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -384,7 +384,6 @@ static int browse_rb(struct mm_struct *mm)
        }
        return bug ? -1 : i;
 }
-#define CONFIG_DEBUG_MAPLE_TREE
 #if defined(CONFIG_DEBUG_MAPLE_TREE)
 extern void mt_dump(const struct maple_tree *mt);
 
@@ -823,25 +822,31 @@ static void __vma_link_file(struct vm_area_struct *vma)
 }
 static void __vma_mt_erase(struct mm_struct *mm, struct vm_area_struct *vma)
 {
+#if defined(CONFIG_DEBUG_MAPLE_TREE_VERBOSE)
        trace___vma_mt_erase(mm, vma);
        printk("mt_mod %px, (%px), ERASE, %lu, %lu,", mm, vma, vma->vm_start,
               vma->vm_end - 1);
+#endif
        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)
 {
+#if defined(CONFIG_DEBUG_MAPLE_TREE_VERBOSE)
+       trace___vma_mt_szero(mm, start, end);
        printk("mt_mod %px, (%px), SNULL, %lu, %lu,", mm, NULL, start,
               end - 1);
-       trace___vma_mt_szero(mm, start, end);
+#endif
        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)
 {
+#if defined(CONFIG_DEBUG_MAPLE_TREE_VERBOSE)
        trace___vma_mt_store(mm, vma);
        printk("mt_mod %px, (%px), STORE, %lu, %lu,", mm, vma, vma->vm_start,
               vma->vm_end - 1);
+#endif
        mtree_store_range(&mm->mm_mt, vma->vm_start, vma->vm_end - 1, vma,
                GFP_KERNEL);
        mt_validate(&mm->mm_mt);
@@ -3592,7 +3597,9 @@ void exit_mmap(struct mm_struct *mm)
        }
 
        mtree_destroy(&mm->mm_mt);
+#if defined(CONFIG_DEBUG_MAPLE_TREE_VERBOSE)
        printk("mt_mod %px, (%px), DESTROY", mm, &mm->mm_mt);
+#endif
 
        vm_unacct_memory(nr_accounted);
 }