Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / include / trace / events / mmap.h
blobf8d61485de16deadad88d6062676d2374f1079e5
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM mmap
5 #if !defined(_TRACE_MMAP_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_MMAP_H
8 #include <linux/tracepoint.h>
10 TRACE_EVENT(vm_unmapped_area,
12 TP_PROTO(unsigned long addr, struct vm_unmapped_area_info *info),
14 TP_ARGS(addr, info),
16 TP_STRUCT__entry(
17 __field(unsigned long, addr)
18 __field(unsigned long, total_vm)
19 __field(unsigned long, flags)
20 __field(unsigned long, length)
21 __field(unsigned long, low_limit)
22 __field(unsigned long, high_limit)
23 __field(unsigned long, align_mask)
24 __field(unsigned long, align_offset)
27 TP_fast_assign(
28 __entry->addr = addr;
29 __entry->total_vm = current->mm->total_vm;
30 __entry->flags = info->flags;
31 __entry->length = info->length;
32 __entry->low_limit = info->low_limit;
33 __entry->high_limit = info->high_limit;
34 __entry->align_mask = info->align_mask;
35 __entry->align_offset = info->align_offset;
38 TP_printk("addr=0x%lx err=%ld total_vm=0x%lx flags=0x%lx len=0x%lx lo=0x%lx hi=0x%lx mask=0x%lx ofs=0x%lx",
39 IS_ERR_VALUE(__entry->addr) ? 0 : __entry->addr,
40 IS_ERR_VALUE(__entry->addr) ? __entry->addr : 0,
41 __entry->total_vm, __entry->flags, __entry->length,
42 __entry->low_limit, __entry->high_limit, __entry->align_mask,
43 __entry->align_offset)
46 TRACE_EVENT(vma_mas_szero,
47 TP_PROTO(struct maple_tree *mt, unsigned long start,
48 unsigned long end),
50 TP_ARGS(mt, start, end),
52 TP_STRUCT__entry(
53 __field(struct maple_tree *, mt)
54 __field(unsigned long, start)
55 __field(unsigned long, end)
58 TP_fast_assign(
59 __entry->mt = mt;
60 __entry->start = start;
61 __entry->end = end;
64 TP_printk("mt_mod %p, (NULL), SNULL, %lu, %lu,",
65 __entry->mt,
66 (unsigned long) __entry->start,
67 (unsigned long) __entry->end
71 TRACE_EVENT(vma_store,
72 TP_PROTO(struct maple_tree *mt, struct vm_area_struct *vma),
74 TP_ARGS(mt, vma),
76 TP_STRUCT__entry(
77 __field(struct maple_tree *, mt)
78 __field(struct vm_area_struct *, vma)
79 __field(unsigned long, vm_start)
80 __field(unsigned long, vm_end)
83 TP_fast_assign(
84 __entry->mt = mt;
85 __entry->vma = vma;
86 __entry->vm_start = vma->vm_start;
87 __entry->vm_end = vma->vm_end - 1;
90 TP_printk("mt_mod %p, (%p), STORE, %lu, %lu,",
91 __entry->mt, __entry->vma,
92 (unsigned long) __entry->vm_start,
93 (unsigned long) __entry->vm_end
98 TRACE_EVENT(exit_mmap,
99 TP_PROTO(struct mm_struct *mm),
101 TP_ARGS(mm),
103 TP_STRUCT__entry(
104 __field(struct mm_struct *, mm)
105 __field(struct maple_tree *, mt)
108 TP_fast_assign(
109 __entry->mm = mm;
110 __entry->mt = &mm->mm_mt;
113 TP_printk("mt_mod %p, DESTROY",
114 __entry->mt
118 #endif
120 /* This part must be outside protection */
121 #include <trace/define_trace.h>