2 #define TRACE_SYSTEM writeback
4 #if !defined(LTTNG_TRACE_WRITEBACK_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_WRITEBACK_H
7 #include "../../../probes/lttng-tracepoint-event.h"
8 #include <linux/tracepoint.h>
9 #include <linux/backing-dev.h>
10 #include <linux/writeback.h>
11 #include <linux/version.h>
13 #ifndef _TRACE_WRITEBACK_DEF_
14 #define _TRACE_WRITEBACK_DEF_
16 #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0))
17 static inline struct backing_dev_info
*inode_to_bdi(struct inode
*inode
)
19 struct super_block
*sb
= inode
->i_sb
;
21 if (strcmp(sb
->s_type
->name
, "bdev") == 0)
22 return inode
->i_mapping
->backing_dev_info
;
26 #endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)) */
30 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
31 #define show_inode_state(state) \
32 __print_flags(state, "|", \
33 {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \
34 {I_DIRTY_DATASYNC, "I_DIRTY_DATASYNC"}, \
35 {I_DIRTY_PAGES, "I_DIRTY_PAGES"}, \
37 {I_WILL_FREE, "I_WILL_FREE"}, \
38 {I_FREEING, "I_FREEING"}, \
39 {I_CLEAR, "I_CLEAR"}, \
41 {I_DIRTY_TIME, "I_DIRTY_TIME"}, \
42 {I_DIRTY_TIME_EXPIRED, "I_DIRTY_TIME_EXPIRED"}, \
43 {I_REFERENCED, "I_REFERENCED"} \
45 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */
46 #define show_inode_state(state) \
47 __print_flags(state, "|", \
48 {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \
49 {I_DIRTY_DATASYNC, "I_DIRTY_DATASYNC"}, \
50 {I_DIRTY_PAGES, "I_DIRTY_PAGES"}, \
52 {I_WILL_FREE, "I_WILL_FREE"}, \
53 {I_FREEING, "I_FREEING"}, \
54 {I_CLEAR, "I_CLEAR"}, \
56 {I_REFERENCED, "I_REFERENCED"} \
58 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */
60 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
62 LTTNG_TRACEPOINT_EVENT(writeback_dirty_page
,
63 TP_PROTO(struct page
*page
, struct address_space
*mapping
),
64 TP_ARGS(page
, mapping
),
66 ctf_array_text(char, name
,
67 mapping
? dev_name(inode_to_bdi(mapping
->host
)->dev
) : "(unknown)", 32)
68 ctf_integer(unsigned long, ino
, mapping
? mapping
->host
->i_ino
: 0)
69 ctf_integer(pgoff_t
, index
, page
->index
)
73 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_dirty_inode_template
,
74 TP_PROTO(struct inode
*inode
, int flags
),
75 TP_ARGS(inode
, flags
),
77 /* may be called for files on pseudo FSes w/ unregistered bdi */
78 ctf_array_text(char, name
,
79 inode_to_bdi(inode
)->dev
?
80 dev_name(inode_to_bdi(inode
)->dev
) : "(unknown)", 32)
81 ctf_integer(unsigned long, ino
, inode
->i_ino
)
82 ctf_integer(unsigned long, state
, inode
->i_state
)
83 ctf_integer(unsigned long, flags
, flags
)
86 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(name) \
87 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_dirty_inode_template, name, \
88 TP_PROTO(struct inode *inode, int flags), \
89 TP_ARGS(inode, flags))
90 LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode_start
)
91 LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode
)
92 LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_mark_inode_dirty
)
94 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_write_inode_template
,
95 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
),
98 ctf_array_text(char, name
,
99 dev_name(inode_to_bdi(inode
)->dev
), 32)
100 ctf_integer(unsigned long, ino
, inode
->i_ino
)
101 ctf_integer(int, sync_mode
, wbc
->sync_mode
)
105 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(name) \
106 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_write_inode_template, name, \
107 TP_PROTO(struct inode *inode, struct writeback_control *wbc), \
109 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode_start
)
110 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode
)
112 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
114 LTTNG_TRACEPOINT_EVENT(writeback_dirty_page
,
115 TP_PROTO(struct page
*page
, struct address_space
*mapping
),
116 TP_ARGS(page
, mapping
),
118 ctf_array_text(char, name
,
119 mapping
? dev_name(mapping
->backing_dev_info
->dev
) : "(unknown)", 32)
120 ctf_integer(unsigned long, ino
, mapping
? mapping
->host
->i_ino
: 0)
121 ctf_integer(pgoff_t
, index
, page
->index
)
125 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_dirty_inode_template
,
126 TP_PROTO(struct inode
*inode
, int flags
),
127 TP_ARGS(inode
, flags
),
129 /* may be called for files on pseudo FSes w/ unregistered bdi */
130 ctf_array_text(char, name
,
131 inode
->i_mapping
->backing_dev_info
->dev
?
132 dev_name(inode
->i_mapping
->backing_dev_info
->dev
)
134 ctf_integer(unsigned long, ino
, inode
->i_ino
)
135 ctf_integer(unsigned long, flags
, flags
)
138 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(name) \
139 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_dirty_inode_template, name, \
140 TP_PROTO(struct inode *inode, int flags), \
141 TP_ARGS(inode, flags))
142 LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode_start
)
143 LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode
)
145 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_write_inode_template
,
146 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
),
149 ctf_array_text(char, name
,
150 dev_name(inode
->i_mapping
->backing_dev_info
->dev
), 32)
151 ctf_integer(unsigned long, ino
, inode
->i_ino
)
152 ctf_integer(int, sync_mode
, wbc
->sync_mode
)
156 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(name) \
157 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_write_inode_template, name, \
158 TP_PROTO(struct inode *inode, struct writeback_control *wbc), \
160 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode_start
)
161 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode
)
163 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) */
165 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
167 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class
,
168 TP_PROTO(struct backing_dev_info
*bdi
, struct wb_writeback_work
*work
),
171 ctf_array_text(char, name
, bdi
->dev
? dev_name(bdi
->dev
) :
176 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */
178 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class
,
179 TP_PROTO(struct backing_dev_info
*bdi
, struct wb_writeback_work
*work
),
182 ctf_array_text(char, name
,
183 dev_name(bdi
->dev
? bdi
->dev
:
184 default_backing_dev_info
.dev
), 32)
188 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */
190 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(name) \
191 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_work_class, name, \
192 TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), \
194 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_nothread
)
195 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_queue
)
196 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_exec
)
197 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
198 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_start
)
199 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_written
)
200 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_wait
)
203 LTTNG_TRACEPOINT_EVENT(writeback_pages_written
,
204 TP_PROTO(long pages_written
),
205 TP_ARGS(pages_written
),
207 ctf_integer(long, pages
, pages_written
)
211 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_class
,
212 TP_PROTO(struct backing_dev_info
*bdi
),
215 ctf_array_text(char, name
,
216 dev_name(bdi
->dev
), 32)
219 #undef DEFINE_WRITEBACK_EVENT
220 #define DEFINE_WRITEBACK_EVENT(name) \
221 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_class, name, \
222 TP_PROTO(struct backing_dev_info *bdi), \
225 #define DEFINE_WRITEBACK_EVENT_MAP(name, map) \
226 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(writeback_class, name, map, \
227 TP_PROTO(struct backing_dev_info *bdi), \
230 DEFINE_WRITEBACK_EVENT(writeback_nowork
)
231 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
232 DEFINE_WRITEBACK_EVENT(writeback_wake_background
)
234 DEFINE_WRITEBACK_EVENT(writeback_wake_thread
)
235 DEFINE_WRITEBACK_EVENT(writeback_wake_forker_thread
)
236 DEFINE_WRITEBACK_EVENT(writeback_bdi_register
)
237 DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister
)
238 DEFINE_WRITEBACK_EVENT(writeback_thread_start
)
239 DEFINE_WRITEBACK_EVENT(writeback_thread_stop
)
240 #if (LTTNG_KERNEL_RANGE(3,1,0, 3,2,0))
241 DEFINE_WRITEBACK_EVENT_MAP(balance_dirty_start
, writeback_balance_dirty_start
)
242 DEFINE_WRITEBACK_EVENT_MAP(balance_dirty_wait
, writeback_balance_dirty_wait
)
244 LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_written
,
246 writeback_balance_dirty_written
,
248 TP_PROTO(struct backing_dev_info
*bdi
, int written
),
250 TP_ARGS(bdi
, written
),
253 ctf_array_text(char, name
, dev_name(bdi
->dev
), 32)
254 ctf_integer(int, written
, written
)
259 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_wbc_class
,
260 TP_PROTO(struct writeback_control
*wbc
, struct backing_dev_info
*bdi
),
263 ctf_array_text(char, name
, dev_name(bdi
->dev
), 32)
264 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
265 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
266 ctf_integer(int, sync_mode
, wbc
->sync_mode
)
267 ctf_integer(int, for_kupdate
, wbc
->for_kupdate
)
268 ctf_integer(int, for_background
, wbc
->for_background
)
269 ctf_integer(int, for_reclaim
, wbc
->for_reclaim
)
270 ctf_integer(int, range_cyclic
, wbc
->range_cyclic
)
271 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
272 ctf_integer(int, more_io
, wbc
->more_io
)
273 ctf_integer(unsigned long, older_than_this
,
274 wbc
->older_than_this
? *wbc
->older_than_this
: 0)
276 ctf_integer(long, range_start
, (long) wbc
->range_start
)
277 ctf_integer(long, range_end
, (long) wbc
->range_end
)
281 #undef DEFINE_WBC_EVENT
282 #define LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(name, map) \
283 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(writeback_wbc_class, name, map, \
284 TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), \
286 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
287 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_start
, writeback_wbc_writeback_start
)
288 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_written
, writeback_wbc_writeback_written
)
289 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_wait
, writeback_wbc_writeback_wait
)
290 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_start
, writeback_wbc_balance_dirty_start
)
291 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_written
, writeback_wbc_balance_dirty_written
)
292 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_wait
, writeback_wbc_balance_dirty_wait
)
294 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writepage
, writeback_wbc_writepage
)
296 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
297 LTTNG_TRACEPOINT_EVENT(writeback_queue_io
,
298 TP_PROTO(struct bdi_writeback
*wb
,
299 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
300 struct wb_writeback_work
*work
,
302 unsigned long *older_than_this
,
305 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
306 TP_ARGS(wb
, work
, moved
),
308 TP_ARGS(wb
, older_than_this
, moved
),
311 ctf_array_text(char, name
, dev_name(wb
->bdi
->dev
), 32)
312 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
314 ctf_integer(unsigned long, older
,
315 older_than_this
? *older_than_this
: 0)
316 ctf_integer(long, age
,
318 (jiffies
- *older_than_this
) * 1000 / HZ
321 ctf_integer(int, moved
, moved
)
325 LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state
,
327 writeback_global_dirty_state
,
329 TP_PROTO(unsigned long background_thresh
,
330 unsigned long dirty_thresh
333 TP_ARGS(background_thresh
,
338 ctf_integer(unsigned long, nr_dirty
, global_page_state(NR_FILE_DIRTY
))
339 ctf_integer(unsigned long, nr_writeback
, global_page_state(NR_WRITEBACK
))
340 ctf_integer(unsigned long, nr_unstable
, global_page_state(NR_UNSTABLE_NFS
))
341 ctf_integer(unsigned long, nr_dirtied
, global_page_state(NR_DIRTIED
))
342 ctf_integer(unsigned long, nr_written
, global_page_state(NR_WRITTEN
))
343 ctf_integer(unsigned long, background_thresh
, background_thresh
)
344 ctf_integer(unsigned long, dirty_thresh
, dirty_thresh
)
345 ctf_integer(unsigned long, dirty_limit
, global_dirty_limit
)
350 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
352 #define KBps(x) ((x) << (PAGE_SHIFT - 10))
354 LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit
,
356 writeback_bdi_dirty_ratelimit
,
358 TP_PROTO(struct backing_dev_info
*bdi
,
359 unsigned long dirty_rate
,
360 unsigned long task_ratelimit
),
362 TP_ARGS(bdi
, dirty_rate
, task_ratelimit
),
365 ctf_array_text(char, bdi
, dev_name(bdi
->dev
), 32)
366 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
367 ctf_integer(unsigned long, write_bw
, KBps(bdi
->wb
.write_bandwidth
))
368 ctf_integer(unsigned long, avg_write_bw
, KBps(bdi
->wb
.avg_write_bandwidth
))
370 ctf_integer(unsigned long, write_bw
, KBps(bdi
->write_bandwidth
))
371 ctf_integer(unsigned long, avg_write_bw
, KBps(bdi
->avg_write_bandwidth
))
373 ctf_integer(unsigned long, dirty_rate
, KBps(dirty_rate
))
374 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
375 ctf_integer(unsigned long, dirty_ratelimit
, KBps(bdi
->wb
.dirty_ratelimit
))
377 ctf_integer(unsigned long, dirty_ratelimit
, KBps(bdi
->dirty_ratelimit
))
379 ctf_integer(unsigned long, task_ratelimit
, KBps(task_ratelimit
))
380 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
381 ctf_integer(unsigned long, balanced_dirty_ratelimit
,
382 KBps(bdi
->wb
.balanced_dirty_ratelimit
))
384 ctf_integer(unsigned long, balanced_dirty_ratelimit
,
385 KBps(bdi
->balanced_dirty_ratelimit
))
390 LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_pages
,
392 writeback_balance_dirty_pages
,
394 TP_PROTO(struct backing_dev_info
*bdi
,
395 unsigned long thresh
,
396 unsigned long bg_thresh
,
398 unsigned long bdi_thresh
,
399 unsigned long bdi_dirty
,
400 unsigned long dirty_ratelimit
,
401 unsigned long task_ratelimit
,
402 unsigned long dirtied
,
403 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
404 unsigned long period
,
407 unsigned long start_time
),
409 TP_ARGS(bdi
, thresh
, bg_thresh
, dirty
, bdi_thresh
, bdi_dirty
,
410 dirty_ratelimit
, task_ratelimit
,
411 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
412 dirtied
, period
, pause
, start_time
414 dirtied
, pause
, start_time
419 ctf_array_text(char, bdi
, dev_name(bdi
->dev
), 32)
420 ctf_integer(unsigned long, limit
, global_dirty_limit
)
421 ctf_integer(unsigned long, setpoint
,
422 (global_dirty_limit
+ (thresh
+ bg_thresh
) / 2) / 2)
423 ctf_integer(unsigned long, dirty
, dirty
)
424 ctf_integer(unsigned long, bdi_setpoint
,
425 ((global_dirty_limit
+ (thresh
+ bg_thresh
) / 2) / 2) *
426 bdi_thresh
/ (thresh
+ 1))
427 ctf_integer(unsigned long, bdi_dirty
, bdi_dirty
)
428 ctf_integer(unsigned long, dirty_ratelimit
,
429 KBps(dirty_ratelimit
))
430 ctf_integer(unsigned long, task_ratelimit
,
431 KBps(task_ratelimit
))
432 ctf_integer(unsigned int, dirtied
, dirtied
)
433 ctf_integer(unsigned int, dirtied_pause
,
434 current
->nr_dirtied_pause
)
435 ctf_integer(unsigned long, paused
,
436 (jiffies
- start_time
) * 1000 / HZ
)
437 ctf_integer(long, pause
, pause
* 1000 / HZ
)
438 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
439 ctf_integer(unsigned long, period
,
441 ctf_integer(long, think
,
442 current
->dirty_paused_when
== 0 ? 0 :
443 (long)(jiffies
- current
->dirty_paused_when
) * 1000/HZ
)
449 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
450 LTTNG_TRACEPOINT_EVENT(writeback_sb_inodes_requeue
,
452 TP_PROTO(struct inode
*inode
),
456 ctf_array_text(char, name
,
457 dev_name(inode_to_bdi(inode
)->dev
), 32)
458 ctf_integer(unsigned long, ino
, inode
->i_ino
)
459 ctf_integer(unsigned long, state
, inode
->i_state
)
460 ctf_integer(unsigned long, dirtied_when
, inode
->dirtied_when
)
465 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
466 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_congest_waited_template
,
468 TP_PROTO(unsigned int usec_timeout
, unsigned int usec_delayed
),
470 TP_ARGS(usec_timeout
, usec_delayed
),
473 ctf_integer(unsigned int, usec_timeout
, usec_timeout
)
474 ctf_integer(unsigned int, usec_delayed
, usec_delayed
)
478 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_congest_waited_template
, writeback_congestion_wait
,
480 TP_PROTO(unsigned int usec_timeout
, unsigned int usec_delayed
),
482 TP_ARGS(usec_timeout
, usec_delayed
)
485 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_congest_waited_template
, writeback_wait_iff_congested
,
487 TP_PROTO(unsigned int usec_timeout
, unsigned int usec_delayed
),
489 TP_ARGS(usec_timeout
, usec_delayed
)
493 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
494 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_single_inode_template
,
496 TP_PROTO(struct inode
*inode
,
497 struct writeback_control
*wbc
,
498 unsigned long nr_to_write
501 TP_ARGS(inode
, wbc
, nr_to_write
),
504 ctf_array_text(char, name
,
505 dev_name(inode_to_bdi(inode
)->dev
), 32)
506 ctf_integer(unsigned long, ino
, inode
->i_ino
)
507 ctf_integer(unsigned long, state
, inode
->i_state
)
508 ctf_integer(unsigned long, dirtied_when
, inode
->dirtied_when
)
509 ctf_integer(unsigned long, writeback_index
,
510 inode
->i_mapping
->writeback_index
)
511 ctf_integer(long, nr_to_write
, nr_to_write
)
512 ctf_integer(unsigned long, wrote
,
513 nr_to_write
- wbc
->nr_to_write
)
517 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
518 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_single_inode_template
, writeback_single_inode_requeue
,
519 TP_PROTO(struct inode
*inode
,
520 struct writeback_control
*wbc
,
521 unsigned long nr_to_write
),
522 TP_ARGS(inode
, wbc
, nr_to_write
)
526 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_single_inode_template
, writeback_single_inode
,
527 TP_PROTO(struct inode
*inode
,
528 struct writeback_control
*wbc
,
529 unsigned long nr_to_write
),
530 TP_ARGS(inode
, wbc
, nr_to_write
)
534 #endif /* LTTNG_TRACE_WRITEBACK_H */
536 /* This part must be outside protection */
537 #include "../../../probes/define_trace.h"