]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mmap: Rework tracing
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 7 Aug 2020 11:57:15 +0000 (07:57 -0400)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:09:03 +0000 (15:09 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
include/trace/events/mm_mt.h [deleted file]
include/trace/events/mmap.h
mm/mmap.c

diff --git a/include/trace/events/mm_mt.h b/include/trace/events/mm_mt.h
deleted file mode 100644 (file)
index 75b5e6c..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM mm_mt
-
-#if !defined(_TRACE_MM_H) || defined(TRACE_HEADER_MULTI_READ)
-#define _TRACE_MM_H
-
-
-#include <linux/tracepoint.h>
-
-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),
-
-       TP_ARGS(mm, 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 - 1;
-       ),
-
-       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),
-
-       TP_ARGS(mm, start, end),
-
-       TP_STRUCT__entry(
-                       __field(struct mm_struct*, mm)
-                       __field(unsigned long, start)
-                       __field(unsigned long, end)
-       ),
-
-       TP_fast_assign(
-                       __entry->mm             = mm;
-                       __entry->start          = start;
-                       __entry->end            = end - 1;
-       ),
-
-       TP_printk("mt_mod %p, (NULL), SNULL, %lu, %lu",
-                 __entry->mm,
-                 (unsigned long) __entry->start,
-                 (unsigned long) __entry->end
-       )
-);
-
-TRACE_EVENT(vma_mt_store,
-       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 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 - 1;
-       ),
-
-       TP_printk("mt_mod %p, (%p), STORE, %lu, %lu",
-                 __entry->mm, __entry->vma,
-                 (unsigned long) __entry->vm_start,
-                 (unsigned long) __entry->vm_end
-       )
-);
-
-
-TRACE_EVENT(exit_mmap,
-       TP_PROTO(struct mm_struct *mm),
-
-       TP_ARGS(mm),
-
-       TP_STRUCT__entry(
-                       __field(struct mm_struct*, mm)
-       ),
-
-       TP_fast_assign(
-                       __entry->mm             = mm;
-       ),
-
-       TP_printk("mt_mod %p, DESTROY\n",
-                 __entry->mm
-       )
-);
-
-#endif /* _TRACE_MM_H */
-
-/* This part must be outside protection */
-#include <trace/define_trace.h>
index 4661f7ba07c05e642f5b6cf663c0c8739f994747..cd1c7339c64a7af39f06047dbb202c7891cb06db 100644 (file)
@@ -42,6 +42,103 @@ TRACE_EVENT(vm_unmapped_area,
                __entry->low_limit, __entry->high_limit, __entry->align_mask,
                __entry->align_offset)
 );
+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 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 - 1;
+       ),
+
+       TP_printk("mt_mod %p, (%p), ERASE, %lu, %lu",
+                 __entry->mm, __entry->vma,
+                 (unsigned long) __entry->vm_start,
+                 (unsigned long) __entry->vm_end
+       )
+);
+
+TRACE_EVENT(vma_mt_szero,
+       TP_PROTO(struct mm_struct *mm, unsigned long start,
+                unsigned long end),
+
+       TP_ARGS(mm, start, end),
+
+       TP_STRUCT__entry(
+                       __field(struct mm_struct*, mm)
+                       __field(unsigned long, start)
+                       __field(unsigned long, end)
+       ),
+
+       TP_fast_assign(
+                       __entry->mm             = mm;
+                       __entry->start          = start;
+                       __entry->end            = end - 1;
+       ),
+
+       TP_printk("mt_mod %p, (NULL), SNULL, %lu, %lu",
+                 __entry->mm,
+                 (unsigned long) __entry->start,
+                 (unsigned long) __entry->end
+       )
+);
+
+TRACE_EVENT(vma_mt_store,
+       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 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 - 1;
+       ),
+
+       TP_printk("mt_mod %p, (%p), STORE, %lu, %lu",
+                 __entry->mm, __entry->vma,
+                 (unsigned long) __entry->vm_start,
+                 (unsigned long) __entry->vm_end
+       )
+);
+
+
+TRACE_EVENT(exit_mmap,
+       TP_PROTO(struct mm_struct *mm),
+
+       TP_ARGS(mm),
+
+       TP_STRUCT__entry(
+                       __field(struct mm_struct*, mm)
+       ),
+
+       TP_fast_assign(
+                       __entry->mm             = mm;
+       ),
+
+       TP_printk("mt_mod %p, DESTROY\n",
+                 __entry->mm
+       )
+);
+
 #endif
 
 /* This part must be outside protection */
index d4acf913a4f6b0d31f4b7eebfe255a77c084acd9..5ca5bc35d9722641f3d4f66d72014e7e6a5e8ecb 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -54,7 +54,6 @@
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/mmap.h>
-#include <trace/events/mm_mt.h>
 
 #include "internal.h"
 extern void mt_validate(struct maple_tree *mt);