1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #define TRACE_SYSTEM ext3
5 #if !defined(LTTNG_TRACE_EXT3_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_EXT3_H
8 #include <lttng/tracepoint-event.h>
9 #include <lttng/kernel-version.h>
11 LTTNG_TRACEPOINT_EVENT(ext3_free_inode
,
12 TP_PROTO(struct inode
*inode
),
17 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
18 ctf_integer(ino_t
, ino
, inode
->i_ino
)
19 ctf_integer(umode_t
, mode
, inode
->i_mode
)
20 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
21 ctf_integer(uid_t
, uid
, i_uid_read(inode
))
22 ctf_integer(gid_t
, gid
, i_gid_read(inode
))
24 ctf_integer(uid_t
, uid
, inode
->i_uid
)
25 ctf_integer(gid_t
, gid
, inode
->i_gid
)
27 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
31 LTTNG_TRACEPOINT_EVENT(ext3_request_inode
,
32 TP_PROTO(struct inode
*dir
, int mode
),
37 ctf_integer(dev_t
, dev
, dir
->i_sb
->s_dev
)
38 ctf_integer(ino_t
, dir
, dir
->i_ino
)
39 ctf_integer(umode_t
, mode
, mode
)
43 LTTNG_TRACEPOINT_EVENT(ext3_allocate_inode
,
44 TP_PROTO(struct inode
*inode
, struct inode
*dir
, int mode
),
46 TP_ARGS(inode
, dir
, mode
),
49 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
50 ctf_integer(ino_t
, ino
, inode
->i_ino
)
51 ctf_integer(ino_t
, dir
, dir
->i_ino
)
52 ctf_integer(umode_t
, mode
, mode
)
56 LTTNG_TRACEPOINT_EVENT(ext3_evict_inode
,
57 TP_PROTO(struct inode
*inode
),
62 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
63 ctf_integer(ino_t
, ino
, inode
->i_ino
)
64 ctf_integer(int, nlink
, inode
->i_nlink
)
68 LTTNG_TRACEPOINT_EVENT(ext3_drop_inode
,
69 TP_PROTO(struct inode
*inode
, int drop
),
74 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
75 ctf_integer(ino_t
, ino
, inode
->i_ino
)
76 ctf_integer(int, drop
, drop
)
80 LTTNG_TRACEPOINT_EVENT(ext3_mark_inode_dirty
,
81 TP_PROTO(struct inode
*inode
, unsigned long IP
),
86 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
87 ctf_integer(ino_t
, ino
, inode
->i_ino
)
88 ctf_integer_hex(unsigned long, ip
, IP
)
92 LTTNG_TRACEPOINT_EVENT(ext3_write_begin
,
93 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
96 TP_ARGS(inode
, pos
, len
, flags
),
99 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
100 ctf_integer(ino_t
, ino
, inode
->i_ino
)
101 ctf_integer(loff_t
, pos
, pos
)
102 ctf_integer(unsigned int, len
, len
)
103 ctf_integer(unsigned int, flags
, flags
)
107 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__write_end
,
108 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
109 unsigned int copied
),
111 TP_ARGS(inode
, pos
, len
, copied
),
114 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
115 ctf_integer(ino_t
, ino
, inode
->i_ino
)
116 ctf_integer(loff_t
, pos
, pos
)
117 ctf_integer(unsigned int, len
, len
)
118 ctf_integer(unsigned int, copied
, copied
)
122 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end
, ext3_ordered_write_end
,
124 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
125 unsigned int copied
),
127 TP_ARGS(inode
, pos
, len
, copied
)
130 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end
, ext3_writeback_write_end
,
132 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
133 unsigned int copied
),
135 TP_ARGS(inode
, pos
, len
, copied
)
138 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end
, ext3_journalled_write_end
,
140 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
141 unsigned int copied
),
143 TP_ARGS(inode
, pos
, len
, copied
)
146 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__page_op
,
147 TP_PROTO(struct page
*page
),
152 ctf_integer(dev_t
, dev
, page
->mapping
->host
->i_sb
->s_dev
)
153 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
154 ctf_integer(pgoff_t
, index
, page
->index
)
158 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op
, ext3_ordered_writepage
,
160 TP_PROTO(struct page
*page
),
165 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op
, ext3_writeback_writepage
,
167 TP_PROTO(struct page
*page
),
172 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op
, ext3_journalled_writepage
,
174 TP_PROTO(struct page
*page
),
179 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op
, ext3_readpage
,
181 TP_PROTO(struct page
*page
),
186 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op
, ext3_releasepage
,
188 TP_PROTO(struct page
*page
),
193 #if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,11,0))
195 LTTNG_TRACEPOINT_EVENT(ext3_invalidatepage
,
196 TP_PROTO(struct page
*page
, unsigned int offset
, unsigned int length
),
198 TP_ARGS(page
, offset
, length
),
201 ctf_integer(pgoff_t
, index
, page
->index
)
202 ctf_integer(unsigned int, offset
, offset
)
203 ctf_integer(unsigned int, length
, length
)
204 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
205 ctf_integer(dev_t
, dev
, page
->mapping
->host
->i_sb
->s_dev
)
211 LTTNG_TRACEPOINT_EVENT(ext3_invalidatepage
,
212 TP_PROTO(struct page
*page
, unsigned long offset
),
214 TP_ARGS(page
, offset
),
217 ctf_integer(pgoff_t
, index
, page
->index
)
218 ctf_integer(unsigned long, offset
, offset
)
219 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
220 ctf_integer(dev_t
, dev
, page
->mapping
->host
->i_sb
->s_dev
)
226 LTTNG_TRACEPOINT_EVENT(ext3_discard_blocks
,
227 TP_PROTO(struct super_block
*sb
, unsigned long blk
,
228 unsigned long count
),
230 TP_ARGS(sb
, blk
, count
),
233 ctf_integer(dev_t
, dev
, sb
->s_dev
)
234 ctf_integer(unsigned long, blk
, blk
)
235 ctf_integer(unsigned long, count
, count
)
239 LTTNG_TRACEPOINT_EVENT(ext3_request_blocks
,
240 TP_PROTO(struct inode
*inode
, unsigned long goal
,
241 unsigned long count
),
243 TP_ARGS(inode
, goal
, count
),
246 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
247 ctf_integer(ino_t
, ino
, inode
->i_ino
)
248 ctf_integer(unsigned long, count
, count
)
249 ctf_integer(unsigned long, goal
, goal
)
253 LTTNG_TRACEPOINT_EVENT(ext3_allocate_blocks
,
254 TP_PROTO(struct inode
*inode
, unsigned long goal
,
255 unsigned long count
, unsigned long block
),
257 TP_ARGS(inode
, goal
, count
, block
),
260 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
261 ctf_integer(ino_t
, ino
, inode
->i_ino
)
262 ctf_integer(unsigned long, block
, block
)
263 ctf_integer(unsigned long, count
, count
)
264 ctf_integer(unsigned long, goal
, goal
)
268 LTTNG_TRACEPOINT_EVENT(ext3_free_blocks
,
269 TP_PROTO(struct inode
*inode
, unsigned long block
,
270 unsigned long count
),
272 TP_ARGS(inode
, block
, count
),
275 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
276 ctf_integer(ino_t
, ino
, inode
->i_ino
)
277 ctf_integer(umode_t
, mode
, inode
->i_mode
)
278 ctf_integer(unsigned long, block
, block
)
279 ctf_integer(unsigned long, count
, count
)
283 LTTNG_TRACEPOINT_EVENT(ext3_sync_file_enter
,
284 TP_PROTO(struct file
*file
, int datasync
),
286 TP_ARGS(file
, datasync
),
289 ctf_integer(dev_t
, dev
, file
->f_path
.dentry
->d_inode
->i_sb
->s_dev
)
290 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
291 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
292 ctf_integer(int, datasync
, datasync
)
296 LTTNG_TRACEPOINT_EVENT(ext3_sync_file_exit
,
297 TP_PROTO(struct inode
*inode
, int ret
),
302 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
303 ctf_integer(ino_t
, ino
, inode
->i_ino
)
304 ctf_integer(int, ret
, ret
)
308 LTTNG_TRACEPOINT_EVENT(ext3_sync_fs
,
309 TP_PROTO(struct super_block
*sb
, int wait
),
314 ctf_integer(dev_t
, dev
, sb
->s_dev
)
315 ctf_integer(int, wait
, wait
)
319 LTTNG_TRACEPOINT_EVENT(ext3_rsv_window_add
,
320 TP_PROTO(struct super_block
*sb
,
321 struct ext3_reserve_window_node
*rsv_node
),
323 TP_ARGS(sb
, rsv_node
),
326 ctf_integer(unsigned long, start
, rsv_node
->rsv_window
._rsv_start
)
327 ctf_integer(unsigned long, end
, rsv_node
->rsv_window
._rsv_end
)
328 ctf_integer(dev_t
, dev
, sb
->s_dev
)
332 LTTNG_TRACEPOINT_EVENT(ext3_discard_reservation
,
333 TP_PROTO(struct inode
*inode
,
334 struct ext3_reserve_window_node
*rsv_node
),
336 TP_ARGS(inode
, rsv_node
),
339 ctf_integer(unsigned long, start
, rsv_node
->rsv_window
._rsv_start
)
340 ctf_integer(unsigned long, end
, rsv_node
->rsv_window
._rsv_end
)
341 ctf_integer(ino_t
, ino
, inode
->i_ino
)
342 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
346 LTTNG_TRACEPOINT_EVENT(ext3_alloc_new_reservation
,
347 TP_PROTO(struct super_block
*sb
, unsigned long goal
),
352 ctf_integer(dev_t
, dev
, sb
->s_dev
)
353 ctf_integer(unsigned long, goal
, goal
)
357 LTTNG_TRACEPOINT_EVENT(ext3_reserved
,
358 TP_PROTO(struct super_block
*sb
, unsigned long block
,
359 struct ext3_reserve_window_node
*rsv_node
),
361 TP_ARGS(sb
, block
, rsv_node
),
364 ctf_integer(unsigned long, block
, block
)
365 ctf_integer(unsigned long, start
, rsv_node
->rsv_window
._rsv_start
)
366 ctf_integer(unsigned long, end
, rsv_node
->rsv_window
._rsv_end
)
367 ctf_integer(dev_t
, dev
, sb
->s_dev
)
371 LTTNG_TRACEPOINT_EVENT(ext3_forget
,
372 TP_PROTO(struct inode
*inode
, int is_metadata
, unsigned long block
),
374 TP_ARGS(inode
, is_metadata
, block
),
377 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
378 ctf_integer(ino_t
, ino
, inode
->i_ino
)
379 ctf_integer(umode_t
, mode
, inode
->i_mode
)
380 ctf_integer(int, is_metadata
, is_metadata
)
381 ctf_integer(unsigned long, block
, block
)
385 LTTNG_TRACEPOINT_EVENT(ext3_read_block_bitmap
,
386 TP_PROTO(struct super_block
*sb
, unsigned int group
),
391 ctf_integer(dev_t
, dev
, sb
->s_dev
)
392 ctf_integer(__u32
, group
, group
)
396 LTTNG_TRACEPOINT_EVENT(ext3_direct_IO_enter
,
397 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
, int rw
),
399 TP_ARGS(inode
, offset
, len
, rw
),
402 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
403 ctf_integer(ino_t
, ino
, inode
->i_ino
)
404 ctf_integer(loff_t
, pos
, offset
)
405 ctf_integer(unsigned long, len
, len
)
406 ctf_integer(int, rw
, rw
)
410 LTTNG_TRACEPOINT_EVENT(ext3_direct_IO_exit
,
411 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
,
414 TP_ARGS(inode
, offset
, len
, rw
, ret
),
417 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
418 ctf_integer(ino_t
, ino
, inode
->i_ino
)
419 ctf_integer(loff_t
, pos
, offset
)
420 ctf_integer(unsigned long, len
, len
)
421 ctf_integer(int, rw
, rw
)
422 ctf_integer(int, ret
, ret
)
426 LTTNG_TRACEPOINT_EVENT(ext3_unlink_enter
,
427 TP_PROTO(struct inode
*parent
, struct dentry
*dentry
),
429 TP_ARGS(parent
, dentry
),
432 ctf_integer(ino_t
, parent
, parent
->i_ino
)
433 ctf_integer(ino_t
, ino
, dentry
->d_inode
->i_ino
)
434 ctf_integer(loff_t
, size
, dentry
->d_inode
->i_size
)
435 ctf_integer(dev_t
, dev
, dentry
->d_inode
->i_sb
->s_dev
)
439 LTTNG_TRACEPOINT_EVENT(ext3_unlink_exit
,
440 TP_PROTO(struct dentry
*dentry
, int ret
),
442 TP_ARGS(dentry
, ret
),
445 ctf_integer(dev_t
, dev
, dentry
->d_inode
->i_sb
->s_dev
)
446 ctf_integer(ino_t
, ino
, dentry
->d_inode
->i_ino
)
447 ctf_integer(int, ret
, ret
)
451 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__truncate
,
452 TP_PROTO(struct inode
*inode
),
457 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
458 ctf_integer(ino_t
, ino
, inode
->i_ino
)
459 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
463 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__truncate
, ext3_truncate_enter
,
465 TP_PROTO(struct inode
*inode
),
470 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__truncate
, ext3_truncate_exit
,
472 TP_PROTO(struct inode
*inode
),
477 LTTNG_TRACEPOINT_EVENT(ext3_get_blocks_enter
,
478 TP_PROTO(struct inode
*inode
, unsigned long lblk
,
479 unsigned long len
, int create
),
481 TP_ARGS(inode
, lblk
, len
, create
),
484 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
485 ctf_integer(ino_t
, ino
, inode
->i_ino
)
486 ctf_integer(unsigned long, lblk
, lblk
)
487 ctf_integer(unsigned long, len
, len
)
488 ctf_integer(int, create
, create
)
492 LTTNG_TRACEPOINT_EVENT(ext3_get_blocks_exit
,
493 TP_PROTO(struct inode
*inode
, unsigned long lblk
,
494 unsigned long pblk
, unsigned long len
, int ret
),
496 TP_ARGS(inode
, lblk
, pblk
, len
, ret
),
499 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
500 ctf_integer(ino_t
, ino
, inode
->i_ino
)
501 ctf_integer(unsigned long, lblk
, lblk
)
502 ctf_integer(unsigned long, pblk
, pblk
)
503 ctf_integer(unsigned long, len
, len
)
504 ctf_integer(int, ret
, ret
)
508 LTTNG_TRACEPOINT_EVENT(ext3_load_inode
,
509 TP_PROTO(struct inode
*inode
),
514 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
515 ctf_integer(ino_t
, ino
, inode
->i_ino
)
519 #endif /* LTTNG_TRACE_EXT3_H */
521 /* This part must be outside protection */
522 #include <lttng/define_trace.h>