]>
Commit | Line | Data |
---|---|---|
df529cab JK |
1 | /* SPDX-License-Identifier: GPL-2.0 */ |
2 | #undef TRACE_SYSTEM | |
3 | #define TRACE_SYSTEM mmap | |
4 | ||
5 | #if !defined(_TRACE_MMAP_H) || defined(TRACE_HEADER_MULTI_READ) | |
6 | #define _TRACE_MMAP_H | |
7 | ||
8 | #include <linux/tracepoint.h> | |
9 | ||
10 | TRACE_EVENT(vm_unmapped_area, | |
11 | ||
12 | TP_PROTO(unsigned long addr, struct vm_unmapped_area_info *info), | |
13 | ||
14 | TP_ARGS(addr, info), | |
15 | ||
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) | |
25 | ), | |
26 | ||
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; | |
36 | ), | |
37 | ||
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\n", | |
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) | |
44 | ); | |
45 | #endif | |
46 | ||
47 | /* This part must be outside protection */ | |
48 | #include <trace/define_trace.h> |