]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - include/trace/events/cma.h
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[mirror_ubuntu-jammy-kernel.git] / include / trace / events / cma.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM cma
4
5 #if !defined(_TRACE_CMA_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_CMA_H
7
8 #include <linux/types.h>
9 #include <linux/tracepoint.h>
10
11 DECLARE_EVENT_CLASS(cma_alloc_class,
12
13 TP_PROTO(const char *name, unsigned long pfn, const struct page *page,
14 unsigned long count, unsigned int align),
15
16 TP_ARGS(name, pfn, page, count, align),
17
18 TP_STRUCT__entry(
19 __string(name, name)
20 __field(unsigned long, pfn)
21 __field(const struct page *, page)
22 __field(unsigned long, count)
23 __field(unsigned int, align)
24 ),
25
26 TP_fast_assign(
27 __assign_str(name, name);
28 __entry->pfn = pfn;
29 __entry->page = page;
30 __entry->count = count;
31 __entry->align = align;
32 ),
33
34 TP_printk("name=%s pfn=0x%lx page=%p count=%lu align=%u",
35 __get_str(name),
36 __entry->pfn,
37 __entry->page,
38 __entry->count,
39 __entry->align)
40 );
41
42 TRACE_EVENT(cma_release,
43
44 TP_PROTO(const char *name, unsigned long pfn, const struct page *page,
45 unsigned long count),
46
47 TP_ARGS(name, pfn, page, count),
48
49 TP_STRUCT__entry(
50 __string(name, name)
51 __field(unsigned long, pfn)
52 __field(const struct page *, page)
53 __field(unsigned long, count)
54 ),
55
56 TP_fast_assign(
57 __assign_str(name, name);
58 __entry->pfn = pfn;
59 __entry->page = page;
60 __entry->count = count;
61 ),
62
63 TP_printk("name=%s pfn=0x%lx page=%p count=%lu",
64 __get_str(name),
65 __entry->pfn,
66 __entry->page,
67 __entry->count)
68 );
69
70 TRACE_EVENT(cma_alloc_start,
71
72 TP_PROTO(const char *name, unsigned long count, unsigned int align),
73
74 TP_ARGS(name, count, align),
75
76 TP_STRUCT__entry(
77 __string(name, name)
78 __field(unsigned long, count)
79 __field(unsigned int, align)
80 ),
81
82 TP_fast_assign(
83 __assign_str(name, name);
84 __entry->count = count;
85 __entry->align = align;
86 ),
87
88 TP_printk("name=%s count=%lu align=%u",
89 __get_str(name),
90 __entry->count,
91 __entry->align)
92 );
93
94 DEFINE_EVENT(cma_alloc_class, cma_alloc_finish,
95
96 TP_PROTO(const char *name, unsigned long pfn, const struct page *page,
97 unsigned long count, unsigned int align),
98
99 TP_ARGS(name, pfn, page, count, align)
100 );
101
102 DEFINE_EVENT(cma_alloc_class, cma_alloc_busy_retry,
103
104 TP_PROTO(const char *name, unsigned long pfn, const struct page *page,
105 unsigned long count, unsigned int align),
106
107 TP_ARGS(name, pfn, page, count, align)
108 );
109
110 #endif /* _TRACE_CMA_H */
111
112 /* This part must be outside protection */
113 #include <trace/define_trace.h>