8852a1eea3bcbfbf8bb789d1addc20accee4b5e4
[lttng-modules.git] / include / instrumentation / events / lttng-module / ext3.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM ext3
4
5 #if !defined(LTTNG_TRACE_EXT3_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_EXT3_H
7
8 #include <lttng/tracepoint-event.h>
9 #include <linux/version.h>
10
11 LTTNG_TRACEPOINT_EVENT(ext3_free_inode,
12 TP_PROTO(struct inode *inode),
13
14 TP_ARGS(inode),
15
16 TP_FIELDS(
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 (LINUX_VERSION_CODE >= 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))
23 #else
24 ctf_integer(uid_t, uid, inode->i_uid)
25 ctf_integer(gid_t, gid, inode->i_gid)
26 #endif
27 ctf_integer(blkcnt_t, blocks, inode->i_blocks)
28 )
29 )
30
31 LTTNG_TRACEPOINT_EVENT(ext3_request_inode,
32 TP_PROTO(struct inode *dir, int mode),
33
34 TP_ARGS(dir, mode),
35
36 TP_FIELDS(
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)
40 )
41 )
42
43 LTTNG_TRACEPOINT_EVENT(ext3_allocate_inode,
44 TP_PROTO(struct inode *inode, struct inode *dir, int mode),
45
46 TP_ARGS(inode, dir, mode),
47
48 TP_FIELDS(
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)
53 )
54 )
55
56 LTTNG_TRACEPOINT_EVENT(ext3_evict_inode,
57 TP_PROTO(struct inode *inode),
58
59 TP_ARGS(inode),
60
61 TP_FIELDS(
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)
65 )
66 )
67
68 LTTNG_TRACEPOINT_EVENT(ext3_drop_inode,
69 TP_PROTO(struct inode *inode, int drop),
70
71 TP_ARGS(inode, drop),
72
73 TP_FIELDS(
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)
77 )
78 )
79
80 LTTNG_TRACEPOINT_EVENT(ext3_mark_inode_dirty,
81 TP_PROTO(struct inode *inode, unsigned long IP),
82
83 TP_ARGS(inode, IP),
84
85 TP_FIELDS(
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)
89 )
90 )
91
92 LTTNG_TRACEPOINT_EVENT(ext3_write_begin,
93 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
94 unsigned int flags),
95
96 TP_ARGS(inode, pos, len, flags),
97
98 TP_FIELDS(
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)
104 )
105 )
106
107 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__write_end,
108 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
109 unsigned int copied),
110
111 TP_ARGS(inode, pos, len, copied),
112
113 TP_FIELDS(
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)
119 )
120 )
121
122 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end, ext3_ordered_write_end,
123
124 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
125 unsigned int copied),
126
127 TP_ARGS(inode, pos, len, copied)
128 )
129
130 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end, ext3_writeback_write_end,
131
132 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
133 unsigned int copied),
134
135 TP_ARGS(inode, pos, len, copied)
136 )
137
138 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__write_end, ext3_journalled_write_end,
139
140 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
141 unsigned int copied),
142
143 TP_ARGS(inode, pos, len, copied)
144 )
145
146 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__page_op,
147 TP_PROTO(struct page *page),
148
149 TP_ARGS(page),
150
151 TP_FIELDS(
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)
155 )
156 )
157
158 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_ordered_writepage,
159
160 TP_PROTO(struct page *page),
161
162 TP_ARGS(page)
163 )
164
165 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_writeback_writepage,
166
167 TP_PROTO(struct page *page),
168
169 TP_ARGS(page)
170 )
171
172 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_journalled_writepage,
173
174 TP_PROTO(struct page *page),
175
176 TP_ARGS(page)
177 )
178
179 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_readpage,
180
181 TP_PROTO(struct page *page),
182
183 TP_ARGS(page)
184 )
185
186 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__page_op, ext3_releasepage,
187
188 TP_PROTO(struct page *page),
189
190 TP_ARGS(page)
191 )
192
193 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
194
195 LTTNG_TRACEPOINT_EVENT(ext3_invalidatepage,
196 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
197
198 TP_ARGS(page, offset, length),
199
200 TP_FIELDS(
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)
206 )
207 )
208
209 #else
210
211 LTTNG_TRACEPOINT_EVENT(ext3_invalidatepage,
212 TP_PROTO(struct page *page, unsigned long offset),
213
214 TP_ARGS(page, offset),
215
216 TP_FIELDS(
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)
221 )
222 )
223
224 #endif
225
226 LTTNG_TRACEPOINT_EVENT(ext3_discard_blocks,
227 TP_PROTO(struct super_block *sb, unsigned long blk,
228 unsigned long count),
229
230 TP_ARGS(sb, blk, count),
231
232 TP_FIELDS(
233 ctf_integer(dev_t, dev, sb->s_dev)
234 ctf_integer(unsigned long, blk, blk)
235 ctf_integer(unsigned long, count, count)
236 )
237 )
238
239 LTTNG_TRACEPOINT_EVENT(ext3_request_blocks,
240 TP_PROTO(struct inode *inode, unsigned long goal,
241 unsigned long count),
242
243 TP_ARGS(inode, goal, count),
244
245 TP_FIELDS(
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)
250 )
251 )
252
253 LTTNG_TRACEPOINT_EVENT(ext3_allocate_blocks,
254 TP_PROTO(struct inode *inode, unsigned long goal,
255 unsigned long count, unsigned long block),
256
257 TP_ARGS(inode, goal, count, block),
258
259 TP_FIELDS(
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)
265 )
266 )
267
268 LTTNG_TRACEPOINT_EVENT(ext3_free_blocks,
269 TP_PROTO(struct inode *inode, unsigned long block,
270 unsigned long count),
271
272 TP_ARGS(inode, block, count),
273
274 TP_FIELDS(
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)
280 )
281 )
282
283 LTTNG_TRACEPOINT_EVENT(ext3_sync_file_enter,
284 TP_PROTO(struct file *file, int datasync),
285
286 TP_ARGS(file, datasync),
287
288 TP_FIELDS(
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)
293 )
294 )
295
296 LTTNG_TRACEPOINT_EVENT(ext3_sync_file_exit,
297 TP_PROTO(struct inode *inode, int ret),
298
299 TP_ARGS(inode, ret),
300
301 TP_FIELDS(
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)
305 )
306 )
307
308 LTTNG_TRACEPOINT_EVENT(ext3_sync_fs,
309 TP_PROTO(struct super_block *sb, int wait),
310
311 TP_ARGS(sb, wait),
312
313 TP_FIELDS(
314 ctf_integer(dev_t, dev, sb->s_dev)
315 ctf_integer(int, wait, wait)
316 )
317 )
318
319 LTTNG_TRACEPOINT_EVENT(ext3_rsv_window_add,
320 TP_PROTO(struct super_block *sb,
321 struct ext3_reserve_window_node *rsv_node),
322
323 TP_ARGS(sb, rsv_node),
324
325 TP_FIELDS(
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)
329 )
330 )
331
332 LTTNG_TRACEPOINT_EVENT(ext3_discard_reservation,
333 TP_PROTO(struct inode *inode,
334 struct ext3_reserve_window_node *rsv_node),
335
336 TP_ARGS(inode, rsv_node),
337
338 TP_FIELDS(
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)
343 )
344 )
345
346 LTTNG_TRACEPOINT_EVENT(ext3_alloc_new_reservation,
347 TP_PROTO(struct super_block *sb, unsigned long goal),
348
349 TP_ARGS(sb, goal),
350
351 TP_FIELDS(
352 ctf_integer(dev_t, dev, sb->s_dev)
353 ctf_integer(unsigned long, goal, goal)
354 )
355 )
356
357 LTTNG_TRACEPOINT_EVENT(ext3_reserved,
358 TP_PROTO(struct super_block *sb, unsigned long block,
359 struct ext3_reserve_window_node *rsv_node),
360
361 TP_ARGS(sb, block, rsv_node),
362
363 TP_FIELDS(
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)
368 )
369 )
370
371 LTTNG_TRACEPOINT_EVENT(ext3_forget,
372 TP_PROTO(struct inode *inode, int is_metadata, unsigned long block),
373
374 TP_ARGS(inode, is_metadata, block),
375
376 TP_FIELDS(
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)
382 )
383 )
384
385 LTTNG_TRACEPOINT_EVENT(ext3_read_block_bitmap,
386 TP_PROTO(struct super_block *sb, unsigned int group),
387
388 TP_ARGS(sb, group),
389
390 TP_FIELDS(
391 ctf_integer(dev_t, dev, sb->s_dev)
392 ctf_integer(__u32, group, group)
393 )
394 )
395
396 LTTNG_TRACEPOINT_EVENT(ext3_direct_IO_enter,
397 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
398
399 TP_ARGS(inode, offset, len, rw),
400
401 TP_FIELDS(
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)
407 )
408 )
409
410 LTTNG_TRACEPOINT_EVENT(ext3_direct_IO_exit,
411 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
412 int rw, int ret),
413
414 TP_ARGS(inode, offset, len, rw, ret),
415
416 TP_FIELDS(
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)
423 )
424 )
425
426 LTTNG_TRACEPOINT_EVENT(ext3_unlink_enter,
427 TP_PROTO(struct inode *parent, struct dentry *dentry),
428
429 TP_ARGS(parent, dentry),
430
431 TP_FIELDS(
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)
436 )
437 )
438
439 LTTNG_TRACEPOINT_EVENT(ext3_unlink_exit,
440 TP_PROTO(struct dentry *dentry, int ret),
441
442 TP_ARGS(dentry, ret),
443
444 TP_FIELDS(
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)
448 )
449 )
450
451 LTTNG_TRACEPOINT_EVENT_CLASS(ext3__truncate,
452 TP_PROTO(struct inode *inode),
453
454 TP_ARGS(inode),
455
456 TP_FIELDS(
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)
460 )
461 )
462
463 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__truncate, ext3_truncate_enter,
464
465 TP_PROTO(struct inode *inode),
466
467 TP_ARGS(inode)
468 )
469
470 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext3__truncate, ext3_truncate_exit,
471
472 TP_PROTO(struct inode *inode),
473
474 TP_ARGS(inode)
475 )
476
477 LTTNG_TRACEPOINT_EVENT(ext3_get_blocks_enter,
478 TP_PROTO(struct inode *inode, unsigned long lblk,
479 unsigned long len, int create),
480
481 TP_ARGS(inode, lblk, len, create),
482
483 TP_FIELDS(
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)
489 )
490 )
491
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),
495
496 TP_ARGS(inode, lblk, pblk, len, ret),
497
498 TP_FIELDS(
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)
505 )
506 )
507
508 LTTNG_TRACEPOINT_EVENT(ext3_load_inode,
509 TP_PROTO(struct inode *inode),
510
511 TP_ARGS(inode),
512
513 TP_FIELDS(
514 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
515 ctf_integer(ino_t, ino, inode->i_ino)
516 )
517 )
518
519 #endif /* LTTNG_TRACE_EXT3_H */
520
521 /* This part must be outside protection */
522 #include <lttng/define_trace.h>
This page took 0.038869 seconds and 3 git commands to generate.