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(3,2,0))
61 #define WB_WORK_REASON \
62 {WB_REASON_BACKGROUND, "background"}, \
63 {WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages"}, \
64 {WB_REASON_SYNC, "sync"}, \
65 {WB_REASON_PERIODIC, "periodic"}, \
66 {WB_REASON_LAPTOP_TIMER, "laptop_timer"}, \
67 {WB_REASON_FREE_MORE_MEM, "free_more_memory"}, \
68 {WB_REASON_FS_FREE_SPACE, "fs_free_space"}, \
69 {WB_REASON_FORKER_THREAD, "forker_thread"}
72 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
74 LTTNG_TRACEPOINT_EVENT(writeback_dirty_page
,
75 TP_PROTO(struct page
*page
, struct address_space
*mapping
),
76 TP_ARGS(page
, mapping
),
78 ctf_array_text(char, name
,
79 mapping
? dev_name(inode_to_bdi(mapping
->host
)->dev
) : "(unknown)", 32)
80 ctf_integer(unsigned long, ino
, mapping
? mapping
->host
->i_ino
: 0)
81 ctf_integer(pgoff_t
, index
, page
->index
)
85 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_dirty_inode_template
,
86 TP_PROTO(struct inode
*inode
, int flags
),
87 TP_ARGS(inode
, flags
),
89 /* may be called for files on pseudo FSes w/ unregistered bdi */
90 ctf_array_text(char, name
,
91 inode_to_bdi(inode
)->dev
?
92 dev_name(inode_to_bdi(inode
)->dev
) : "(unknown)", 32)
93 ctf_integer(unsigned long, ino
, inode
->i_ino
)
94 ctf_integer(unsigned long, state
, inode
->i_state
)
95 ctf_integer(unsigned long, flags
, flags
)
98 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(name) \
99 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_dirty_inode_template, name, \
100 TP_PROTO(struct inode *inode, int flags), \
101 TP_ARGS(inode, flags))
102 LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode_start
)
103 LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode
)
104 LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_mark_inode_dirty
)
106 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_write_inode_template
,
107 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
),
110 ctf_array_text(char, name
,
111 dev_name(inode_to_bdi(inode
)->dev
), 32)
112 ctf_integer(unsigned long, ino
, inode
->i_ino
)
113 ctf_integer(int, sync_mode
, wbc
->sync_mode
)
117 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(name) \
118 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_write_inode_template, name, \
119 TP_PROTO(struct inode *inode, struct writeback_control *wbc), \
121 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode_start
)
122 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode
)
124 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
126 LTTNG_TRACEPOINT_EVENT(writeback_dirty_page
,
127 TP_PROTO(struct page
*page
, struct address_space
*mapping
),
128 TP_ARGS(page
, mapping
),
130 ctf_array_text(char, name
,
131 mapping
? dev_name(mapping
->backing_dev_info
->dev
) : "(unknown)", 32)
132 ctf_integer(unsigned long, ino
, mapping
? mapping
->host
->i_ino
: 0)
133 ctf_integer(pgoff_t
, index
, page
->index
)
137 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_dirty_inode_template
,
138 TP_PROTO(struct inode
*inode
, int flags
),
139 TP_ARGS(inode
, flags
),
141 /* may be called for files on pseudo FSes w/ unregistered bdi */
142 ctf_array_text(char, name
,
143 inode
->i_mapping
->backing_dev_info
->dev
?
144 dev_name(inode
->i_mapping
->backing_dev_info
->dev
)
146 ctf_integer(unsigned long, ino
, inode
->i_ino
)
147 ctf_integer(unsigned long, flags
, flags
)
150 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(name) \
151 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_dirty_inode_template, name, \
152 TP_PROTO(struct inode *inode, int flags), \
153 TP_ARGS(inode, flags))
154 LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode_start
)
155 LTTNG_TRACEPOINT_EVENT_WRITEBACK_DIRTY_INODE_TEMPLATE(writeback_dirty_inode
)
157 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_write_inode_template
,
158 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
),
161 ctf_array_text(char, name
,
162 dev_name(inode
->i_mapping
->backing_dev_info
->dev
), 32)
163 ctf_integer(unsigned long, ino
, inode
->i_ino
)
164 ctf_integer(int, sync_mode
, wbc
->sync_mode
)
168 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(name) \
169 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_write_inode_template, name, \
170 TP_PROTO(struct inode *inode, struct writeback_control *wbc), \
172 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode_start
)
173 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WRITE_INODE(writeback_write_inode
)
175 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) */
177 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0))
179 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class
,
180 TP_PROTO(struct backing_dev_info
*bdi
, struct wb_writeback_work
*work
),
183 ctf_array_text(char, name
, bdi
->dev
? dev_name(bdi
->dev
) :
188 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */
190 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_work_class
,
191 TP_PROTO(struct backing_dev_info
*bdi
, struct wb_writeback_work
*work
),
194 ctf_array_text(char, name
,
195 dev_name(bdi
->dev
? bdi
->dev
:
196 default_backing_dev_info
.dev
), 32)
200 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)) */
202 #define LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(name) \
203 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_work_class, name, \
204 TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), \
206 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_nothread
)
207 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_queue
)
208 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_exec
)
209 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
210 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_start
)
211 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_written
)
212 LTTNG_TRACEPOINT_EVENT_WRITEBACK_WORK_INSTANCE(writeback_wait
)
215 LTTNG_TRACEPOINT_EVENT(writeback_pages_written
,
216 TP_PROTO(long pages_written
),
217 TP_ARGS(pages_written
),
219 ctf_integer(long, pages
, pages_written
)
223 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_class
,
224 TP_PROTO(struct backing_dev_info
*bdi
),
227 ctf_array_text(char, name
,
228 dev_name(bdi
->dev
), 32)
231 #undef DEFINE_WRITEBACK_EVENT
232 #define DEFINE_WRITEBACK_EVENT(name) \
233 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_class, name, \
234 TP_PROTO(struct backing_dev_info *bdi), \
237 #define DEFINE_WRITEBACK_EVENT_MAP(name, map) \
238 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(writeback_class, name, map, \
239 TP_PROTO(struct backing_dev_info *bdi), \
242 DEFINE_WRITEBACK_EVENT(writeback_nowork
)
243 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
244 DEFINE_WRITEBACK_EVENT(writeback_wake_background
)
246 DEFINE_WRITEBACK_EVENT(writeback_wake_thread
)
247 DEFINE_WRITEBACK_EVENT(writeback_wake_forker_thread
)
248 DEFINE_WRITEBACK_EVENT(writeback_bdi_register
)
249 DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister
)
250 DEFINE_WRITEBACK_EVENT(writeback_thread_start
)
251 DEFINE_WRITEBACK_EVENT(writeback_thread_stop
)
252 #if (LTTNG_KERNEL_RANGE(3,1,0, 3,2,0))
253 DEFINE_WRITEBACK_EVENT_MAP(balance_dirty_start
, writeback_balance_dirty_start
)
254 DEFINE_WRITEBACK_EVENT_MAP(balance_dirty_wait
, writeback_balance_dirty_wait
)
256 LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_written
,
258 writeback_balance_dirty_written
,
260 TP_PROTO(struct backing_dev_info
*bdi
, int written
),
262 TP_ARGS(bdi
, written
),
265 ctf_array_text(char, name
, dev_name(bdi
->dev
), 32)
266 ctf_integer(int, written
, written
)
271 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_wbc_class
,
272 TP_PROTO(struct writeback_control
*wbc
, struct backing_dev_info
*bdi
),
275 ctf_array_text(char, name
, dev_name(bdi
->dev
), 32)
276 ctf_integer(long, nr_to_write
, wbc
->nr_to_write
)
277 ctf_integer(long, pages_skipped
, wbc
->pages_skipped
)
278 ctf_integer(int, sync_mode
, wbc
->sync_mode
)
279 ctf_integer(int, for_kupdate
, wbc
->for_kupdate
)
280 ctf_integer(int, for_background
, wbc
->for_background
)
281 ctf_integer(int, for_reclaim
, wbc
->for_reclaim
)
282 ctf_integer(int, range_cyclic
, wbc
->range_cyclic
)
283 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
284 ctf_integer(int, more_io
, wbc
->more_io
)
285 ctf_integer(unsigned long, older_than_this
,
286 wbc
->older_than_this
? *wbc
->older_than_this
: 0)
288 ctf_integer(long, range_start
, (long) wbc
->range_start
)
289 ctf_integer(long, range_end
, (long) wbc
->range_end
)
293 #undef DEFINE_WBC_EVENT
294 #define LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(name, map) \
295 LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(writeback_wbc_class, name, map, \
296 TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), \
298 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
299 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_start
, writeback_wbc_writeback_start
)
300 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_written
, writeback_wbc_writeback_written
)
301 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writeback_wait
, writeback_wbc_writeback_wait
)
302 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_start
, writeback_wbc_balance_dirty_start
)
303 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_written
, writeback_wbc_balance_dirty_written
)
304 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_balance_dirty_wait
, writeback_wbc_balance_dirty_wait
)
306 LTTNG_TRACEPOINT_EVENT_WBC_INSTANCE(wbc_writepage
, writeback_wbc_writepage
)
308 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
309 LTTNG_TRACEPOINT_EVENT(writeback_queue_io
,
310 TP_PROTO(struct bdi_writeback
*wb
,
311 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
312 struct wb_writeback_work
*work
,
314 unsigned long *older_than_this
,
317 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
318 TP_ARGS(wb
, work
, moved
),
320 TP_ARGS(wb
, older_than_this
, moved
),
323 ctf_array_text(char, name
, dev_name(wb
->bdi
->dev
), 32)
324 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
326 ctf_integer(unsigned long, older
,
327 older_than_this
? *older_than_this
: 0)
328 ctf_integer(long, age
,
330 (jiffies
- *older_than_this
) * 1000 / HZ
333 ctf_integer(int, moved
, moved
)
337 LTTNG_TRACEPOINT_EVENT_MAP(global_dirty_state
,
339 writeback_global_dirty_state
,
341 TP_PROTO(unsigned long background_thresh
,
342 unsigned long dirty_thresh
345 TP_ARGS(background_thresh
,
350 ctf_integer(unsigned long, nr_dirty
, global_page_state(NR_FILE_DIRTY
))
351 ctf_integer(unsigned long, nr_writeback
, global_page_state(NR_WRITEBACK
))
352 ctf_integer(unsigned long, nr_unstable
, global_page_state(NR_UNSTABLE_NFS
))
353 ctf_integer(unsigned long, nr_dirtied
, global_page_state(NR_DIRTIED
))
354 ctf_integer(unsigned long, nr_written
, global_page_state(NR_WRITTEN
))
355 ctf_integer(unsigned long, background_thresh
, background_thresh
)
356 ctf_integer(unsigned long, dirty_thresh
, dirty_thresh
)
357 ctf_integer(unsigned long, dirty_limit
, global_dirty_limit
)
362 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
364 #define KBps(x) ((x) << (PAGE_SHIFT - 10))
366 LTTNG_TRACEPOINT_EVENT_MAP(bdi_dirty_ratelimit
,
368 writeback_bdi_dirty_ratelimit
,
370 TP_PROTO(struct backing_dev_info
*bdi
,
371 unsigned long dirty_rate
,
372 unsigned long task_ratelimit
),
374 TP_ARGS(bdi
, dirty_rate
, task_ratelimit
),
377 ctf_array_text(char, bdi
, dev_name(bdi
->dev
), 32)
378 ctf_integer(unsigned long, write_bw
, KBps(bdi
->write_bandwidth
))
379 ctf_integer(unsigned long, avg_write_bw
, KBps(bdi
->avg_write_bandwidth
))
380 ctf_integer(unsigned long, dirty_rate
, KBps(dirty_rate
))
381 ctf_integer(unsigned long, dirty_ratelimit
, KBps(bdi
->dirty_ratelimit
))
382 ctf_integer(unsigned long, task_ratelimit
, KBps(task_ratelimit
))
383 ctf_integer(unsigned long, balanced_dirty_ratelimit
,
384 KBps(bdi
->balanced_dirty_ratelimit
))
388 LTTNG_TRACEPOINT_EVENT_MAP(balance_dirty_pages
,
390 writeback_balance_dirty_pages
,
392 TP_PROTO(struct backing_dev_info
*bdi
,
393 unsigned long thresh
,
394 unsigned long bg_thresh
,
396 unsigned long bdi_thresh
,
397 unsigned long bdi_dirty
,
398 unsigned long dirty_ratelimit
,
399 unsigned long task_ratelimit
,
400 unsigned long dirtied
,
401 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
402 unsigned long period
,
405 unsigned long start_time
),
407 TP_ARGS(bdi
, thresh
, bg_thresh
, dirty
, bdi_thresh
, bdi_dirty
,
408 dirty_ratelimit
, task_ratelimit
,
409 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
410 dirtied
, period
, pause
, start_time
412 dirtied
, pause
, start_time
417 ctf_array_text(char, bdi
, dev_name(bdi
->dev
), 32)
418 ctf_integer(unsigned long, limit
, global_dirty_limit
)
419 ctf_integer(unsigned long, setpoint
,
420 (global_dirty_limit
+ (thresh
+ bg_thresh
) / 2) / 2)
421 ctf_integer(unsigned long, dirty
, dirty
)
422 ctf_integer(unsigned long, bdi_setpoint
,
423 ((global_dirty_limit
+ (thresh
+ bg_thresh
) / 2) / 2) *
424 bdi_thresh
/ (thresh
+ 1))
425 ctf_integer(unsigned long, bdi_dirty
, bdi_dirty
)
426 ctf_integer(unsigned long, dirty_ratelimit
,
427 KBps(dirty_ratelimit
))
428 ctf_integer(unsigned long, task_ratelimit
,
429 KBps(task_ratelimit
))
430 ctf_integer(unsigned int, dirtied
, dirtied
)
431 ctf_integer(unsigned int, dirtied_pause
,
432 current
->nr_dirtied_pause
)
433 ctf_integer(unsigned long, paused
,
434 (jiffies
- start_time
) * 1000 / HZ
)
435 ctf_integer(long, pause
, pause
* 1000 / HZ
)
436 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
437 ctf_integer(unsigned long, period
,
439 ctf_integer(long, think
,
440 current
->dirty_paused_when
== 0 ? 0 :
441 (long)(jiffies
- current
->dirty_paused_when
) * 1000/HZ
)
447 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
448 LTTNG_TRACEPOINT_EVENT(writeback_sb_inodes_requeue
,
450 TP_PROTO(struct inode
*inode
),
454 ctf_array_text(char, name
,
455 dev_name(inode_to_bdi(inode
)->dev
), 32)
456 ctf_integer(unsigned long, ino
, inode
->i_ino
)
457 ctf_integer(unsigned long, state
, inode
->i_state
)
458 ctf_integer(unsigned long, dirtied_when
, inode
->dirtied_when
)
463 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
464 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_congest_waited_template
,
466 TP_PROTO(unsigned int usec_timeout
, unsigned int usec_delayed
),
468 TP_ARGS(usec_timeout
, usec_delayed
),
471 ctf_integer(unsigned int, usec_timeout
, usec_timeout
)
472 ctf_integer(unsigned int, usec_delayed
, usec_delayed
)
476 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_congest_waited_template
, writeback_congestion_wait
,
478 TP_PROTO(unsigned int usec_timeout
, unsigned int usec_delayed
),
480 TP_ARGS(usec_timeout
, usec_delayed
)
483 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_congest_waited_template
, writeback_wait_iff_congested
,
485 TP_PROTO(unsigned int usec_timeout
, unsigned int usec_delayed
),
487 TP_ARGS(usec_timeout
, usec_delayed
)
491 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
492 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_single_inode_template
,
494 TP_PROTO(struct inode
*inode
,
495 struct writeback_control
*wbc
,
496 unsigned long nr_to_write
499 TP_ARGS(inode
, wbc
, nr_to_write
),
502 ctf_array_text(char, name
,
503 dev_name(inode_to_bdi(inode
)->dev
), 32)
504 ctf_integer(unsigned long, ino
, inode
->i_ino
)
505 ctf_integer(unsigned long, state
, inode
->i_state
)
506 ctf_integer(unsigned long, dirtied_when
, inode
->dirtied_when
)
507 ctf_integer(unsigned long, writeback_index
,
508 inode
->i_mapping
->writeback_index
)
509 ctf_integer(long, nr_to_write
, nr_to_write
)
510 ctf_integer(unsigned long, wrote
,
511 nr_to_write
- wbc
->nr_to_write
)
515 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0))
516 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_single_inode_template
, writeback_single_inode_requeue
,
517 TP_PROTO(struct inode
*inode
,
518 struct writeback_control
*wbc
,
519 unsigned long nr_to_write
),
520 TP_ARGS(inode
, wbc
, nr_to_write
)
524 LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_single_inode_template
, writeback_single_inode
,
525 TP_PROTO(struct inode
*inode
,
526 struct writeback_control
*wbc
,
527 unsigned long nr_to_write
),
528 TP_ARGS(inode
, wbc
, nr_to_write
)
532 #endif /* LTTNG_TRACE_WRITEBACK_H */
534 /* This part must be outside protection */
535 #include "../../../probes/define_trace.h"