2 #define TRACE_SYSTEM percpu
4 #if !defined(_TRACE_PERCPU_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_PERCPU_H
7 #include <linux/tracepoint.h>
9 TRACE_EVENT(percpu_alloc_percpu
,
11 TP_PROTO(bool reserved
, bool is_atomic
, size_t size
,
12 size_t align
, void *base_addr
, int off
, void __percpu
*ptr
),
14 TP_ARGS(reserved
, is_atomic
, size
, align
, base_addr
, off
, ptr
),
17 __field( bool, reserved
)
18 __field( bool, is_atomic
)
19 __field( size_t, size
)
20 __field( size_t, align
)
21 __field( void *, base_addr
)
23 __field( void __percpu
*, ptr
)
27 __entry
->reserved
= reserved
;
28 __entry
->is_atomic
= is_atomic
;
30 __entry
->align
= align
;
31 __entry
->base_addr
= base_addr
;
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
)
42 TRACE_EVENT(percpu_free_percpu
,
44 TP_PROTO(void *base_addr
, int off
, void __percpu
*ptr
),
46 TP_ARGS(base_addr
, off
, ptr
),
49 __field( void *, base_addr
)
51 __field( void __percpu
*, ptr
)
55 __entry
->base_addr
= base_addr
;
60 TP_printk("base_addr=%p off=%d ptr=%p",
61 __entry
->base_addr
, __entry
->off
, __entry
->ptr
)
64 TRACE_EVENT(percpu_alloc_percpu_fail
,
66 TP_PROTO(bool reserved
, bool is_atomic
, size_t size
, size_t align
),
68 TP_ARGS(reserved
, is_atomic
, size
, align
),
71 __field( bool, reserved
)
72 __field( bool, is_atomic
)
73 __field( size_t, size
)
74 __field( size_t, align
)
78 __entry
->reserved
= reserved
;
79 __entry
->is_atomic
= is_atomic
;
81 __entry
->align
= align
;
84 TP_printk("reserved=%d is_atomic=%d size=%zu align=%zu",
85 __entry
->reserved
, __entry
->is_atomic
,
86 __entry
->size
, __entry
->align
)
89 TRACE_EVENT(percpu_create_chunk
,
91 TP_PROTO(void *base_addr
),
96 __field( void *, base_addr
)
100 __entry
->base_addr
= base_addr
;
103 TP_printk("base_addr=%p", __entry
->base_addr
)
106 TRACE_EVENT(percpu_destroy_chunk
,
108 TP_PROTO(void *base_addr
),
113 __field( void *, base_addr
)
117 __entry
->base_addr
= base_addr
;
120 TP_printk("base_addr=%p", __entry
->base_addr
)
123 #endif /* _TRACE_PERCPU_H */
125 #include <trace/define_trace.h>