2 #define TRACE_SYSTEM ext3
4 #if !defined(LTTNG_TRACE_EXT3_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_EXT3_H
7 #include "../../../probes/lttng-tracepoint-event.h"
8 #include <linux/version.h>
10 LTTNG_TRACEPOINT_EVENT(ext3_free_inode
,
11 TP_PROTO(struct inode
*inode
),
16 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
17 ctf_integer(ino_t
, ino
, inode
->i_ino
)
18 ctf_integer(umode_t
, mode
, inode
->i_mode
)
19 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
20 ctf_integer(uid_t
, uid
, i_uid_read(inode
))
21 ctf_integer(gid_t
, gid
, i_gid_read(inode
))
23 ctf_integer(uid_t
, uid
, inode
->i_uid
)
24 ctf_integer(gid_t
, gid
, inode
->i_gid
)
26 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
30 LTTNG_TRACEPOINT_EVENT(ext3_request_inode
,
31 TP_PROTO(struct inode
*dir
, int mode
),
36 ctf_integer(dev_t
, dev
, dir
->i_sb
->s_dev
)
37 ctf_integer(ino_t
, dir
, dir
->i_ino
)
38 ctf_integer(umode_t
, mode
, mode
)
42 LTTNG_TRACEPOINT_EVENT(ext3_allocate_inode
,
43 TP_PROTO(struct inode
*inode
, struct inode
*dir
, int mode
),
45 TP_ARGS(inode
, dir
, mode
),
48 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
49 ctf_integer(ino_t
, ino
, inode
->i_ino
)
50 ctf_integer(ino_t
, dir
, dir
->i_ino
)
51 ctf_integer(umode_t
, mode
, mode
)
55 LTTNG_TRACEPOINT_EVENT(ext3_evict_inode
,
56 TP_PROTO(struct inode
*inode
),
61 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
62 ctf_integer(ino_t
, ino
, inode
->i_ino
)
63 ctf_integer(int, nlink
, inode
->i_nlink
)
67 LTTNG_TRACEPOINT_EVENT(ext3_drop_inode
,
68 TP_PROTO(struct inode
*inode
, int drop
),
73 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
74 ctf_integer(ino_t
, ino
, inode
->i_ino
)
75 ctf_integer(int, drop
, drop
)
79 LTTNG_TRACEPOINT_EVENT(ext3_mark_inode_dirty
,
80 TP_PROTO(struct inode
*inode
, unsigned long IP
),
85 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
86 ctf_integer(ino_t
, ino
, inode
->i_ino
)
87 ctf_integer(unsigned long, ip
, IP
)
91 LTTNG_TRACEPOINT_EVENT(ext3_write_begin
,
92 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
95 TP_ARGS(inode
, pos
, len
, flags
),
98 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
99 ctf_integer(ino_t
, ino
, inode
->i_ino
)
100 ctf_integer(loff_t
, pos
, pos
)
101 ctf_integer(unsigned int, len
, len
)
102 ctf_integer(unsigned int, flags
, flags
)
106 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__write_end
,
107 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
108 unsigned int copied
),
110 TP_ARGS(inode
, pos
, len
, copied
),
113 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
114 ctf_integer(ino_t
, ino
, inode
->i_ino
)
115 ctf_integer(loff_t
, pos
, pos
)
116 ctf_integer(unsigned int, len
, len
)
117 ctf_integer(unsigned int, copied
, copied
)
121 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end
, ext3_ordered_write_end
,
123 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
124 unsigned int copied
),
126 TP_ARGS(inode
, pos
, len
, copied
)
129 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end
, ext3_writeback_write_end
,
131 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
132 unsigned int copied
),
134 TP_ARGS(inode
, pos
, len
, copied
)
137 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end
, ext3_journalled_write_end
,
139 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
140 unsigned int copied
),
142 TP_ARGS(inode
, pos
, len
, copied
)
145 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__page_op
,
146 TP_PROTO(struct page
*page
),
151 ctf_integer(dev_t
, dev
, page
->mapping
->host
->i_sb
->s_dev
)
152 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
153 ctf_integer(pgoff_t
, index
, page
->index
)
157 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op
, ext3_ordered_writepage
,
159 TP_PROTO(struct page
*page
),
164 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op
, ext3_writeback_writepage
,
166 TP_PROTO(struct page
*page
),
171 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op
, ext3_journalled_writepage
,
173 TP_PROTO(struct page
*page
),
178 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op
, ext3_readpage
,
180 TP_PROTO(struct page
*page
),
185 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op
, ext3_releasepage
,
187 TP_PROTO(struct page
*page
),
192 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
194 LTTNG_TRACEPOINT_EVENT(ext3_invalidatepage
,
195 TP_PROTO(struct page
*page
, unsigned int offset
, unsigned int length
),
197 TP_ARGS(page
, offset
, length
),
200 ctf_integer(pgoff_t
, index
, page
->index
)
201 ctf_integer(unsigned int, offset
, offset
)
202 ctf_integer(unsigned int, length
, length
)
203 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
204 ctf_integer(dev_t
, dev
, page
->mapping
->host
->i_sb
->s_dev
)
210 LTTNG_TRACEPOINT_EVENT(ext3_invalidatepage
,
211 TP_PROTO(struct page
*page
, unsigned long offset
),
213 TP_ARGS(page
, offset
),
216 ctf_integer(pgoff_t
, index
, page
->index
)
217 ctf_integer(unsigned long, offset
, offset
)
218 ctf_integer(ino_t
, ino
, page
->mapping
->host
->i_ino
)
219 ctf_integer(dev_t
, dev
, page
->mapping
->host
->i_sb
->s_dev
)
225 LTTNG_TRACEPOINT_EVENT(ext3_discard_blocks
,
226 TP_PROTO(struct super_block
*sb
, unsigned long blk
,
227 unsigned long count
),
229 TP_ARGS(sb
, blk
, count
),
232 ctf_integer(dev_t
, dev
, sb
->s_dev
)
233 ctf_integer(unsigned long, blk
, blk
)
234 ctf_integer(unsigned long, count
, count
)
238 LTTNG_TRACEPOINT_EVENT(ext3_request_blocks
,
239 TP_PROTO(struct inode
*inode
, unsigned long goal
,
240 unsigned long count
),
242 TP_ARGS(inode
, goal
, count
),
245 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
246 ctf_integer(ino_t
, ino
, inode
->i_ino
)
247 ctf_integer(unsigned long, count
, count
)
248 ctf_integer(unsigned long, goal
, goal
)
252 LTTNG_TRACEPOINT_EVENT(ext3_allocate_blocks
,
253 TP_PROTO(struct inode
*inode
, unsigned long goal
,
254 unsigned long count
, unsigned long block
),
256 TP_ARGS(inode
, goal
, count
, block
),
259 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
260 ctf_integer(ino_t
, ino
, inode
->i_ino
)
261 ctf_integer(unsigned long, block
, block
)
262 ctf_integer(unsigned long, count
, count
)
263 ctf_integer(unsigned long, goal
, goal
)
267 LTTNG_TRACEPOINT_EVENT(ext3_free_blocks
,
268 TP_PROTO(struct inode
*inode
, unsigned long block
,
269 unsigned long count
),
271 TP_ARGS(inode
, block
, count
),
274 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
275 ctf_integer(ino_t
, ino
, inode
->i_ino
)
276 ctf_integer(umode_t
, mode
, inode
->i_mode
)
277 ctf_integer(unsigned long, block
, block
)
278 ctf_integer(unsigned long, count
, count
)
282 LTTNG_TRACEPOINT_EVENT(ext3_sync_file_enter
,
283 TP_PROTO(struct file
*file
, int datasync
),
285 TP_ARGS(file
, datasync
),
288 ctf_integer(dev_t
, dev
, file
->f_path
.dentry
->d_inode
->i_sb
->s_dev
)
289 ctf_integer(ino_t
, ino
, file
->f_path
.dentry
->d_inode
->i_ino
)
290 ctf_integer(ino_t
, parent
, file
->f_path
.dentry
->d_parent
->d_inode
->i_ino
)
291 ctf_integer(int, datasync
, datasync
)
295 LTTNG_TRACEPOINT_EVENT(ext3_sync_file_exit
,
296 TP_PROTO(struct inode
*inode
, int ret
),
301 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
302 ctf_integer(ino_t
, ino
, inode
->i_ino
)
303 ctf_integer(int, ret
, ret
)
307 LTTNG_TRACEPOINT_EVENT(ext3_sync_fs
,
308 TP_PROTO(struct super_block
*sb
, int wait
),
313 ctf_integer(dev_t
, dev
, sb
->s_dev
)
314 ctf_integer(int, wait
, wait
)
318 LTTNG_TRACEPOINT_EVENT(ext3_rsv_window_add
,
319 TP_PROTO(struct super_block
*sb
,
320 struct ext3_reserve_window_node
*rsv_node
),
322 TP_ARGS(sb
, rsv_node
),
325 ctf_integer(unsigned long, start
, rsv_node
->rsv_window
._rsv_start
)
326 ctf_integer(unsigned long, end
, rsv_node
->rsv_window
._rsv_end
)
327 ctf_integer(dev_t
, dev
, sb
->s_dev
)
331 LTTNG_TRACEPOINT_EVENT(ext3_discard_reservation
,
332 TP_PROTO(struct inode
*inode
,
333 struct ext3_reserve_window_node
*rsv_node
),
335 TP_ARGS(inode
, rsv_node
),
338 ctf_integer(unsigned long, start
, rsv_node
->rsv_window
._rsv_start
)
339 ctf_integer(unsigned long, end
, rsv_node
->rsv_window
._rsv_end
)
340 ctf_integer(ino_t
, ino
, inode
->i_ino
)
341 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
345 LTTNG_TRACEPOINT_EVENT(ext3_alloc_new_reservation
,
346 TP_PROTO(struct super_block
*sb
, unsigned long goal
),
351 ctf_integer(dev_t
, dev
, sb
->s_dev
)
352 ctf_integer(unsigned long, goal
, goal
)
356 LTTNG_TRACEPOINT_EVENT(ext3_reserved
,
357 TP_PROTO(struct super_block
*sb
, unsigned long block
,
358 struct ext3_reserve_window_node
*rsv_node
),
360 TP_ARGS(sb
, block
, rsv_node
),
363 ctf_integer(unsigned long, block
, block
)
364 ctf_integer(unsigned long, start
, rsv_node
->rsv_window
._rsv_start
)
365 ctf_integer(unsigned long, end
, rsv_node
->rsv_window
._rsv_end
)
366 ctf_integer(dev_t
, dev
, sb
->s_dev
)
370 LTTNG_TRACEPOINT_EVENT(ext3_forget
,
371 TP_PROTO(struct inode
*inode
, int is_metadata
, unsigned long block
),
373 TP_ARGS(inode
, is_metadata
, block
),
376 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
377 ctf_integer(ino_t
, ino
, inode
->i_ino
)
378 ctf_integer(umode_t
, mode
, inode
->i_mode
)
379 ctf_integer(int, is_metadata
, is_metadata
)
380 ctf_integer(unsigned long, block
, block
)
384 LTTNG_TRACEPOINT_EVENT(ext3_read_block_bitmap
,
385 TP_PROTO(struct super_block
*sb
, unsigned int group
),
390 ctf_integer(dev_t
, dev
, sb
->s_dev
)
391 ctf_integer(__u32
, group
, group
)
395 LTTNG_TRACEPOINT_EVENT(ext3_direct_IO_enter
,
396 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
, int rw
),
398 TP_ARGS(inode
, offset
, len
, rw
),
401 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
402 ctf_integer(ino_t
, ino
, inode
->i_ino
)
403 ctf_integer(loff_t
, pos
, offset
)
404 ctf_integer(unsigned long, len
, len
)
405 ctf_integer(int, rw
, rw
)
409 LTTNG_TRACEPOINT_EVENT(ext3_direct_IO_exit
,
410 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
,
413 TP_ARGS(inode
, offset
, len
, rw
, ret
),
416 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
417 ctf_integer(ino_t
, ino
, inode
->i_ino
)
418 ctf_integer(loff_t
, pos
, offset
)
419 ctf_integer(unsigned long, len
, len
)
420 ctf_integer(int, rw
, rw
)
421 ctf_integer(int, ret
, ret
)
425 LTTNG_TRACEPOINT_EVENT(ext3_unlink_enter
,
426 TP_PROTO(struct inode
*parent
, struct dentry
*dentry
),
428 TP_ARGS(parent
, dentry
),
431 ctf_integer(ino_t
, parent
, parent
->i_ino
)
432 ctf_integer(ino_t
, ino
, dentry
->d_inode
->i_ino
)
433 ctf_integer(loff_t
, size
, dentry
->d_inode
->i_size
)
434 ctf_integer(dev_t
, dev
, dentry
->d_inode
->i_sb
->s_dev
)
438 LTTNG_TRACEPOINT_EVENT(ext3_unlink_exit
,
439 TP_PROTO(struct dentry
*dentry
, int ret
),
441 TP_ARGS(dentry
, ret
),
444 ctf_integer(dev_t
, dev
, dentry
->d_inode
->i_sb
->s_dev
)
445 ctf_integer(ino_t
, ino
, dentry
->d_inode
->i_ino
)
446 ctf_integer(int, ret
, ret
)
450 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__truncate
,
451 TP_PROTO(struct inode
*inode
),
456 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
457 ctf_integer(ino_t
, ino
, inode
->i_ino
)
458 ctf_integer(blkcnt_t
, blocks
, inode
->i_blocks
)
462 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__truncate
, ext3_truncate_enter
,
464 TP_PROTO(struct inode
*inode
),
469 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__truncate
, ext3_truncate_exit
,
471 TP_PROTO(struct inode
*inode
),
476 LTTNG_TRACEPOINT_EVENT(ext3_get_blocks_enter
,
477 TP_PROTO(struct inode
*inode
, unsigned long lblk
,
478 unsigned long len
, int create
),
480 TP_ARGS(inode
, lblk
, len
, create
),
483 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
484 ctf_integer(ino_t
, ino
, inode
->i_ino
)
485 ctf_integer(unsigned long, lblk
, lblk
)
486 ctf_integer(unsigned long, len
, len
)
487 ctf_integer(int, create
, create
)
491 LTTNG_TRACEPOINT_EVENT(ext3_get_blocks_exit
,
492 TP_PROTO(struct inode
*inode
, unsigned long lblk
,
493 unsigned long pblk
, unsigned long len
, int ret
),
495 TP_ARGS(inode
, lblk
, pblk
, len
, ret
),
498 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
499 ctf_integer(ino_t
, ino
, inode
->i_ino
)
500 ctf_integer(unsigned long, lblk
, lblk
)
501 ctf_integer(unsigned long, pblk
, pblk
)
502 ctf_integer(unsigned long, len
, len
)
503 ctf_integer(int, ret
, ret
)
507 LTTNG_TRACEPOINT_EVENT(ext3_load_inode
,
508 TP_PROTO(struct inode
*inode
),
513 ctf_integer(dev_t
, dev
, inode
->i_sb
->s_dev
)
514 ctf_integer(ino_t
, ino
, inode
->i_ino
)
518 #endif /* LTTNG_TRACE_EXT3_H */
520 /* This part must be outside protection */
521 #include "../../../probes/define_trace.h"