summaryrefslogtreecommitdiff
path: root/include/trace/events/rcu.h
blob: db3f6e9e63e6254e654fe75f6a8cb1cabb95523d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#undef TRACE_SYSTEM
#define TRACE_SYSTEM rcu

#if !defined(_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_RCU_H

#include <linux/tracepoint.h>

/*
 * Tracepoint for calling rcu_do_batch, performed to start callback invocation:
 */
TRACE_EVENT(rcu_batch_start,

	TP_PROTO(long callbacks_ready, int blimit),

	TP_ARGS(callbacks_ready, blimit),

	TP_STRUCT__entry(
		__field(	long,	callbacks_ready		)
		__field(	int,	blimit			)
	),

	TP_fast_assign(
		__entry->callbacks_ready	= callbacks_ready;
		__entry->blimit			= blimit;
	),

	TP_printk("CBs=%ld bl=%d", __entry->callbacks_ready, __entry->blimit)
);

/*
 * Tracepoint for the invocation of a single RCU callback
 */
TRACE_EVENT(rcu_invoke_callback,

	TP_PROTO(struct rcu_head *rhp),

	TP_ARGS(rhp),

	TP_STRUCT__entry(
		__field(	void *,	rhp	)
		__field(	void *,	func	)
	),

	TP_fast_assign(
		__entry->rhp	= rhp;
		__entry->func	= rhp->func;
	),

	TP_printk("rhp=%p func=%pf", __entry->rhp, __entry->func)
);

/*
 * Tracepoint for the invocation of a single RCU kfree callback
 */
TRACE_EVENT(rcu_invoke_kfree_callback,

	TP_PROTO(struct rcu_head *rhp, unsigned long offset),

	TP_ARGS(rhp, offset),

	TP_STRUCT__entry(
		__field(void *,	rhp	)
		__field(unsigned long,	offset	)
	),

	TP_fast_assign(
		__entry->rhp	= rhp;
		__entry->offset	= offset;
	),

	TP_printk("rhp=%p func=%ld", __entry->rhp, __entry->offset)
);

/*
 * Tracepoint for leaving rcu_do_batch, performed after callback invocation:
 */
TRACE_EVENT(rcu_batch_end,

	TP_PROTO(int callbacks_invoked),

	TP_ARGS(callbacks_invoked),

	TP_STRUCT__entry(
		__field(	int,	callbacks_invoked		)
	),

	TP_fast_assign(
		__entry->callbacks_invoked	= callbacks_invoked;
	),

	TP_printk("CBs-invoked=%d", __entry->callbacks_invoked)
);

#endif /* _TRACE_RCU_H */

/* This part must be outside protection */
#include <trace/define_trace.h>