Extract input/output arguments from accept and connect syscalls
[lttng-modules.git] / instrumentation / events / lttng-module / regmap.h
CommitLineData
b87700e3
AG
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM regmap
3
4#if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_REGMAP_H
6
7#include <linux/ktime.h>
8#include <linux/tracepoint.h>
9#include <linux/version.h>
10
11#ifndef _TRACE_REGMAP_DEF_
12#define _TRACE_REGMAP_DEF_
13struct device;
14struct regmap;
15#endif
16
17/*
18 * Log register events
19 */
20DECLARE_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_STRUCT__entry(
28 __string( name, dev_name(dev) )
29 __field( unsigned int, reg )
30 __field( unsigned int, val )
31 ),
32
33 TP_fast_assign(
34 tp_strcpy(name, dev_name(dev))
35 tp_assign(reg, reg)
36 tp_assign(val, val)
37 ),
38
39 TP_printk("%s reg=%x val=%x", __get_str(name),
40 (unsigned int)__entry->reg,
41 (unsigned int)__entry->val)
42)
43
44DEFINE_EVENT(regmap_reg, regmap_reg_write,
45
46 TP_PROTO(struct device *dev, unsigned int reg,
47 unsigned int val),
48
49 TP_ARGS(dev, reg, val)
50
51)
52
53DEFINE_EVENT(regmap_reg, regmap_reg_read,
54
55 TP_PROTO(struct device *dev, unsigned int reg,
56 unsigned int val),
57
58 TP_ARGS(dev, reg, val)
59
60)
61
62#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
63DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
64
65 TP_PROTO(struct device *dev, unsigned int reg,
66 unsigned int val),
67
68 TP_ARGS(dev, reg, val)
69
70)
71#endif
72
73DECLARE_EVENT_CLASS(regmap_block,
74
75 TP_PROTO(struct device *dev, unsigned int reg, int count),
76
77 TP_ARGS(dev, reg, count),
78
79 TP_STRUCT__entry(
80 __string( name, dev_name(dev) )
81 __field( unsigned int, reg )
82 __field( int, count )
83 ),
84
85 TP_fast_assign(
86 tp_strcpy(name, dev_name(dev))
87 tp_assign(reg, reg)
88 tp_assign(count, count)
89 ),
90
91 TP_printk("%s reg=%x count=%d", __get_str(name),
92 (unsigned int)__entry->reg,
93 (int)__entry->count)
94)
95
96DEFINE_EVENT(regmap_block, regmap_hw_read_start,
97
98 TP_PROTO(struct device *dev, unsigned int reg, int count),
99
100 TP_ARGS(dev, reg, count)
101)
102
103DEFINE_EVENT(regmap_block, regmap_hw_read_done,
104
105 TP_PROTO(struct device *dev, unsigned int reg, int count),
106
107 TP_ARGS(dev, reg, count)
108)
109
110DEFINE_EVENT(regmap_block, regmap_hw_write_start,
111
112 TP_PROTO(struct device *dev, unsigned int reg, int count),
113
114 TP_ARGS(dev, reg, count)
115)
116
117DEFINE_EVENT(regmap_block, regmap_hw_write_done,
118
119 TP_PROTO(struct device *dev, unsigned int reg, int count),
120
121 TP_ARGS(dev, reg, count)
122)
123
124TRACE_EVENT(regcache_sync,
125
126 TP_PROTO(struct device *dev, const char *type,
127 const char *status),
128
129 TP_ARGS(dev, type, status),
130
131 TP_STRUCT__entry(
132 __string( name, dev_name(dev) )
133 __string( status, status )
134 __string( type, type )
135 ),
136
137 TP_fast_assign(
138 tp_strcpy(name, dev_name(dev))
139 tp_strcpy(status, status)
140 tp_strcpy(type, type)
141 ),
142
143 TP_printk("%s type=%s status=%s", __get_str(name),
144 __get_str(type), __get_str(status))
145)
146
147#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
148DECLARE_EVENT_CLASS(regmap_bool,
149
150 TP_PROTO(struct device *dev, bool flag),
151
152 TP_ARGS(dev, flag),
153
154 TP_STRUCT__entry(
155 __string( name, dev_name(dev) )
156 __field( int, flag )
157 ),
158
159 TP_fast_assign(
160 tp_strcpy(name, dev_name(dev))
161 tp_assign(flag, flag)
162 ),
163
164 TP_printk("%s flag=%d", __get_str(name),
165 (int)__entry->flag)
166)
167
168DEFINE_EVENT(regmap_bool, regmap_cache_only,
169
170 TP_PROTO(struct device *dev, bool flag),
171
172 TP_ARGS(dev, flag)
173
174)
175
176DEFINE_EVENT(regmap_bool, regmap_cache_bypass,
177
178 TP_PROTO(struct device *dev, bool flag),
179
180 TP_ARGS(dev, flag)
181
182)
183#endif
184
185#endif /* _TRACE_REGMAP_H */
186
187/* This part must be outside protection */
188#include "../../../probes/define_trace.h"
This page took 0.030778 seconds and 4 git commands to generate.