Migrate tracepoint instrumentation to TP_FIELDS
[deliverable/lttng-modules.git] / instrumentation / events / lttng-module / regmap.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM regmap
3
4 #if !defined(LTTNG_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_REGMAP_H
6
7 #include "../../../probes/lttng-tracepoint-event.h"
8 #include <linux/ktime.h>
9 #include <linux/version.h>
10
11 #ifndef _TRACE_REGMAP_DEF_
12 #define _TRACE_REGMAP_DEF_
13 struct device;
14 struct regmap;
15 #endif
16
17 /*
18 * Log register events
19 */
20 LTTNG_TRACEPOINT_EVENT_CLASS(regmap_reg,
21
22 TP_PROTO(struct device *dev, unsigned int reg,
23 unsigned int val),
24
25 TP_ARGS(dev, reg, val),
26
27 TP_FIELDS(
28 ctf_string(name, dev_name(dev))
29 ctf_integer(unsigned int, reg, reg)
30 ctf_integer(unsigned int, val, val)
31 )
32 )
33
34 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_write,
35
36 TP_PROTO(struct device *dev, unsigned int reg,
37 unsigned int val),
38
39 TP_ARGS(dev, reg, val)
40
41 )
42
43 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_read,
44
45 TP_PROTO(struct device *dev, unsigned int reg,
46 unsigned int val),
47
48 TP_ARGS(dev, reg, val)
49
50 )
51
52 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
53 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_read_cache,
54
55 TP_PROTO(struct device *dev, unsigned int reg,
56 unsigned int val),
57
58 TP_ARGS(dev, reg, val)
59
60 )
61 #endif
62
63 LTTNG_TRACEPOINT_EVENT_CLASS(regmap_block,
64
65 TP_PROTO(struct device *dev, unsigned int reg, int count),
66
67 TP_ARGS(dev, reg, count),
68
69 TP_FIELDS(
70 ctf_string(name, dev_name(dev))
71 ctf_integer(unsigned int, reg, reg)
72 ctf_integer(int, count, count)
73 )
74 )
75
76 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_read_start,
77
78 TP_PROTO(struct device *dev, unsigned int reg, int count),
79
80 TP_ARGS(dev, reg, count)
81 )
82
83 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_read_done,
84
85 TP_PROTO(struct device *dev, unsigned int reg, int count),
86
87 TP_ARGS(dev, reg, count)
88 )
89
90 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_write_start,
91
92 TP_PROTO(struct device *dev, unsigned int reg, int count),
93
94 TP_ARGS(dev, reg, count)
95 )
96
97 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_write_done,
98
99 TP_PROTO(struct device *dev, unsigned int reg, int count),
100
101 TP_ARGS(dev, reg, count)
102 )
103
104 LTTNG_TRACEPOINT_EVENT_MAP(regcache_sync,
105
106 regmap_regcache_sync,
107
108 TP_PROTO(struct device *dev, const char *type,
109 const char *status),
110
111 TP_ARGS(dev, type, status),
112
113 TP_FIELDS(
114 ctf_string(name, dev_name(dev))
115 ctf_string(status, status)
116 ctf_string(type, type)
117 )
118 )
119
120 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
121 LTTNG_TRACEPOINT_EVENT_CLASS(regmap_bool,
122
123 TP_PROTO(struct device *dev, bool flag),
124
125 TP_ARGS(dev, flag),
126
127 TP_FIELDS(
128 ctf_string(name, dev_name(dev))
129 ctf_integer(int, flag, flag)
130 )
131 )
132
133 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_bool, regmap_cache_only,
134
135 TP_PROTO(struct device *dev, bool flag),
136
137 TP_ARGS(dev, flag)
138
139 )
140
141 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_bool, regmap_cache_bypass,
142
143 TP_PROTO(struct device *dev, bool flag),
144
145 TP_ARGS(dev, flag)
146
147 )
148 #endif
149
150 #endif /* LTTNG_TRACE_REGMAP_H */
151
152 /* This part must be outside protection */
153 #include "../../../probes/define_trace.h"
This page took 0.048748 seconds and 5 git commands to generate.