blob: ad34b1bae04751eff139ccade9868338963e0803 [file] [log] [blame]
Dennis Zhoudf95e792017-06-19 19:28:32 -04001#undef TRACE_SYSTEM
2#define TRACE_SYSTEM percpu
3
4#if !defined(_TRACE_PERCPU_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_PERCPU_H
6
7#include <linux/tracepoint.h>
8
9TRACE_EVENT(percpu_alloc_percpu,
10
11 TP_PROTO(bool reserved, bool is_atomic, size_t size,
12 size_t align, void *base_addr, int off, void __percpu *ptr),
13
14 TP_ARGS(reserved, is_atomic, size, align, base_addr, off, ptr),
15
16 TP_STRUCT__entry(
17 __field( bool, reserved )
18 __field( bool, is_atomic )
19 __field( size_t, size )
20 __field( size_t, align )
21 __field( void *, base_addr )
22 __field( int, off )
23 __field( void __percpu *, ptr )
24 ),
25
26 TP_fast_assign(
27 __entry->reserved = reserved;
28 __entry->is_atomic = is_atomic;
29 __entry->size = size;
30 __entry->align = align;
31 __entry->base_addr = base_addr;
32 __entry->off = off;
33 __entry->ptr = ptr;
34 ),
35
36 TP_printk("reserved=%d is_atomic=%d size=%zu align=%zu base_addr=%p off=%d ptr=%p",
37 __entry->reserved, __entry->is_atomic,
38 __entry->size, __entry->align,
39 __entry->base_addr, __entry->off, __entry->ptr)
40);
41
42TRACE_EVENT(percpu_free_percpu,
43
44 TP_PROTO(void *base_addr, int off, void __percpu *ptr),
45
46 TP_ARGS(base_addr, off, ptr),
47
48 TP_STRUCT__entry(
49 __field( void *, base_addr )
50 __field( int, off )
51 __field( void __percpu *, ptr )
52 ),
53
54 TP_fast_assign(
55 __entry->base_addr = base_addr;
56 __entry->off = off;
57 __entry->ptr = ptr;
58 ),
59
60 TP_printk("base_addr=%p off=%d ptr=%p",
61 __entry->base_addr, __entry->off, __entry->ptr)
62);
63
64TRACE_EVENT(percpu_alloc_percpu_fail,
65
66 TP_PROTO(bool reserved, bool is_atomic, size_t size, size_t align),
67
68 TP_ARGS(reserved, is_atomic, size, align),
69
70 TP_STRUCT__entry(
71 __field( bool, reserved )
72 __field( bool, is_atomic )
73 __field( size_t, size )
74 __field( size_t, align )
75 ),
76
77 TP_fast_assign(
78 __entry->reserved = reserved;
79 __entry->is_atomic = is_atomic;
80 __entry->size = size;
81 __entry->align = align;
82 ),
83
84 TP_printk("reserved=%d is_atomic=%d size=%zu align=%zu",
85 __entry->reserved, __entry->is_atomic,
86 __entry->size, __entry->align)
87);
88
89TRACE_EVENT(percpu_create_chunk,
90
91 TP_PROTO(void *base_addr),
92
93 TP_ARGS(base_addr),
94
95 TP_STRUCT__entry(
96 __field( void *, base_addr )
97 ),
98
99 TP_fast_assign(
100 __entry->base_addr = base_addr;
101 ),
102
103 TP_printk("base_addr=%p", __entry->base_addr)
104);
105
106TRACE_EVENT(percpu_destroy_chunk,
107
108 TP_PROTO(void *base_addr),
109
110 TP_ARGS(base_addr),
111
112 TP_STRUCT__entry(
113 __field( void *, base_addr )
114 ),
115
116 TP_fast_assign(
117 __entry->base_addr = base_addr;
118 ),
119
120 TP_printk("base_addr=%p", __entry->base_addr)
121);
122
123#endif /* _TRACE_PERCPU_H */
124
125#include <trace/define_trace.h>