Commit | Line | Data |
---|---|---|
9f36eaed | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
b87700e3 AG |
2 | #undef TRACE_SYSTEM |
3 | #define TRACE_SYSTEM writeback | |
4 | ||
3bc29f0a MD |
5 | #if !defined(LTTNG_TRACE_WRITEBACK_H) || defined(TRACE_HEADER_MULTI_READ) |
6 | #define LTTNG_TRACE_WRITEBACK_H | |
b87700e3 | 7 | |
6ec43db8 | 8 | #include <probes/lttng-tracepoint-event.h> |
aa634cd1 | 9 | #include <linux/tracepoint.h> |
b87700e3 AG |
10 | #include <linux/backing-dev.h> |
11 | #include <linux/writeback.h> | |
12 | #include <linux/version.h> | |
13 | ||
14 | #ifndef _TRACE_WRITEBACK_DEF_ | |
15 | #define _TRACE_WRITEBACK_DEF_ | |
99a570c8 | 16 | |
70f6fc80 MJ |
17 | /* |
18 | * Vanilla kernels before 4.0 do not implement inode_to_bdi | |
19 | * RHEL kernels before 3.10.0-327.10.1 do not implement inode_to_bdi | |
20 | * RHEL kernel 3.10.0-327.10.1 has inode_to_bdi | |
21 | * RHEL kernel 3.10.0-327.13.1 includes a partial merge of upstream | |
22 | * commit a212b105b07d75b48b1a166378282e8a77fbf53d which inlines | |
23 | * inode_to_bdi but not sb_is_blkdev_sb making it unusable by modules. | |
24 | */ | |
25 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)) | |
26 | static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode) | |
b87700e3 | 27 | { |
70f6fc80 MJ |
28 | struct super_block *sb; |
29 | ||
30 | if (!inode) | |
31 | return &noop_backing_dev_info; | |
32 | ||
33 | sb = inode->i_sb; | |
b87700e3 AG |
34 | |
35 | if (strcmp(sb->s_type->name, "bdev") == 0) | |
36 | return inode->i_mapping->backing_dev_info; | |
37 | ||
38 | return sb->s_bdi; | |
39 | } | |
70f6fc80 MJ |
40 | #else |
41 | static inline struct backing_dev_info *lttng_inode_to_bdi(struct inode *inode) | |
42 | { | |
43 | return inode_to_bdi(inode); | |
44 | } | |
99a570c8 MD |
45 | #endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)) */ |
46 | ||
b87700e3 AG |
47 | #endif |
48 | ||
eae02feb MJ |
49 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0)) |
50 | #define show_inode_state(state) \ | |
51 | __print_flags(state, "|", \ | |
52 | {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \ | |
53 | {I_DIRTY_DATASYNC, "I_DIRTY_DATASYNC"}, \ | |
54 | {I_DIRTY_PAGES, "I_DIRTY_PAGES"}, \ | |
55 | {I_NEW, "I_NEW"}, \ | |
56 | {I_WILL_FREE, "I_WILL_FREE"}, \ | |
57 | {I_FREEING, "I_FREEING"}, \ | |
58 | {I_CLEAR, "I_CLEAR"}, \ | |
59 | {I_SYNC, "I_SYNC"}, \ | |
60 | {I_DIRTY_TIME, "I_DIRTY_TIME"}, \ | |
61 | {I_REFERENCED, "I_REFERENCED"} \ | |
62 | ) | |
63 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) | |
99a570c8 MD |
64 | #define show_inode_state(state) \ |
65 | __print_flags(state, "|", \ | |
66 | {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \ | |
67 | {I_DIRTY_DATASYNC, "I_DIRTY_DATASYNC"}, \ | |
68 | {I_DIRTY_PAGES, "I_DIRTY_PAGES"}, \ | |
69 | {I_NEW, "I_NEW"}, \ | |
70 | {I_WILL_FREE, "I_WILL_FREE"}, \ | |
71 | {I_FREEING, "I_FREEING"}, \ | |
72 | {I_CLEAR, "I_CLEAR"}, \ | |
73 | {I_SYNC, "I_SYNC"}, \ | |
74 | {I_DIRTY_TIME, "I_DIRTY_TIME"}, \ | |
75 | {I_DIRTY_TIME_EXPIRED, "I_DIRTY_TIME_EXPIRED"}, \ | |
76 | {I_REFERENCED, "I_REFERENCED"} \ | |
77 | ) | |
78 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */ | |
b87700e3 AG |
79 | #define show_inode_state(state) \ |
80 | __print_flags(state, "|", \ | |
81 | {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \ | |
82 | {I_DIRTY_DATASYNC, "I_DIRTY_DATASYNC"}, \ | |
83 | {I_DIRTY_PAGES, "I_DIRTY_PAGES"}, \ | |
84 | {I_NEW, "I_NEW"}, \ | |
85 | {I_WILL_FREE, "I_WILL_FREE"}, \ | |
86 | {I_FREEING, "I_FREEING"}, \ | |
87 | {I_CLEAR, "I_CLEAR"}, \ | |
88 | {I_SYNC, "I_SYNC"}, \ | |
89 | {I_REFERENCED, "I_REFERENCED"} \ | |
90 | ) | |
99a570c8 | 91 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */ |
b87700e3 | 92 | |
99a570c8 MD |
93 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) |
94 | ||
95 | LTTNG_TRACEPOINT_EVENT(writeback_dirty_page, | |
96 | TP_PROTO(struct page *page, struct address_space *mapping), | |
97 | TP_ARGS(page, mapping), | |
f127e61e MD |
98 | TP_FIELDS( |
99 | ctf_array_text(char, name, | |
70f6fc80 | 100 | mapping ? dev_name(lttng_inode_to_bdi(mapping->host)->dev) : "(unknown)", 32) |
f127e61e MD |
101 | ctf_integer(unsigned long, ino, mapping ? mapping->host->i_ino : 0) |
102 | ctf_integer(pgoff_t, index, page->index) | |
99a570c8 MD |
103 | ) |
104 | ) | |
105 | ||
106 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_dirty_inode_template, | |
107 | TP_PROTO(struct inode *inode, int flags), | |
108 | TP_ARGS(inode, flags), | |
f127e61e | 109 | TP_FIELDS( |
99a570c8 | 110 | /* may be called for files on pseudo FSes w/ unregistered bdi */ |
f127e61e | 111 | ctf_array_text(char, name, |
70f6fc80 MJ |
112 | lttng_inode_to_bdi(inode)->dev ? |
113 | dev_name(lttng_inode_to_bdi(inode)->dev) : "(unknown)", 32) | |
f127e61e MD |
114 | ctf_integer(unsigned long, ino, inode->i_ino) |
115 | ctf_integer(unsigned long, state, inode->i_state) | |
116 | ctf_integer(unsigned long, flags, flags) | |
99a570c8 MD |
117 | ) |
118 | ) | |
119 | #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(name) \ | |
120 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_dirty_inode_template, name, \ | |
121 | TP_PROTO(struct inode *inode, int flags), \ | |
122 | TP_ARGS(inode, flags)) | |
123 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode_start) | |
124 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode) | |
125 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_mark_inode_dirty) | |
126 | ||
127 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_write_inode_template, | |
128 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), | |
129 | TP_ARGS(inode, wbc), | |
f127e61e MD |
130 | TP_FIELDS( |
131 | ctf_array_text(char, name, | |
70f6fc80 | 132 | dev_name(lttng_inode_to_bdi(inode)->dev), 32) |
f127e61e MD |
133 | ctf_integer(unsigned long, ino, inode->i_ino) |
134 | ctf_integer(int, sync_mode, wbc->sync_mode) | |
99a570c8 MD |
135 | ) |
136 | ) | |
137 | ||
138 | #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(name) \ | |
139 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_write_inode_template, name, \ | |
140 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), \ | |
141 | TP_ARGS(inode, wbc)) | |
142 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode_start) | |
143 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode) | |
144 | ||
145 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) | |
146 | ||
aa634cd1 JD |
147 | LTTNG_TRACEPOINT_EVENT(writeback_dirty_page, |
148 | TP_PROTO(struct page *page, struct address_space *mapping), | |
149 | TP_ARGS(page, mapping), | |
f127e61e MD |
150 | TP_FIELDS( |
151 | ctf_array_text(char, name, | |
aa634cd1 | 152 | mapping ? dev_name(mapping->backing_dev_info->dev) : "(unknown)", 32) |
f127e61e MD |
153 | ctf_integer(unsigned long, ino, mapping ? mapping->host->i_ino : 0) |
154 | ctf_integer(pgoff_t, index, page->index) | |
aa634cd1 JD |
155 | ) |
156 | ) | |
157 | ||
158 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_dirty_inode_template, | |
159 | TP_PROTO(struct inode *inode, int flags), | |
160 | TP_ARGS(inode, flags), | |
f127e61e | 161 | TP_FIELDS( |
aa634cd1 | 162 | /* may be called for files on pseudo FSes w/ unregistered bdi */ |
f127e61e | 163 | ctf_array_text(char, name, |
aa634cd1 | 164 | inode->i_mapping->backing_dev_info->dev ? |
f127e61e MD |
165 | dev_name(inode->i_mapping->backing_dev_info->dev) |
166 | : "(unknown)", 32) | |
167 | ctf_integer(unsigned long, ino, inode->i_ino) | |
168 | ctf_integer(unsigned long, flags, flags) | |
aa634cd1 JD |
169 | ) |
170 | ) | |
171 | #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(name) \ | |
172 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_dirty_inode_template, name, \ | |
173 | TP_PROTO(struct inode *inode, int flags), \ | |
174 | TP_ARGS(inode, flags)) | |
175 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode_start) | |
176 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode) | |
177 | ||
178 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_write_inode_template, | |
179 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), | |
180 | TP_ARGS(inode, wbc), | |
f127e61e MD |
181 | TP_FIELDS( |
182 | ctf_array_text(char, name, | |
aa634cd1 | 183 | dev_name(inode->i_mapping->backing_dev_info->dev), 32) |
f127e61e MD |
184 | ctf_integer(unsigned long, ino, inode->i_ino) |
185 | ctf_integer(int, sync_mode, wbc->sync_mode) | |
aa634cd1 JD |
186 | ) |
187 | ) | |
188 | ||
189 | #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(name) \ | |
190 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_write_inode_template, name, \ | |
191 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), \ | |
192 | TP_ARGS(inode, wbc)) | |
193 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode_start) | |
194 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode) | |
99a570c8 | 195 | |
aa634cd1 JD |
196 | #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) */ |
197 | ||
a40cb509 MD |
198 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) |
199 | ||
200 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class, | |
201 | TP_PROTO(struct bdi_writeback *wb, struct wb_writeback_work *work), | |
202 | TP_ARGS(wb, work), | |
203 | TP_FIELDS( | |
204 | ctf_array_text(char, name, wb->bdi->dev ? dev_name(wb->bdi->dev) : | |
205 | "(unknown)", 32) | |
206 | ) | |
207 | ) | |
208 | ||
209 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) | |
99a570c8 MD |
210 | |
211 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class, | |
212 | TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), | |
213 | TP_ARGS(bdi, work), | |
f127e61e MD |
214 | TP_FIELDS( |
215 | ctf_array_text(char, name, bdi->dev ? dev_name(bdi->dev) : | |
99a570c8 | 216 | "(unknown)", 32) |
99a570c8 MD |
217 | ) |
218 | ) | |
219 | ||
220 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */ | |
221 | ||
3bc29f0a | 222 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class, |
b87700e3 AG |
223 | TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), |
224 | TP_ARGS(bdi, work), | |
f127e61e MD |
225 | TP_FIELDS( |
226 | ctf_array_text(char, name, | |
227 | dev_name(bdi->dev ? bdi->dev : | |
b87700e3 | 228 | default_backing_dev_info.dev), 32) |
b87700e3 | 229 | ) |
b87700e3 | 230 | ) |
99a570c8 MD |
231 | |
232 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */ | |
233 | ||
a40cb509 MD |
234 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) |
235 | ||
236 | #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(name) \ | |
237 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_work_class, name, \ | |
238 | TP_PROTO(struct bdi_writeback *wb, struct wb_writeback_work *work), \ | |
239 | TP_ARGS(wb, work)) | |
240 | ||
241 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */ | |
242 | ||
3bc29f0a MD |
243 | #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(name) \ |
244 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_work_class, name, \ | |
b87700e3 AG |
245 | TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), \ |
246 | TP_ARGS(bdi, work)) | |
a40cb509 MD |
247 | |
248 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */ | |
249 | ||
3bc29f0a MD |
250 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_nothread) |
251 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_queue) | |
252 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_exec) | |
b87700e3 | 253 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) |
3bc29f0a MD |
254 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_start) |
255 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_written) | |
256 | LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_wait) | |
b87700e3 AG |
257 | #endif |
258 | ||
3bc29f0a | 259 | LTTNG_TRACEPOINT_EVENT(writeback_pages_written, |
b87700e3 AG |
260 | TP_PROTO(long pages_written), |
261 | TP_ARGS(pages_written), | |
f127e61e MD |
262 | TP_FIELDS( |
263 | ctf_integer(long, pages, pages_written) | |
264 | ) | |
b87700e3 AG |
265 | ) |
266 | ||
a40cb509 MD |
267 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) |
268 | ||
269 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_class, | |
270 | TP_PROTO(struct bdi_writeback *wb), | |
271 | TP_ARGS(wb), | |
272 | TP_FIELDS( | |
273 | ctf_array_text(char, name, | |
274 | dev_name(wb->bdi->dev), 32) | |
275 | ) | |
276 | ) | |
277 | ||
278 | #undef DEFINE_WRITEBACK_EVENT | |
279 | #define DEFINE_WRITEBACK_EVENT(name) \ | |
280 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_class, name, \ | |
281 | TP_PROTO(struct bdi_writeback *wb), \ | |
282 | TP_ARGS(wb)) | |
283 | ||
284 | #define DEFINE_WRITEBACK_EVENT_MAP(name, map) \ | |
285 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(writeback_class, name, map, \ | |
286 | TP_PROTO(struct bdi_writeback *wb), \ | |
287 | TP_ARGS(wb)) | |
288 | ||
289 | LTTNG_TRACEPOINT_EVENT(writeback_bdi_register, | |
290 | TP_PROTO(struct backing_dev_info *bdi), | |
291 | TP_ARGS(bdi), | |
292 | TP_FIELDS( | |
293 | ctf_array_text(char, name, | |
294 | dev_name(bdi->dev), 32) | |
295 | ) | |
296 | ) | |
297 | ||
298 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */ | |
299 | ||
3bc29f0a | 300 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_class, |
b87700e3 AG |
301 | TP_PROTO(struct backing_dev_info *bdi), |
302 | TP_ARGS(bdi), | |
f127e61e MD |
303 | TP_FIELDS( |
304 | ctf_array_text(char, name, | |
305 | dev_name(bdi->dev), 32) | |
b87700e3 AG |
306 | ) |
307 | ) | |
a40cb509 | 308 | |
59fecd6c | 309 | #undef DEFINE_WRITEBACK_EVENT |
b87700e3 | 310 | #define DEFINE_WRITEBACK_EVENT(name) \ |
3bc29f0a | 311 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_class, name, \ |
b87700e3 AG |
312 | TP_PROTO(struct backing_dev_info *bdi), \ |
313 | TP_ARGS(bdi)) | |
314 | ||
9cf29d3e | 315 | #define DEFINE_WRITEBACK_EVENT_MAP(name, map) \ |
3bc29f0a | 316 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(writeback_class, name, map, \ |
9cf29d3e MD |
317 | TP_PROTO(struct backing_dev_info *bdi), \ |
318 | TP_ARGS(bdi)) | |
319 | ||
a40cb509 MD |
320 | DEFINE_WRITEBACK_EVENT(writeback_bdi_register) |
321 | ||
322 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */ | |
323 | ||
b87700e3 | 324 | DEFINE_WRITEBACK_EVENT(writeback_nowork) |
b87700e3 | 325 | DEFINE_WRITEBACK_EVENT(writeback_wake_background) |
b87700e3 AG |
326 | DEFINE_WRITEBACK_EVENT(writeback_wake_thread) |
327 | DEFINE_WRITEBACK_EVENT(writeback_wake_forker_thread) | |
b87700e3 AG |
328 | DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister) |
329 | DEFINE_WRITEBACK_EVENT(writeback_thread_start) | |
330 | DEFINE_WRITEBACK_EVENT(writeback_thread_stop) | |
331 | #if (LTTNG_KERNEL_RANGE(3,1,0, 3,2,0)) | |
9cf29d3e MD |
332 | DEFINE_WRITEBACK_EVENT_MAP(balance_dirty_start, writeback_balance_dirty_start) |
333 | DEFINE_WRITEBACK_EVENT_MAP(balance_dirty_wait, writeback_balance_dirty_wait) | |
334 | ||
3bc29f0a | 335 | LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_written, |
b87700e3 | 336 | |
9cf29d3e | 337 | writeback_balance_dirty_written, |
b87700e3 AG |
338 | |
339 | TP_PROTO(struct backing_dev_info *bdi, int written), | |
340 | ||
341 | TP_ARGS(bdi, written), | |
342 | ||
f127e61e MD |
343 | TP_FIELDS( |
344 | ctf_array_text(char, name, dev_name(bdi->dev), 32) | |
345 | ctf_integer(int, written, written) | |
b87700e3 AG |
346 | ) |
347 | ) | |
348 | #endif | |
349 | ||
3bc29f0a | 350 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_wbc_class, |
b87700e3 AG |
351 | TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), |
352 | TP_ARGS(wbc, bdi), | |
f127e61e MD |
353 | TP_FIELDS( |
354 | ctf_array_text(char, name, dev_name(bdi->dev), 32) | |
355 | ctf_integer(long, nr_to_write, wbc->nr_to_write) | |
356 | ctf_integer(long, pages_skipped, wbc->pages_skipped) | |
357 | ctf_integer(int, sync_mode, wbc->sync_mode) | |
358 | ctf_integer(int, for_kupdate, wbc->for_kupdate) | |
359 | ctf_integer(int, for_background, wbc->for_background) | |
360 | ctf_integer(int, for_reclaim, wbc->for_reclaim) | |
361 | ctf_integer(int, range_cyclic, wbc->range_cyclic) | |
b87700e3 | 362 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) |
f127e61e MD |
363 | ctf_integer(int, more_io, wbc->more_io) |
364 | ctf_integer(unsigned long, older_than_this, | |
365 | wbc->older_than_this ? *wbc->older_than_this : 0) | |
b87700e3 | 366 | #endif |
f127e61e MD |
367 | ctf_integer(long, range_start, (long) wbc->range_start) |
368 | ctf_integer(long, range_end, (long) wbc->range_end) | |
369 | ) | |
b87700e3 AG |
370 | ) |
371 | ||
9cf29d3e | 372 | #undef DEFINE_WBC_EVENT |
3bc29f0a MD |
373 | #define LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(name, map) \ |
374 | LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(writeback_wbc_class, name, map, \ | |
b87700e3 AG |
375 | TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), \ |
376 | TP_ARGS(wbc, bdi)) | |
377 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0)) | |
3bc29f0a MD |
378 | LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_start, writeback_wbc_writeback_start) |
379 | LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_written, writeback_wbc_writeback_written) | |
380 | LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_wait, writeback_wbc_writeback_wait) | |
381 | LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_start, writeback_wbc_balance_dirty_start) | |
382 | LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_written, writeback_wbc_balance_dirty_written) | |
383 | LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_wait, writeback_wbc_balance_dirty_wait) | |
b87700e3 | 384 | #endif |
3bc29f0a | 385 | LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writepage, writeback_wbc_writepage) |
b87700e3 | 386 | |
b74b25f3 MJ |
387 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0) || \ |
388 | LTTNG_KERNEL_RANGE(5,8,6, 5,9,0) || \ | |
389 | LTTNG_KERNEL_RANGE(5,4,62, 5,5,0) || \ | |
390 | LTTNG_KERNEL_RANGE(4,19,143, 4,20,0) || \ | |
391 | LTTNG_KERNEL_RANGE(4,14,196, 4,15,0) || \ | |
392 | LTTNG_KERNEL_RANGE(4,9,235, 4,10,0) || \ | |
01a12501 MJ |
393 | LTTNG_KERNEL_RANGE(4,4,235, 4,5,0) || \ |
394 | LTTNG_UBUNTU_KERNEL_RANGE(4,15,18,119, 4,16,0,0)) | |
87b2affc MJ |
395 | LTTNG_TRACEPOINT_EVENT(writeback_queue_io, |
396 | TP_PROTO(struct bdi_writeback *wb, | |
397 | struct wb_writeback_work *work, | |
398 | unsigned long dirtied_before, | |
399 | int moved), | |
400 | TP_ARGS(wb, work, dirtied_before, moved), | |
401 | TP_FIELDS( | |
402 | ctf_array_text(char, name, dev_name(wb->bdi->dev), 32) | |
403 | ctf_integer(unsigned long, older, dirtied_before) | |
404 | ctf_integer(int, moved, moved) | |
405 | ) | |
406 | ) | |
407 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) | |
3bc29f0a | 408 | LTTNG_TRACEPOINT_EVENT(writeback_queue_io, |
b87700e3 | 409 | TP_PROTO(struct bdi_writeback *wb, |
b87700e3 | 410 | struct wb_writeback_work *work, |
b87700e3 | 411 | int moved), |
b87700e3 | 412 | TP_ARGS(wb, work, moved), |
87b2affc MJ |
413 | TP_FIELDS( |
414 | ctf_array_text(char, name, dev_name(wb->bdi->dev), 32) | |
415 | ctf_integer(int, moved, moved) | |
416 | ) | |
417 | ) | |
418 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) | |
419 | LTTNG_TRACEPOINT_EVENT(writeback_queue_io, | |
420 | TP_PROTO(struct bdi_writeback *wb, | |
421 | unsigned long *older_than_this, | |
422 | int moved), | |
b87700e3 | 423 | TP_ARGS(wb, older_than_this, moved), |
f127e61e MD |
424 | TP_FIELDS( |
425 | ctf_array_text(char, name, dev_name(wb->bdi->dev), 32) | |
f127e61e MD |
426 | ctf_integer(unsigned long, older, |
427 | older_than_this ? *older_than_this : 0) | |
428 | ctf_integer(long, age, | |
429 | older_than_this ? | |
430 | (jiffies - *older_than_this) * 1000 / HZ | |
431 | : -1) | |
f127e61e | 432 | ctf_integer(int, moved, moved) |
b87700e3 | 433 | ) |
b87700e3 | 434 | ) |
87b2affc | 435 | #endif |
b87700e3 | 436 | |
94285cfb MJ |
437 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)) |
438 | LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state, | |
439 | ||
440 | writeback_global_dirty_state, | |
441 | ||
442 | TP_PROTO(unsigned long background_thresh, | |
443 | unsigned long dirty_thresh | |
444 | ), | |
445 | ||
446 | TP_ARGS(background_thresh, | |
447 | dirty_thresh | |
448 | ), | |
449 | ||
450 | TP_FIELDS( | |
451 | ctf_integer(unsigned long, nr_dirty, global_node_page_state(NR_FILE_DIRTY)) | |
452 | ctf_integer(unsigned long, nr_writeback, global_node_page_state(NR_WRITEBACK)) | |
453 | ctf_integer(unsigned long, nr_dirtied, global_node_page_state(NR_DIRTIED)) | |
454 | ctf_integer(unsigned long, nr_written, global_node_page_state(NR_WRITTEN)) | |
455 | ctf_integer(unsigned long, background_thresh, background_thresh) | |
456 | ctf_integer(unsigned long, dirty_thresh, dirty_thresh) | |
457 | ctf_integer(unsigned long, dirty_limit, global_dirty_limit) | |
458 | ) | |
459 | ) | |
460 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)) | |
7ceeb15d MJ |
461 | LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state, |
462 | ||
463 | writeback_global_dirty_state, | |
464 | ||
465 | TP_PROTO(unsigned long background_thresh, | |
466 | unsigned long dirty_thresh | |
467 | ), | |
468 | ||
469 | TP_ARGS(background_thresh, | |
470 | dirty_thresh | |
471 | ), | |
472 | ||
473 | TP_FIELDS( | |
474 | ctf_integer(unsigned long, nr_dirty, global_node_page_state(NR_FILE_DIRTY)) | |
475 | ctf_integer(unsigned long, nr_writeback, global_node_page_state(NR_WRITEBACK)) | |
476 | ctf_integer(unsigned long, nr_unstable, global_node_page_state(NR_UNSTABLE_NFS)) | |
477 | ctf_integer(unsigned long, nr_dirtied, global_node_page_state(NR_DIRTIED)) | |
478 | ctf_integer(unsigned long, nr_written, global_node_page_state(NR_WRITTEN)) | |
479 | ctf_integer(unsigned long, background_thresh, background_thresh) | |
480 | ctf_integer(unsigned long, dirty_thresh, dirty_thresh) | |
481 | ctf_integer(unsigned long, dirty_limit, global_dirty_limit) | |
482 | ) | |
483 | ) | |
87b2affc | 484 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) |
3bc29f0a | 485 | LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state, |
9cf29d3e MD |
486 | |
487 | writeback_global_dirty_state, | |
b87700e3 AG |
488 | |
489 | TP_PROTO(unsigned long background_thresh, | |
490 | unsigned long dirty_thresh | |
491 | ), | |
492 | ||
493 | TP_ARGS(background_thresh, | |
494 | dirty_thresh | |
495 | ), | |
496 | ||
f127e61e MD |
497 | TP_FIELDS( |
498 | ctf_integer(unsigned long, nr_dirty, global_page_state(NR_FILE_DIRTY)) | |
499 | ctf_integer(unsigned long, nr_writeback, global_page_state(NR_WRITEBACK)) | |
500 | ctf_integer(unsigned long, nr_unstable, global_page_state(NR_UNSTABLE_NFS)) | |
501 | ctf_integer(unsigned long, nr_dirtied, global_page_state(NR_DIRTIED)) | |
502 | ctf_integer(unsigned long, nr_written, global_page_state(NR_WRITTEN)) | |
503 | ctf_integer(unsigned long, background_thresh, background_thresh) | |
504 | ctf_integer(unsigned long, dirty_thresh, dirty_thresh) | |
505 | ctf_integer(unsigned long, dirty_limit, global_dirty_limit) | |
b87700e3 AG |
506 | ) |
507 | ) | |
508 | #endif | |
509 | ||
510 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) | |
511 | ||
512 | #define KBps(x) ((x) << (PAGE_SHIFT - 10)) | |
513 | ||
a40cb509 MD |
514 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) |
515 | ||
516 | LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit, | |
517 | ||
518 | writeback_bdi_dirty_ratelimit, | |
519 | ||
520 | TP_PROTO(struct bdi_writeback *wb, | |
521 | unsigned long dirty_rate, | |
522 | unsigned long task_ratelimit), | |
523 | ||
524 | TP_ARGS(wb, dirty_rate, task_ratelimit), | |
525 | ||
526 | TP_FIELDS( | |
527 | ctf_array_text(char, bdi, dev_name(wb->bdi->dev), 32) | |
528 | ctf_integer(unsigned long, write_bw, KBps(wb->bdi->wb.write_bandwidth)) | |
529 | ctf_integer(unsigned long, avg_write_bw, KBps(wb->bdi->wb.avg_write_bandwidth)) | |
530 | ctf_integer(unsigned long, dirty_rate, KBps(dirty_rate)) | |
531 | ctf_integer(unsigned long, dirty_ratelimit, KBps(wb->bdi->wb.dirty_ratelimit)) | |
532 | ctf_integer(unsigned long, task_ratelimit, KBps(task_ratelimit)) | |
533 | ctf_integer(unsigned long, balanced_dirty_ratelimit, | |
534 | KBps(wb->bdi->wb.balanced_dirty_ratelimit)) | |
535 | ) | |
536 | ) | |
537 | ||
538 | #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) | |
c7d89a6d | 539 | |
3bc29f0a | 540 | LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit, |
9cf29d3e MD |
541 | |
542 | writeback_bdi_dirty_ratelimit, | |
b87700e3 AG |
543 | |
544 | TP_PROTO(struct backing_dev_info *bdi, | |
545 | unsigned long dirty_rate, | |
546 | unsigned long task_ratelimit), | |
547 | ||
548 | TP_ARGS(bdi, dirty_rate, task_ratelimit), | |
549 | ||
f127e61e MD |
550 | TP_FIELDS( |
551 | ctf_array_text(char, bdi, dev_name(bdi->dev), 32) | |
902947a4 MJ |
552 | ctf_integer(unsigned long, write_bw, KBps(bdi->wb.write_bandwidth)) |
553 | ctf_integer(unsigned long, avg_write_bw, KBps(bdi->wb.avg_write_bandwidth)) | |
f127e61e | 554 | ctf_integer(unsigned long, dirty_rate, KBps(dirty_rate)) |
902947a4 | 555 | ctf_integer(unsigned long, dirty_ratelimit, KBps(bdi->wb.dirty_ratelimit)) |
f127e61e | 556 | ctf_integer(unsigned long, task_ratelimit, KBps(task_ratelimit)) |
902947a4 MJ |
557 | ctf_integer(unsigned long, balanced_dirty_ratelimit, |
558 | KBps(bdi->wb.balanced_dirty_ratelimit)) | |
c7d89a6d MD |
559 | ) |
560 | ) | |
561 | ||
562 | #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */ | |
563 | ||
564 | LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit, | |
565 | ||
566 | writeback_bdi_dirty_ratelimit, | |
567 | ||
568 | TP_PROTO(struct backing_dev_info *bdi, | |
569 | unsigned long dirty_rate, | |
570 | unsigned long task_ratelimit), | |
571 | ||
572 | TP_ARGS(bdi, dirty_rate, task_ratelimit), | |
573 | ||
574 | TP_FIELDS( | |
575 | ctf_array_text(char, bdi, dev_name(bdi->dev), 32) | |
576 | ctf_integer(unsigned long, write_bw, KBps(bdi->write_bandwidth)) | |
577 | ctf_integer(unsigned long, avg_write_bw, KBps(bdi->avg_write_bandwidth)) | |
578 | ctf_integer(unsigned long, dirty_rate, KBps(dirty_rate)) | |
579 | ctf_integer(unsigned long, dirty_ratelimit, KBps(bdi->dirty_ratelimit)) | |
580 | ctf_integer(unsigned long, task_ratelimit, KBps(task_ratelimit)) | |
f127e61e | 581 | ctf_integer(unsigned long, balanced_dirty_ratelimit, |
b87700e3 | 582 | KBps(bdi->balanced_dirty_ratelimit)) |
b87700e3 AG |
583 | ) |
584 | ) | |
585 | ||
c7d89a6d MD |
586 | #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)) */ |
587 | ||
a40cb509 MD |
588 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) |
589 | ||
590 | LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_pages, | |
591 | ||
592 | writeback_balance_dirty_pages, | |
593 | ||
594 | TP_PROTO(struct bdi_writeback *wb, | |
595 | unsigned long thresh, | |
596 | unsigned long bg_thresh, | |
597 | unsigned long dirty, | |
598 | unsigned long bdi_thresh, | |
599 | unsigned long bdi_dirty, | |
600 | unsigned long dirty_ratelimit, | |
601 | unsigned long task_ratelimit, | |
602 | unsigned long dirtied, | |
603 | unsigned long period, | |
604 | long pause, | |
605 | unsigned long start_time), | |
606 | ||
607 | TP_ARGS(wb, thresh, bg_thresh, dirty, bdi_thresh, bdi_dirty, | |
608 | dirty_ratelimit, task_ratelimit, | |
609 | dirtied, period, pause, start_time | |
610 | ), | |
611 | ||
612 | TP_FIELDS( | |
613 | ctf_array_text(char, bdi, dev_name(wb->bdi->dev), 32) | |
614 | ctf_integer(unsigned long, limit, global_dirty_limit) | |
615 | ctf_integer(unsigned long, setpoint, | |
616 | (global_dirty_limit + (thresh + bg_thresh) / 2) / 2) | |
617 | ctf_integer(unsigned long, dirty, dirty) | |
618 | ctf_integer(unsigned long, bdi_setpoint, | |
619 | ((global_dirty_limit + (thresh + bg_thresh) / 2) / 2) * | |
620 | bdi_thresh / (thresh + 1)) | |
621 | ctf_integer(unsigned long, bdi_dirty, bdi_dirty) | |
622 | ctf_integer(unsigned long, dirty_ratelimit, | |
623 | KBps(dirty_ratelimit)) | |
624 | ctf_integer(unsigned long, task_ratelimit, | |
625 | KBps(task_ratelimit)) | |
626 | ctf_integer(unsigned int, dirtied, dirtied) | |
627 | ctf_integer(unsigned int, dirtied_pause, | |
628 | current->nr_dirtied_pause) | |
629 | ctf_integer(unsigned long, paused, | |
630 | (jiffies - start_time) * 1000 / HZ) | |
631 | ctf_integer(long, pause, pause * 1000 / HZ) | |
632 | ctf_integer(unsigned long, period, | |
633 | period * 1000 / HZ) | |
634 | ctf_integer(long, think, | |
635 | current->dirty_paused_when == 0 ? 0 : | |
636 | (long)(jiffies - current->dirty_paused_when) * 1000/HZ) | |
637 | ) | |
638 | ) | |
639 | ||
640 | #else /* #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */ | |
641 | ||
3bc29f0a | 642 | LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_pages, |
9cf29d3e MD |
643 | |
644 | writeback_balance_dirty_pages, | |
b87700e3 AG |
645 | |
646 | TP_PROTO(struct backing_dev_info *bdi, | |
647 | unsigned long thresh, | |
648 | unsigned long bg_thresh, | |
649 | unsigned long dirty, | |
650 | unsigned long bdi_thresh, | |
651 | unsigned long bdi_dirty, | |
652 | unsigned long dirty_ratelimit, | |
653 | unsigned long task_ratelimit, | |
654 | unsigned long dirtied, | |
655 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
656 | unsigned long period, | |
657 | #endif | |
658 | long pause, | |
659 | unsigned long start_time), | |
660 | ||
661 | TP_ARGS(bdi, thresh, bg_thresh, dirty, bdi_thresh, bdi_dirty, | |
662 | dirty_ratelimit, task_ratelimit, | |
663 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) | |
f127e61e | 664 | dirtied, period, pause, start_time |
b87700e3 | 665 | #else |
f127e61e | 666 | dirtied, pause, start_time |
b87700e3 AG |
667 | #endif |
668 | ), | |
669 | ||
f127e61e MD |
670 | TP_FIELDS( |
671 | ctf_array_text(char, bdi, dev_name(bdi->dev), 32) | |
672 | ctf_integer(unsigned long, limit, global_dirty_limit) | |
673 | ctf_integer(unsigned long, setpoint, | |
b87700e3 | 674 | (global_dirty_limit + (thresh + bg_thresh) / 2) / 2) |
f127e61e MD |
675 | ctf_integer(unsigned long, dirty, dirty) |
676 | ctf_integer(unsigned long, bdi_setpoint, | |
b87700e3 | 677 | ((global_dirty_limit + (thresh + bg_thresh) / 2) / 2) * |
f127e61e MD |
678 | bdi_thresh / (thresh + 1)) |
679 | ctf_integer(unsigned long, bdi_dirty, bdi_dirty) | |
680 | ctf_integer(unsigned long, dirty_ratelimit, | |
681 | KBps(dirty_ratelimit)) | |
682 | ctf_integer(unsigned long, task_ratelimit, | |
683 | KBps(task_ratelimit)) | |
684 | ctf_integer(unsigned int, dirtied, dirtied) | |
685 | ctf_integer(unsigned int, dirtied_pause, | |
686 | current->nr_dirtied_pause) | |
687 | ctf_integer(unsigned long, paused, | |
688 | (jiffies - start_time) * 1000 / HZ) | |
689 | ctf_integer(long, pause, pause * 1000 / HZ) | |
b87700e3 | 690 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)) |
f127e61e MD |
691 | ctf_integer(unsigned long, period, |
692 | period * 1000 / HZ) | |
693 | ctf_integer(long, think, | |
694 | current->dirty_paused_when == 0 ? 0 : | |
695 | (long)(jiffies - current->dirty_paused_when) * 1000/HZ) | |
b87700e3 | 696 | #endif |
f127e61e | 697 | ) |
b87700e3 | 698 | ) |
a40cb509 MD |
699 | #endif /* #else #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */ |
700 | ||
701 | #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) */ | |
b87700e3 AG |
702 | |
703 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) | |
3bc29f0a | 704 | LTTNG_TRACEPOINT_EVENT(writeback_sb_inodes_requeue, |
b87700e3 AG |
705 | |
706 | TP_PROTO(struct inode *inode), | |
707 | TP_ARGS(inode), | |
708 | ||
f127e61e MD |
709 | TP_FIELDS( |
710 | ctf_array_text(char, name, | |
70f6fc80 | 711 | dev_name(lttng_inode_to_bdi(inode)->dev), 32) |
f127e61e MD |
712 | ctf_integer(unsigned long, ino, inode->i_ino) |
713 | ctf_integer(unsigned long, state, inode->i_state) | |
714 | ctf_integer(unsigned long, dirtied_when, inode->dirtied_when) | |
b87700e3 AG |
715 | ) |
716 | ) | |
717 | #endif | |
718 | ||
3bc29f0a | 719 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_congest_waited_template, |
b87700e3 AG |
720 | |
721 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), | |
722 | ||
723 | TP_ARGS(usec_timeout, usec_delayed), | |
724 | ||
f127e61e MD |
725 | TP_FIELDS( |
726 | ctf_integer(unsigned int, usec_timeout, usec_timeout) | |
727 | ctf_integer(unsigned int, usec_delayed, usec_delayed) | |
728 | ) | |
b87700e3 AG |
729 | ) |
730 | ||
3bc29f0a | 731 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_congest_waited_template, writeback_congestion_wait, |
b87700e3 AG |
732 | |
733 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), | |
734 | ||
735 | TP_ARGS(usec_timeout, usec_delayed) | |
736 | ) | |
737 | ||
3bc29f0a | 738 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_congest_waited_template, writeback_wait_iff_congested, |
b87700e3 AG |
739 | |
740 | TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), | |
741 | ||
742 | TP_ARGS(usec_timeout, usec_delayed) | |
743 | ) | |
b87700e3 AG |
744 | |
745 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) | |
3bc29f0a | 746 | LTTNG_TRACEPOINT_EVENT_CLASS(writeback_single_inode_template, |
b87700e3 AG |
747 | |
748 | TP_PROTO(struct inode *inode, | |
749 | struct writeback_control *wbc, | |
750 | unsigned long nr_to_write | |
751 | ), | |
752 | ||
753 | TP_ARGS(inode, wbc, nr_to_write), | |
754 | ||
f127e61e MD |
755 | TP_FIELDS( |
756 | ctf_array_text(char, name, | |
70f6fc80 | 757 | dev_name(lttng_inode_to_bdi(inode)->dev), 32) |
f127e61e MD |
758 | ctf_integer(unsigned long, ino, inode->i_ino) |
759 | ctf_integer(unsigned long, state, inode->i_state) | |
760 | ctf_integer(unsigned long, dirtied_when, inode->dirtied_when) | |
761 | ctf_integer(unsigned long, writeback_index, | |
762 | inode->i_mapping->writeback_index) | |
763 | ctf_integer(long, nr_to_write, nr_to_write) | |
764 | ctf_integer(unsigned long, wrote, | |
765 | nr_to_write - wbc->nr_to_write) | |
b87700e3 AG |
766 | ) |
767 | ) | |
768 | ||
769 | #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) | |
3bc29f0a | 770 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_single_inode_template, writeback_single_inode_requeue, |
b87700e3 AG |
771 | TP_PROTO(struct inode *inode, |
772 | struct writeback_control *wbc, | |
773 | unsigned long nr_to_write), | |
774 | TP_ARGS(inode, wbc, nr_to_write) | |
775 | ) | |
776 | #endif | |
777 | ||
3bc29f0a | 778 | LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_single_inode_template, writeback_single_inode, |
b87700e3 AG |
779 | TP_PROTO(struct inode *inode, |
780 | struct writeback_control *wbc, | |
781 | unsigned long nr_to_write), | |
782 | TP_ARGS(inode, wbc, nr_to_write) | |
783 | ) | |
784 | #endif | |
785 | ||
3bc29f0a | 786 | #endif /* LTTNG_TRACE_WRITEBACK_H */ |
b87700e3 AG |
787 | |
788 | /* This part must be outside protection */ | |
6ec43db8 | 789 | #include <probes/define_trace.h> |