5f7ab280c6268614ad2e47e416e3878d23dbc525
[lttng-modules.git] / instrumentation / events / lttng-module / ext4.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM ext4
4
5 #if !defined(LTTNG_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define LTTNG_TRACE_EXT4_H
7
8 #include <probes/lttng-tracepoint-event.h>
9 #include <linux/writeback.h>
10 #include <linux/version.h>
11
12 #ifndef _TRACE_EXT4_DEF_
13 #define _TRACE_EXT4_DEF_
14 struct ext4_allocation_context;
15 struct ext4_allocation_request;
16 struct ext4_prealloc_space;
17 struct ext4_inode_info;
18 struct mpage_da_data;
19 struct ext4_map_blocks;
20 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
21 struct ext4_extent;
22 #endif
23 #endif
24
25 #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
26 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
27 #define TP_MODE_T __u16
28 #else
29 #define TP_MODE_T umode_t
30 #endif
31
32 LTTNG_TRACEPOINT_EVENT(ext4_free_inode,
33 TP_PROTO(struct inode *inode),
34
35 TP_ARGS(inode),
36
37 TP_FIELDS(
38 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
39 ctf_integer(ino_t, ino, inode->i_ino)
40 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
41 ctf_integer(uid_t, uid, i_uid_read(inode))
42 ctf_integer(gid_t, gid, i_gid_read(inode))
43 #else
44 ctf_integer(uid_t, uid, inode->i_uid)
45 ctf_integer(gid_t, gid, inode->i_gid)
46 #endif
47 ctf_integer(__u64, blocks, inode->i_blocks)
48 ctf_integer(TP_MODE_T, mode, inode->i_mode)
49 )
50 )
51
52 LTTNG_TRACEPOINT_EVENT(ext4_request_inode,
53 TP_PROTO(struct inode *dir, int mode),
54
55 TP_ARGS(dir, mode),
56
57 TP_FIELDS(
58 ctf_integer(dev_t, dev, dir->i_sb->s_dev)
59 ctf_integer(ino_t, dir, dir->i_ino)
60 ctf_integer(TP_MODE_T, mode, mode)
61 )
62 )
63
64 LTTNG_TRACEPOINT_EVENT(ext4_allocate_inode,
65 TP_PROTO(struct inode *inode, struct inode *dir, int mode),
66
67 TP_ARGS(inode, dir, mode),
68
69 TP_FIELDS(
70 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
71 ctf_integer(ino_t, ino, inode->i_ino)
72 ctf_integer(ino_t, dir, dir->i_ino)
73 ctf_integer(TP_MODE_T, mode, mode)
74 )
75 )
76
77 LTTNG_TRACEPOINT_EVENT(ext4_evict_inode,
78 TP_PROTO(struct inode *inode),
79
80 TP_ARGS(inode),
81
82 TP_FIELDS(
83 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
84 ctf_integer(ino_t, ino, inode->i_ino)
85 ctf_integer(int, nlink, inode->i_nlink)
86 )
87 )
88
89 LTTNG_TRACEPOINT_EVENT(ext4_drop_inode,
90 TP_PROTO(struct inode *inode, int drop),
91
92 TP_ARGS(inode, drop),
93
94 TP_FIELDS(
95 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
96 ctf_integer(ino_t, ino, inode->i_ino)
97 ctf_integer(int, drop, drop)
98 )
99 )
100
101 LTTNG_TRACEPOINT_EVENT(ext4_mark_inode_dirty,
102 TP_PROTO(struct inode *inode, unsigned long IP),
103
104 TP_ARGS(inode, IP),
105
106 TP_FIELDS(
107 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
108 ctf_integer(ino_t, ino, inode->i_ino)
109 ctf_integer(unsigned long, ip, IP)
110 )
111 )
112
113 LTTNG_TRACEPOINT_EVENT(ext4_begin_ordered_truncate,
114 TP_PROTO(struct inode *inode, loff_t new_size),
115
116 TP_ARGS(inode, new_size),
117
118 TP_FIELDS(
119 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
120 ctf_integer(ino_t, ino, inode->i_ino)
121 ctf_integer(loff_t, new_size, new_size)
122 )
123 )
124
125 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_begin,
126
127 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
128 unsigned int flags),
129
130 TP_ARGS(inode, pos, len, flags),
131
132 TP_FIELDS(
133 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
134 ctf_integer(ino_t, ino, inode->i_ino)
135 ctf_integer(loff_t, pos, pos)
136 ctf_integer(unsigned int, len, len)
137 ctf_integer(unsigned int, flags, flags)
138 )
139 )
140
141 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin, ext4_write_begin,
142
143 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
144 unsigned int flags),
145
146 TP_ARGS(inode, pos, len, flags)
147 )
148
149 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_begin, ext4_da_write_begin,
150
151 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
152 unsigned int flags),
153
154 TP_ARGS(inode, pos, len, flags)
155 )
156
157 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_end,
158 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
159 unsigned int copied),
160
161 TP_ARGS(inode, pos, len, copied),
162
163 TP_FIELDS(
164 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
165 ctf_integer(ino_t, ino, inode->i_ino)
166 ctf_integer(loff_t, pos, pos)
167 ctf_integer(unsigned int, len, len)
168 ctf_integer(unsigned int, copied, copied)
169 )
170 )
171
172 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_ordered_write_end,
173
174 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
175 unsigned int copied),
176
177 TP_ARGS(inode, pos, len, copied)
178 )
179
180 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_writeback_write_end,
181
182 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
183 unsigned int copied),
184
185 TP_ARGS(inode, pos, len, copied)
186 )
187
188 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_journalled_write_end,
189
190 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
191 unsigned int copied),
192
193 TP_ARGS(inode, pos, len, copied)
194 )
195
196 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, ext4_da_write_end,
197
198 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
199 unsigned int copied),
200
201 TP_ARGS(inode, pos, len, copied)
202 )
203
204 LTTNG_TRACEPOINT_EVENT(ext4_da_writepages,
205 TP_PROTO(struct inode *inode, struct writeback_control *wbc),
206
207 TP_ARGS(inode, wbc),
208
209 TP_FIELDS(
210 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
211 ctf_integer(ino_t, ino, inode->i_ino)
212 ctf_integer(long, nr_to_write, wbc->nr_to_write)
213 ctf_integer(long, pages_skipped, wbc->pages_skipped)
214 ctf_integer(loff_t, range_start, wbc->range_start)
215 ctf_integer(loff_t, range_end, wbc->range_end)
216 ctf_integer(pgoff_t, writeback_index, inode->i_mapping->writeback_index)
217 ctf_integer(int, sync_mode, wbc->sync_mode)
218 ctf_integer(char, for_kupdate, wbc->for_kupdate)
219 ctf_integer(char, range_cyclic, wbc->range_cyclic)
220 )
221 )
222
223 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
224
225 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages,
226 TP_PROTO(struct inode *inode, pgoff_t first_page,
227 struct writeback_control *wbc),
228
229 TP_ARGS(inode, first_page, wbc),
230
231 TP_FIELDS(
232 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
233 ctf_integer(ino_t, ino, inode->i_ino)
234 ctf_integer(pgoff_t, first_page, first_page)
235 ctf_integer(long, nr_to_write, wbc->nr_to_write)
236 ctf_integer(int, sync_mode, wbc->sync_mode)
237 )
238 )
239
240 #else
241
242 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages,
243 TP_PROTO(struct inode *inode, struct mpage_da_data *mpd),
244
245 TP_ARGS(inode, mpd),
246
247 TP_FIELDS(
248 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
249 ctf_integer(ino_t, ino, inode->i_ino)
250 ctf_integer(__u64, b_blocknr, mpd->b_blocknr)
251 ctf_integer(__u32, b_size, mpd->b_size)
252 ctf_integer(__u32, b_state, mpd->b_state)
253 ctf_integer(unsigned long, first_page, mpd->first_page)
254 ctf_integer(int, io_done, mpd->io_done)
255 ctf_integer(int, pages_written, mpd->pages_written)
256 ctf_integer(int, sync_mode, mpd->wbc->sync_mode)
257 )
258 )
259
260 #endif
261
262 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
263
264 LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages_extent,
265 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map),
266
267 TP_ARGS(inode, map),
268
269 TP_FIELDS(
270 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
271 ctf_integer(ino_t, ino, inode->i_ino)
272 ctf_integer(__u64, lblk, map->m_lblk)
273 ctf_integer(__u32, len, map->m_len)
274 ctf_integer(__u32, flags, map->m_flags)
275 )
276 )
277
278 #endif
279
280 LTTNG_TRACEPOINT_EVENT(ext4_da_writepages_result,
281 TP_PROTO(struct inode *inode, struct writeback_control *wbc,
282 int ret, int pages_written),
283
284 TP_ARGS(inode, wbc, ret, pages_written),
285
286 TP_FIELDS(
287 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
288 ctf_integer(ino_t, ino, inode->i_ino)
289 ctf_integer(int, ret, ret)
290 ctf_integer(int, pages_written, pages_written)
291 ctf_integer(long, pages_skipped, wbc->pages_skipped)
292 ctf_integer(pgoff_t, writeback_index, inode->i_mapping->writeback_index)
293 ctf_integer(int, sync_mode, wbc->sync_mode)
294 )
295 )
296
297 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__page_op,
298 TP_PROTO(struct page *page),
299
300 TP_ARGS(page),
301
302 TP_FIELDS(
303 ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev)
304 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
305 ctf_integer(pgoff_t, index, page->index)
306 )
307 )
308
309 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_writepage,
310
311 TP_PROTO(struct page *page),
312
313 TP_ARGS(page)
314 )
315
316 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_readpage,
317
318 TP_PROTO(struct page *page),
319
320 TP_ARGS(page)
321 )
322
323 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_releasepage,
324
325 TP_PROTO(struct page *page),
326
327 TP_ARGS(page)
328 )
329
330 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
331
332 LTTNG_TRACEPOINT_EVENT_CLASS(ext4_invalidatepage_op,
333 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
334
335 TP_ARGS(page, offset, length),
336
337 TP_FIELDS(
338 ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev)
339 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
340 ctf_integer(pgoff_t, index, page->index)
341 ctf_integer(unsigned int, offset, offset)
342 ctf_integer(unsigned int, length, length)
343 )
344 )
345
346 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4_invalidatepage_op, ext4_invalidatepage,
347 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
348
349 TP_ARGS(page, offset, length)
350 )
351
352 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4_invalidatepage_op, ext4_journalled_invalidatepage,
353 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
354
355 TP_ARGS(page, offset, length)
356 )
357
358 #else
359
360 LTTNG_TRACEPOINT_EVENT(ext4_invalidatepage,
361 TP_PROTO(struct page *page, unsigned long offset),
362
363 TP_ARGS(page, offset),
364
365 TP_FIELDS(
366 ctf_integer(dev_t, dev, page->mapping->host->i_sb->s_dev)
367 ctf_integer(ino_t, ino, page->mapping->host->i_ino)
368 ctf_integer(pgoff_t, index, page->index)
369 ctf_integer(unsigned long, offset, offset)
370
371 )
372 )
373
374 #endif
375
376 LTTNG_TRACEPOINT_EVENT(ext4_discard_blocks,
377 TP_PROTO(struct super_block *sb, unsigned long long blk,
378 unsigned long long count),
379
380 TP_ARGS(sb, blk, count),
381
382 TP_FIELDS(
383 ctf_integer(dev_t, dev, sb->s_dev)
384 ctf_integer(__u64, blk, blk)
385 ctf_integer(__u64, count, count)
386 )
387 )
388
389 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__mb_new_pa,
390 TP_PROTO(struct ext4_allocation_context *ac,
391 struct ext4_prealloc_space *pa),
392
393 TP_ARGS(ac, pa),
394
395 TP_FIELDS(
396 ctf_integer(dev_t, dev, ac->ac_sb->s_dev)
397 ctf_integer(ino_t, ino, ac->ac_inode->i_ino)
398 ctf_integer(__u64, pa_pstart, pa->pa_pstart)
399 ctf_integer(__u64, pa_lstart, pa->pa_lstart)
400 ctf_integer(__u32, pa_len, pa->pa_len)
401 )
402 )
403
404 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mb_new_pa, ext4_mb_new_inode_pa,
405
406 TP_PROTO(struct ext4_allocation_context *ac,
407 struct ext4_prealloc_space *pa),
408
409 TP_ARGS(ac, pa)
410 )
411
412 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mb_new_pa, ext4_mb_new_group_pa,
413
414 TP_PROTO(struct ext4_allocation_context *ac,
415 struct ext4_prealloc_space *pa),
416
417 TP_ARGS(ac, pa)
418 )
419
420 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_inode_pa,
421 TP_PROTO(
422 struct ext4_prealloc_space *pa,
423 unsigned long long block, unsigned int count),
424
425 TP_ARGS(pa, block, count),
426
427 TP_FIELDS(
428 ctf_integer(dev_t, dev, pa->pa_inode->i_sb->s_dev)
429 ctf_integer(ino_t, ino, pa->pa_inode->i_ino)
430 ctf_integer(__u64, block, block)
431 ctf_integer(__u32, count, count)
432 )
433 )
434
435 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
436 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
437
438 TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa),
439
440 TP_ARGS(sb, pa),
441
442 TP_FIELDS(
443 ctf_integer(dev_t, dev, sb->s_dev)
444 ctf_integer(__u64, pa_pstart, pa->pa_pstart)
445 ctf_integer(__u32, pa_len, pa->pa_len)
446 )
447 )
448 #else
449 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_group_pa,
450
451 TP_PROTO(struct ext4_prealloc_space *pa),
452
453 TP_ARGS(pa),
454
455 TP_FIELDS(
456 ctf_integer(dev_t, dev, pa->pa_inode->i_sb->s_dev)
457 ctf_integer(__u64, pa_pstart, pa->pa_pstart)
458 ctf_integer(__u32, pa_len, pa->pa_len)
459 )
460 )
461 #endif
462
463 LTTNG_TRACEPOINT_EVENT(ext4_discard_preallocations,
464 TP_PROTO(struct inode *inode),
465
466 TP_ARGS(inode),
467
468 TP_FIELDS(
469 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
470 ctf_integer(ino_t, ino, inode->i_ino)
471 )
472 )
473
474 LTTNG_TRACEPOINT_EVENT(ext4_mb_discard_preallocations,
475 TP_PROTO(struct super_block *sb, int needed),
476
477 TP_ARGS(sb, needed),
478
479 TP_FIELDS(
480 ctf_integer(dev_t, dev, sb->s_dev)
481 ctf_integer(int, needed, needed)
482 )
483 )
484
485 LTTNG_TRACEPOINT_EVENT(ext4_request_blocks,
486 TP_PROTO(struct ext4_allocation_request *ar),
487
488 TP_ARGS(ar),
489
490 TP_FIELDS(
491 ctf_integer(dev_t, dev, ar->inode->i_sb->s_dev)
492 ctf_integer(ino_t, ino, ar->inode->i_ino)
493 ctf_integer(unsigned int, len, ar->len)
494 ctf_integer(__u32, logical, ar->logical)
495 ctf_integer(__u32, lleft, ar->lleft)
496 ctf_integer(__u32, lright, ar->lright)
497 ctf_integer(__u64, goal, ar->goal)
498 ctf_integer(__u64, pleft, ar->pleft)
499 ctf_integer(__u64, pright, ar->pright)
500 ctf_integer(unsigned int, flags, ar->flags)
501 )
502 )
503
504 LTTNG_TRACEPOINT_EVENT(ext4_allocate_blocks,
505 TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block),
506
507 TP_ARGS(ar, block),
508
509 TP_FIELDS(
510 ctf_integer(dev_t, dev, ar->inode->i_sb->s_dev)
511 ctf_integer(ino_t, ino, ar->inode->i_ino)
512 ctf_integer(__u64, block, block)
513 ctf_integer(unsigned int, len, ar->len)
514 ctf_integer(__u32, logical, ar->logical)
515 ctf_integer(__u32, lleft, ar->lleft)
516 ctf_integer(__u32, lright, ar->lright)
517 ctf_integer(__u64, goal, ar->goal)
518 ctf_integer(__u64, pleft, ar->pleft)
519 ctf_integer(__u64, pright, ar->pright)
520 ctf_integer(unsigned int, flags, ar->flags)
521 )
522 )
523
524 LTTNG_TRACEPOINT_EVENT(ext4_free_blocks,
525 TP_PROTO(struct inode *inode, __u64 block, unsigned long count,
526 int flags),
527
528 TP_ARGS(inode, block, count, flags),
529
530 TP_FIELDS(
531 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
532 ctf_integer(ino_t, ino, inode->i_ino)
533 ctf_integer(__u64, block, block)
534 ctf_integer(unsigned long, count, count)
535 ctf_integer(int, flags, flags)
536 ctf_integer(TP_MODE_T, mode, inode->i_mode)
537 )
538 )
539
540 LTTNG_TRACEPOINT_EVENT(ext4_sync_file_enter,
541 TP_PROTO(struct file *file, int datasync),
542
543 TP_ARGS(file, datasync),
544
545 TP_FIELDS(
546 ctf_integer(dev_t, dev, file->f_path.dentry->d_inode->i_sb->s_dev)
547 ctf_integer(ino_t, ino, file->f_path.dentry->d_inode->i_ino)
548 ctf_integer(ino_t, parent, file->f_path.dentry->d_parent->d_inode->i_ino)
549 ctf_integer(int, datasync, datasync)
550 )
551 )
552
553 LTTNG_TRACEPOINT_EVENT(ext4_sync_file_exit,
554 TP_PROTO(struct inode *inode, int ret),
555
556 TP_ARGS(inode, ret),
557
558 TP_FIELDS(
559 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
560 ctf_integer(ino_t, ino, inode->i_ino)
561 ctf_integer(int, ret, ret)
562 )
563 )
564
565 LTTNG_TRACEPOINT_EVENT(ext4_sync_fs,
566 TP_PROTO(struct super_block *sb, int wait),
567
568 TP_ARGS(sb, wait),
569
570 TP_FIELDS(
571 ctf_integer(dev_t, dev, sb->s_dev)
572 ctf_integer(int, wait, wait)
573
574 )
575 )
576
577 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
578 LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks,
579 TP_PROTO(struct inode *inode),
580
581 TP_ARGS(inode),
582
583 TP_FIELDS(
584 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
585 ctf_integer(ino_t, ino, inode->i_ino)
586 ctf_integer(unsigned int, data_blocks, EXT4_I(inode)->i_reserved_data_blocks)
587 )
588 )
589 #else
590 LTTNG_TRACEPOINT_EVENT(ext4_alloc_da_blocks,
591 TP_PROTO(struct inode *inode),
592
593 TP_ARGS(inode),
594
595 TP_FIELDS(
596 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
597 ctf_integer(ino_t, ino, inode->i_ino)
598 ctf_integer(unsigned int, data_blocks, EXT4_I(inode)->i_reserved_data_blocks)
599 ctf_integer(unsigned int, meta_blocks, EXT4_I(inode)->i_reserved_meta_blocks)
600 )
601 )
602 #endif
603
604 LTTNG_TRACEPOINT_EVENT(ext4_mballoc_alloc,
605 TP_PROTO(struct ext4_allocation_context *ac),
606
607 TP_ARGS(ac),
608
609 TP_FIELDS(
610 ctf_integer(dev_t, dev, ac->ac_inode->i_sb->s_dev)
611 ctf_integer(ino_t, ino, ac->ac_inode->i_ino)
612 ctf_integer(__u32, orig_logical, ac->ac_o_ex.fe_logical)
613 ctf_integer(int, orig_start, ac->ac_o_ex.fe_start)
614 ctf_integer(__u32, orig_group, ac->ac_o_ex.fe_group)
615 ctf_integer(int, orig_len, ac->ac_o_ex.fe_len)
616 ctf_integer(__u32, goal_logical, ac->ac_g_ex.fe_logical)
617 ctf_integer(int, goal_start, ac->ac_g_ex.fe_start)
618 ctf_integer(__u32, goal_group, ac->ac_g_ex.fe_group)
619 ctf_integer(int, goal_len, ac->ac_g_ex.fe_len)
620 ctf_integer(__u32, result_logical, ac->ac_f_ex.fe_logical)
621 ctf_integer(int, result_start, ac->ac_f_ex.fe_start)
622 ctf_integer(__u32, result_group, ac->ac_f_ex.fe_group)
623 ctf_integer(int, result_len, ac->ac_f_ex.fe_len)
624 ctf_integer(__u16, found, ac->ac_found)
625 ctf_integer(__u16, groups, ac->ac_groups_scanned)
626 ctf_integer(__u16, buddy, ac->ac_buddy)
627 ctf_integer(__u16, flags, ac->ac_flags)
628 ctf_integer(__u16, tail, ac->ac_tail)
629 ctf_integer(__u8, cr, ac->ac_criteria)
630 )
631 )
632
633 LTTNG_TRACEPOINT_EVENT(ext4_mballoc_prealloc,
634 TP_PROTO(struct ext4_allocation_context *ac),
635
636 TP_ARGS(ac),
637
638 TP_FIELDS(
639 ctf_integer(dev_t, dev, ac->ac_inode->i_sb->s_dev)
640 ctf_integer(ino_t, ino, ac->ac_inode->i_ino)
641 ctf_integer(__u32, orig_logical, ac->ac_o_ex.fe_logical)
642 ctf_integer(int, orig_start, ac->ac_o_ex.fe_start)
643 ctf_integer(__u32, orig_group, ac->ac_o_ex.fe_group)
644 ctf_integer(int, orig_len, ac->ac_o_ex.fe_len)
645 ctf_integer(__u32, result_logical, ac->ac_b_ex.fe_logical)
646 ctf_integer(int, result_start, ac->ac_b_ex.fe_start)
647 ctf_integer(__u32, result_group, ac->ac_b_ex.fe_group)
648 ctf_integer(int, result_len, ac->ac_b_ex.fe_len)
649 )
650 )
651
652 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__mballoc,
653 TP_PROTO(struct super_block *sb,
654 struct inode *inode,
655 ext4_group_t group,
656 ext4_grpblk_t start,
657 ext4_grpblk_t len),
658
659 TP_ARGS(sb, inode, group, start, len),
660
661 TP_FIELDS(
662 ctf_integer(dev_t, dev, sb->s_dev)
663 ctf_integer(ino_t, ino, inode ? inode->i_ino : 0)
664 ctf_integer(int, result_start, start)
665 ctf_integer(__u32, result_group, group)
666 ctf_integer(int, result_len, len)
667 )
668 )
669
670 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc, ext4_mballoc_discard,
671
672 TP_PROTO(struct super_block *sb,
673 struct inode *inode,
674 ext4_group_t group,
675 ext4_grpblk_t start,
676 ext4_grpblk_t len),
677
678 TP_ARGS(sb, inode, group, start, len)
679 )
680
681 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mballoc, ext4_mballoc_free,
682
683 TP_PROTO(struct super_block *sb,
684 struct inode *inode,
685 ext4_group_t group,
686 ext4_grpblk_t start,
687 ext4_grpblk_t len),
688
689 TP_ARGS(sb, inode, group, start, len)
690 )
691
692 LTTNG_TRACEPOINT_EVENT(ext4_forget,
693 TP_PROTO(struct inode *inode, int is_metadata, __u64 block),
694
695 TP_ARGS(inode, is_metadata, block),
696
697 TP_FIELDS(
698 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
699 ctf_integer(ino_t, ino, inode->i_ino)
700 ctf_integer(__u64, block, block)
701 ctf_integer(int, is_metadata, is_metadata)
702 ctf_integer(TP_MODE_T, mode, inode->i_mode)
703 )
704 )
705
706 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
707 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
708 TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
709
710 TP_ARGS(inode, used_blocks, quota_claim),
711
712 TP_FIELDS(
713 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
714 ctf_integer(ino_t, ino, inode->i_ino)
715 ctf_integer(__u64, i_blocks, inode->i_blocks)
716 ctf_integer(int, used_blocks, used_blocks)
717 ctf_integer(int, reserved_data_blocks,
718 EXT4_I(inode)->i_reserved_data_blocks)
719 ctf_integer(int, quota_claim, quota_claim)
720 ctf_integer(TP_MODE_T, mode, inode->i_mode)
721 )
722 )
723 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
724 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
725 TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
726
727 TP_ARGS(inode, used_blocks, quota_claim),
728
729 TP_FIELDS(
730 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
731 ctf_integer(ino_t, ino, inode->i_ino)
732 ctf_integer(__u64, i_blocks, inode->i_blocks)
733 ctf_integer(int, used_blocks, used_blocks)
734 ctf_integer(int, reserved_data_blocks,
735 EXT4_I(inode)->i_reserved_data_blocks)
736 ctf_integer(int, reserved_meta_blocks,
737 EXT4_I(inode)->i_reserved_meta_blocks)
738 ctf_integer(int, allocated_meta_blocks,
739 EXT4_I(inode)->i_allocated_meta_blocks)
740 ctf_integer(int, quota_claim, quota_claim)
741 ctf_integer(TP_MODE_T, mode, inode->i_mode)
742 )
743 )
744 #else
745 LTTNG_TRACEPOINT_EVENT(ext4_da_update_reserve_space,
746 TP_PROTO(struct inode *inode, int used_blocks),
747
748 TP_ARGS(inode, used_blocks),
749
750 TP_FIELDS(
751 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
752 ctf_integer(ino_t, ino, inode->i_ino)
753 ctf_integer(__u64, i_blocks, inode->i_blocks)
754 ctf_integer(int, used_blocks, used_blocks)
755 ctf_integer(int, reserved_data_blocks,
756 EXT4_I(inode)->i_reserved_data_blocks)
757 ctf_integer(int, reserved_meta_blocks,
758 EXT4_I(inode)->i_reserved_meta_blocks)
759 ctf_integer(int, allocated_meta_blocks,
760 EXT4_I(inode)->i_allocated_meta_blocks)
761 ctf_integer(TP_MODE_T, mode, inode->i_mode)
762 )
763 )
764 #endif
765
766 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
767 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
768 TP_PROTO(struct inode *inode),
769
770 TP_ARGS(inode),
771
772 TP_FIELDS(
773 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
774 ctf_integer(ino_t, ino, inode->i_ino)
775 ctf_integer(__u64, i_blocks, inode->i_blocks)
776 ctf_integer(int, reserved_data_blocks,
777 EXT4_I(inode)->i_reserved_data_blocks)
778 ctf_integer(TP_MODE_T, mode, inode->i_mode)
779 )
780 )
781 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0))
782 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
783 TP_PROTO(struct inode *inode),
784
785 TP_ARGS(inode),
786
787 TP_FIELDS(
788 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
789 ctf_integer(ino_t, ino, inode->i_ino)
790 ctf_integer(__u64, i_blocks, inode->i_blocks)
791 ctf_integer(int, reserved_data_blocks,
792 EXT4_I(inode)->i_reserved_data_blocks)
793 ctf_integer(int, reserved_meta_blocks,
794 EXT4_I(inode)->i_reserved_meta_blocks)
795 ctf_integer(TP_MODE_T, mode, inode->i_mode)
796 )
797 )
798 #else
799 LTTNG_TRACEPOINT_EVENT(ext4_da_reserve_space,
800 TP_PROTO(struct inode *inode, int md_needed),
801
802 TP_ARGS(inode, md_needed),
803
804 TP_FIELDS(
805 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
806 ctf_integer(ino_t, ino, inode->i_ino)
807 ctf_integer(__u64, i_blocks, inode->i_blocks)
808 ctf_integer(int, md_needed, md_needed)
809 ctf_integer(int, reserved_data_blocks,
810 EXT4_I(inode)->i_reserved_data_blocks)
811 ctf_integer(int, reserved_meta_blocks,
812 EXT4_I(inode)->i_reserved_meta_blocks)
813 ctf_integer(TP_MODE_T, mode, inode->i_mode)
814 )
815 )
816 #endif
817
818 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
819 LTTNG_TRACEPOINT_EVENT(ext4_da_release_space,
820 TP_PROTO(struct inode *inode, int freed_blocks),
821
822 TP_ARGS(inode, freed_blocks),
823
824 TP_FIELDS(
825 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
826 ctf_integer(ino_t, ino, inode->i_ino)
827 ctf_integer(__u64, i_blocks, inode->i_blocks)
828 ctf_integer(int, freed_blocks, freed_blocks)
829 ctf_integer(int, reserved_data_blocks,
830 EXT4_I(inode)->i_reserved_data_blocks)
831 ctf_integer(TP_MODE_T, mode, inode->i_mode)
832 )
833 )
834 #else
835 LTTNG_TRACEPOINT_EVENT(ext4_da_release_space,
836 TP_PROTO(struct inode *inode, int freed_blocks),
837
838 TP_ARGS(inode, freed_blocks),
839
840 TP_FIELDS(
841 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
842 ctf_integer(ino_t, ino, inode->i_ino)
843 ctf_integer(__u64, i_blocks, inode->i_blocks)
844 ctf_integer(int, freed_blocks, freed_blocks)
845 ctf_integer(int, reserved_data_blocks,
846 EXT4_I(inode)->i_reserved_data_blocks)
847 ctf_integer(int, reserved_meta_blocks,
848 EXT4_I(inode)->i_reserved_meta_blocks)
849 ctf_integer(int, allocated_meta_blocks,
850 EXT4_I(inode)->i_allocated_meta_blocks)
851 ctf_integer(TP_MODE_T, mode, inode->i_mode)
852 )
853 )
854 #endif
855
856 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__bitmap_load,
857 TP_PROTO(struct super_block *sb, unsigned long group),
858
859 TP_ARGS(sb, group),
860
861 TP_FIELDS(
862 ctf_integer(dev_t, dev, sb->s_dev)
863 ctf_integer(__u32, group, group)
864 )
865 )
866
867 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_mb_bitmap_load,
868
869 TP_PROTO(struct super_block *sb, unsigned long group),
870
871 TP_ARGS(sb, group)
872 )
873
874 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
875
876 TP_PROTO(struct super_block *sb, unsigned long group),
877
878 TP_ARGS(sb, group)
879 )
880
881 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_read_block_bitmap_load,
882
883 TP_PROTO(struct super_block *sb, unsigned long group),
884
885 TP_ARGS(sb, group)
886 )
887
888 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__bitmap_load, ext4_load_inode_bitmap,
889
890 TP_PROTO(struct super_block *sb, unsigned long group),
891
892 TP_ARGS(sb, group)
893 )
894
895 LTTNG_TRACEPOINT_EVENT(ext4_direct_IO_enter,
896 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
897
898 TP_ARGS(inode, offset, len, rw),
899
900 TP_FIELDS(
901 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
902 ctf_integer(ino_t, ino, inode->i_ino)
903 ctf_integer(loff_t, pos, offset)
904 ctf_integer(unsigned long, len, len)
905 ctf_integer(int, rw, rw)
906 )
907 )
908
909 LTTNG_TRACEPOINT_EVENT(ext4_direct_IO_exit,
910 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
911 int rw, int ret),
912
913 TP_ARGS(inode, offset, len, rw, ret),
914
915 TP_FIELDS(
916 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
917 ctf_integer(ino_t, ino, inode->i_ino)
918 ctf_integer(loff_t, pos, offset)
919 ctf_integer(unsigned long, len, len)
920 ctf_integer(int, rw, rw)
921 ctf_integer(int, ret, ret)
922 )
923 )
924
925 LTTNG_TRACEPOINT_EVENT(ext4_fallocate_exit,
926 TP_PROTO(struct inode *inode, loff_t offset,
927 unsigned int max_blocks, int ret),
928
929 TP_ARGS(inode, offset, max_blocks, ret),
930
931 TP_FIELDS(
932 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
933 ctf_integer(ino_t, ino, inode->i_ino)
934 ctf_integer(loff_t, pos, offset)
935 ctf_integer(unsigned int, blocks, max_blocks)
936 ctf_integer(int, ret, ret)
937 )
938 )
939
940 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0))
941
942 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__fallocate_mode,
943 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
944
945 TP_ARGS(inode, offset, len, mode),
946
947 TP_FIELDS(
948 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
949 ctf_integer(ino_t, ino, inode->i_ino)
950 ctf_integer(loff_t, pos, offset)
951 ctf_integer(loff_t, len, len)
952 ctf_integer(int, mode, mode)
953 )
954 )
955
956 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_fallocate_enter,
957
958 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
959
960 TP_ARGS(inode, offset, len, mode)
961 )
962
963 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_punch_hole,
964
965 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
966
967 TP_ARGS(inode, offset, len, mode)
968 )
969
970 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__fallocate_mode, ext4_zero_range,
971
972 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
973
974 TP_ARGS(inode, offset, len, mode)
975 )
976
977 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
978
979 LTTNG_TRACEPOINT_EVENT(ext4_fallocate_enter,
980 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
981
982 TP_ARGS(inode, offset, len, mode),
983
984 TP_FIELDS(
985 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
986 ctf_integer(ino_t, ino, inode->i_ino)
987 ctf_integer(loff_t, pos, offset)
988 ctf_integer(loff_t, len, len)
989 ctf_integer(int, mode, mode)
990 )
991 )
992
993 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
994
995 LTTNG_TRACEPOINT_EVENT(ext4_punch_hole,
996 TP_PROTO(struct inode *inode, loff_t offset, loff_t len),
997
998 TP_ARGS(inode, offset, len),
999
1000 TP_FIELDS(
1001 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1002 ctf_integer(ino_t, ino, inode->i_ino)
1003 ctf_integer(loff_t, pos, offset)
1004 ctf_integer(loff_t, len, len)
1005 )
1006 )
1007
1008 #endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)) */
1009
1010 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) */
1011
1012 LTTNG_TRACEPOINT_EVENT(ext4_unlink_enter,
1013 TP_PROTO(struct inode *parent, struct dentry *dentry),
1014
1015 TP_ARGS(parent, dentry),
1016
1017 TP_FIELDS(
1018 ctf_integer(dev_t, dev, dentry->d_inode->i_sb->s_dev)
1019 ctf_integer(ino_t, ino, dentry->d_inode->i_ino)
1020 ctf_integer(ino_t, parent, parent->i_ino)
1021 ctf_integer(loff_t, size, dentry->d_inode->i_size)
1022 )
1023 )
1024
1025 LTTNG_TRACEPOINT_EVENT(ext4_unlink_exit,
1026 TP_PROTO(struct dentry *dentry, int ret),
1027
1028 TP_ARGS(dentry, ret),
1029
1030 TP_FIELDS(
1031 ctf_integer(dev_t, dev, dentry->d_inode->i_sb->s_dev)
1032 ctf_integer(ino_t, ino, dentry->d_inode->i_ino)
1033 ctf_integer(int, ret, ret)
1034 )
1035 )
1036
1037 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__truncate,
1038 TP_PROTO(struct inode *inode),
1039
1040 TP_ARGS(inode),
1041
1042 TP_FIELDS(
1043 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1044 ctf_integer(ino_t, ino, inode->i_ino)
1045 ctf_integer(unsigned int, blocks, inode->i_blocks)
1046 )
1047 )
1048
1049 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__truncate, ext4_truncate_enter,
1050
1051 TP_PROTO(struct inode *inode),
1052
1053 TP_ARGS(inode)
1054 )
1055
1056 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__truncate, ext4_truncate_exit,
1057
1058 TP_PROTO(struct inode *inode),
1059
1060 TP_ARGS(inode)
1061 )
1062
1063 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
1064 /* 'ux' is the uninitialized extent. */
1065 LTTNG_TRACEPOINT_EVENT(ext4_ext_convert_to_initialized_enter,
1066 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1067 struct ext4_extent *ux),
1068
1069 TP_ARGS(inode, map, ux),
1070
1071 TP_FIELDS(
1072 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1073 ctf_integer(ino_t, ino, inode->i_ino)
1074 ctf_integer(ext4_lblk_t, m_lblk, map->m_lblk)
1075 ctf_integer(unsigned, m_len, map->m_len)
1076 ctf_integer(ext4_lblk_t, u_lblk, le32_to_cpu(ux->ee_block))
1077 ctf_integer(unsigned, u_len, ext4_ext_get_actual_len(ux))
1078 ctf_integer(ext4_fsblk_t, u_pblk, ext4_ext_pblock(ux))
1079 )
1080 )
1081
1082 /*
1083 * 'ux' is the uninitialized extent.
1084 * 'ix' is the initialized extent to which blocks are transferred.
1085 */
1086 LTTNG_TRACEPOINT_EVENT(ext4_ext_convert_to_initialized_fastpath,
1087 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1088 struct ext4_extent *ux, struct ext4_extent *ix),
1089
1090 TP_ARGS(inode, map, ux, ix),
1091
1092 TP_FIELDS(
1093 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1094 ctf_integer(ino_t, ino, inode->i_ino)
1095 ctf_integer(ext4_lblk_t, m_lblk, map->m_lblk)
1096 ctf_integer(unsigned, m_len, map->m_len)
1097 ctf_integer(ext4_lblk_t, u_lblk, le32_to_cpu(ux->ee_block))
1098 ctf_integer(unsigned, u_len, ext4_ext_get_actual_len(ux))
1099 ctf_integer(ext4_fsblk_t, u_pblk, ext4_ext_pblock(ux))
1100 ctf_integer(ext4_lblk_t, i_lblk, le32_to_cpu(ix->ee_block))
1101 ctf_integer(unsigned, i_len, ext4_ext_get_actual_len(ix))
1102 ctf_integer(ext4_fsblk_t, i_pblk, ext4_ext_pblock(ix))
1103 )
1104 )
1105 #endif
1106
1107 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_enter,
1108 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1109 unsigned int len, unsigned int flags),
1110
1111 TP_ARGS(inode, lblk, len, flags),
1112
1113 TP_FIELDS(
1114 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1115 ctf_integer(ino_t, ino, inode->i_ino)
1116 ctf_integer(ext4_lblk_t, lblk, lblk)
1117 ctf_integer(unsigned int, len, len)
1118 ctf_integer(unsigned int, flags, flags)
1119 )
1120 )
1121
1122 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_enter, ext4_ext_map_blocks_enter,
1123 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1124 unsigned len, unsigned flags),
1125
1126 TP_ARGS(inode, lblk, len, flags)
1127 )
1128
1129 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_enter, ext4_ind_map_blocks_enter,
1130 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1131 unsigned len, unsigned flags),
1132
1133 TP_ARGS(inode, lblk, len, flags)
1134 )
1135
1136 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1137
1138 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit,
1139 TP_PROTO(struct inode *inode, unsigned flags, struct ext4_map_blocks *map,
1140 int ret),
1141
1142 TP_ARGS(inode, flags, map, ret),
1143
1144 TP_FIELDS(
1145 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1146 ctf_integer(ino_t, ino, inode->i_ino)
1147 ctf_integer(unsigned int, flags, flags)
1148 ctf_integer(ext4_fsblk_t, pblk, map->m_pblk)
1149 ctf_integer(ext4_lblk_t, lblk, map->m_lblk)
1150 ctf_integer(unsigned int, len, map->m_len)
1151 ctf_integer(unsigned int, mflags, map->m_flags)
1152 ctf_integer(int, ret, ret)
1153 )
1154 )
1155
1156 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
1157 TP_PROTO(struct inode *inode, unsigned flags,
1158 struct ext4_map_blocks *map, int ret),
1159
1160 TP_ARGS(inode, flags, map, ret)
1161 )
1162
1163 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
1164 TP_PROTO(struct inode *inode, unsigned flags,
1165 struct ext4_map_blocks *map, int ret),
1166
1167 TP_ARGS(inode, flags, map, ret)
1168 )
1169
1170 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
1171
1172 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit,
1173 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret),
1174
1175 TP_ARGS(inode, map, ret),
1176
1177 TP_FIELDS(
1178 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1179 ctf_integer(ino_t, ino, inode->i_ino)
1180 ctf_integer(ext4_fsblk_t, pblk, map->m_pblk)
1181 ctf_integer(ext4_lblk_t, lblk, map->m_lblk)
1182 ctf_integer(unsigned int, len, map->m_len)
1183 ctf_integer(unsigned int, mflags, map->m_flags)
1184 ctf_integer(int, ret, ret)
1185 )
1186 )
1187
1188 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
1189 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret),
1190
1191 TP_ARGS(inode, map, ret)
1192 )
1193
1194 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
1195 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret),
1196
1197 TP_ARGS(inode, map, ret)
1198 )
1199
1200 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1201
1202 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__map_blocks_exit,
1203 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1204 ext4_fsblk_t pblk, unsigned int len, int ret),
1205
1206 TP_ARGS(inode, lblk, pblk, len, ret),
1207
1208 TP_FIELDS(
1209 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1210 ctf_integer(ino_t, ino, inode->i_ino)
1211 ctf_integer(ext4_fsblk_t, pblk, pblk)
1212 ctf_integer(ext4_lblk_t, lblk, lblk)
1213 ctf_integer(unsigned int, len, len)
1214 ctf_integer(int, ret, ret)
1215 )
1216 )
1217
1218 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
1219 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1220 ext4_fsblk_t pblk, unsigned len, int ret),
1221
1222 TP_ARGS(inode, lblk, pblk, len, ret)
1223 )
1224
1225 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
1226 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1227 ext4_fsblk_t pblk, unsigned len, int ret),
1228
1229 TP_ARGS(inode, lblk, pblk, len, ret)
1230 )
1231
1232 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1233
1234 LTTNG_TRACEPOINT_EVENT(ext4_ext_load_extent,
1235 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk),
1236
1237 TP_ARGS(inode, lblk, pblk),
1238
1239 TP_FIELDS(
1240 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1241 ctf_integer(ino_t, ino, inode->i_ino)
1242 ctf_integer(ext4_fsblk_t, pblk, pblk)
1243 ctf_integer(ext4_lblk_t, lblk, lblk)
1244 )
1245 )
1246
1247 LTTNG_TRACEPOINT_EVENT(ext4_load_inode,
1248 TP_PROTO(struct inode *inode),
1249
1250 TP_ARGS(inode),
1251
1252 TP_FIELDS(
1253 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1254 ctf_integer(ino_t, ino, inode->i_ino)
1255 )
1256 )
1257
1258 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,5,0))
1259
1260 LTTNG_TRACEPOINT_EVENT(ext4_journal_start,
1261 TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks,
1262 int revoke_creds, unsigned long IP),
1263
1264 TP_ARGS(sb, blocks, rsv_blocks, revoke_creds, IP),
1265
1266 TP_FIELDS(
1267 ctf_integer(dev_t, dev, sb->s_dev)
1268 ctf_integer(unsigned long, ip, IP)
1269 ctf_integer(int, blocks, blocks)
1270 ctf_integer(int, rsv_blocks, rsv_blocks)
1271 ctf_integer(int, revoke_creds, revoke_creds)
1272 )
1273 )
1274
1275 LTTNG_TRACEPOINT_EVENT(ext4_journal_start_reserved,
1276 TP_PROTO(struct super_block *sb, int blocks, unsigned long IP),
1277
1278 TP_ARGS(sb, blocks, IP),
1279
1280 TP_FIELDS(
1281 ctf_integer(dev_t, dev, sb->s_dev)
1282 ctf_integer(unsigned long, ip, IP)
1283 ctf_integer(int, blocks, blocks)
1284 )
1285 )
1286
1287 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1288
1289 LTTNG_TRACEPOINT_EVENT(ext4_journal_start,
1290 TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks,
1291 unsigned long IP),
1292
1293 TP_ARGS(sb, blocks, rsv_blocks, IP),
1294
1295 TP_FIELDS(
1296 ctf_integer(dev_t, dev, sb->s_dev)
1297 ctf_integer(unsigned long, ip, IP)
1298 ctf_integer(int, blocks, blocks)
1299 ctf_integer(int, rsv_blocks, rsv_blocks)
1300 )
1301 )
1302
1303 LTTNG_TRACEPOINT_EVENT(ext4_journal_start_reserved,
1304 TP_PROTO(struct super_block *sb, int blocks, unsigned long IP),
1305
1306 TP_ARGS(sb, blocks, IP),
1307
1308 TP_FIELDS(
1309 ctf_integer(dev_t, dev, sb->s_dev)
1310 ctf_integer(unsigned long, ip, IP)
1311 ctf_integer(int, blocks, blocks)
1312 )
1313 )
1314
1315 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
1316
1317 LTTNG_TRACEPOINT_EVENT(ext4_journal_start,
1318 TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP),
1319
1320 TP_ARGS(sb, nblocks, IP),
1321
1322 TP_FIELDS(
1323 ctf_integer(dev_t, dev, sb->s_dev)
1324 ctf_integer(unsigned long, ip, IP)
1325 ctf_integer(int, nblocks, nblocks)
1326 )
1327 )
1328
1329 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__trim,
1330 TP_PROTO(struct super_block *sb,
1331 ext4_group_t group,
1332 ext4_grpblk_t start,
1333 ext4_grpblk_t len),
1334
1335 TP_ARGS(sb, group, start, len),
1336
1337 TP_FIELDS(
1338 ctf_integer(int, dev_major, MAJOR(sb->s_dev))
1339 ctf_integer(int, dev_minor, MINOR(sb->s_dev))
1340 ctf_integer(__u32, group, group)
1341 ctf_integer(int, start, start)
1342 ctf_integer(int, len, len)
1343 )
1344 )
1345
1346 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__trim, ext4_trim_extent,
1347
1348 TP_PROTO(struct super_block *sb,
1349 ext4_group_t group,
1350 ext4_grpblk_t start,
1351 ext4_grpblk_t len),
1352
1353 TP_ARGS(sb, group, start, len)
1354 )
1355
1356 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__trim, ext4_trim_all_free,
1357
1358 TP_PROTO(struct super_block *sb,
1359 ext4_group_t group,
1360 ext4_grpblk_t start,
1361 ext4_grpblk_t len),
1362
1363 TP_ARGS(sb, group, start, len)
1364 )
1365 #endif
1366
1367 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
1368
1369 LTTNG_TRACEPOINT_EVENT(ext4_ext_handle_uninitialized_extents,
1370 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
1371 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags,
1372 unsigned int allocated, ext4_fsblk_t newblock),
1373
1374 TP_ARGS(inode, map, flags, allocated, newblock),
1375 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1376 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1377 unsigned int allocated, ext4_fsblk_t newblock),
1378
1379 TP_ARGS(inode, map, allocated, newblock),
1380 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1381
1382 TP_FIELDS(
1383 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1384 ctf_integer(ino_t, ino, inode->i_ino)
1385 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
1386 ctf_integer(int, flags, flags)
1387 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1388 ctf_integer(int, flags, map->m_flags)
1389 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)) */
1390 ctf_integer(ext4_lblk_t, lblk, map->m_lblk)
1391 ctf_integer(ext4_fsblk_t, pblk, map->m_pblk)
1392 ctf_integer(unsigned int, len, map->m_len)
1393 ctf_integer(unsigned int, allocated, allocated)
1394 ctf_integer(ext4_fsblk_t, newblk, newblock)
1395 )
1396 )
1397
1398 LTTNG_TRACEPOINT_EVENT(ext4_get_implied_cluster_alloc_exit,
1399 TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret),
1400
1401 TP_ARGS(sb, map, ret),
1402
1403 TP_FIELDS(
1404 ctf_integer(dev_t, dev, sb->s_dev)
1405 ctf_integer(unsigned int, flags, map->m_flags)
1406 ctf_integer(ext4_lblk_t, lblk, map->m_lblk)
1407 ctf_integer(ext4_fsblk_t, pblk, map->m_pblk)
1408 ctf_integer(unsigned int, len, map->m_len)
1409 ctf_integer(int, ret, ret)
1410 )
1411 )
1412
1413 LTTNG_TRACEPOINT_EVENT(ext4_ext_put_in_cache,
1414 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len,
1415 ext4_fsblk_t start),
1416
1417 TP_ARGS(inode, lblk, len, start),
1418
1419 TP_FIELDS(
1420 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1421 ctf_integer(ino_t, ino, inode->i_ino)
1422 ctf_integer(ext4_lblk_t, lblk, lblk)
1423 ctf_integer(unsigned int, len, len)
1424 ctf_integer(ext4_fsblk_t, start, start)
1425 )
1426 )
1427
1428 LTTNG_TRACEPOINT_EVENT(ext4_ext_in_cache,
1429 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret),
1430
1431 TP_ARGS(inode, lblk, ret),
1432
1433 TP_FIELDS(
1434 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1435 ctf_integer(ino_t, ino, inode->i_ino)
1436 ctf_integer(ext4_lblk_t, lblk, lblk)
1437 ctf_integer(int, ret, ret)
1438 )
1439 )
1440
1441 LTTNG_TRACEPOINT_EVENT(ext4_find_delalloc_range,
1442 TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to,
1443 int reverse, int found, ext4_lblk_t found_blk),
1444
1445 TP_ARGS(inode, from, to, reverse, found, found_blk),
1446
1447 TP_FIELDS(
1448 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1449 ctf_integer(ino_t, ino, inode->i_ino)
1450 ctf_integer(ext4_lblk_t, from, from)
1451 ctf_integer(ext4_lblk_t, to, to)
1452 ctf_integer(int, reverse, reverse)
1453 ctf_integer(int, found, found)
1454 ctf_integer(ext4_lblk_t, found_blk, found_blk)
1455 )
1456 )
1457
1458 LTTNG_TRACEPOINT_EVENT(ext4_get_reserved_cluster_alloc,
1459 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len),
1460
1461 TP_ARGS(inode, lblk, len),
1462
1463 TP_FIELDS(
1464 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1465 ctf_integer(ino_t, ino, inode->i_ino)
1466 ctf_integer(ext4_lblk_t, lblk, lblk)
1467 ctf_integer(unsigned int, len, len)
1468 )
1469 )
1470
1471 LTTNG_TRACEPOINT_EVENT(ext4_ext_show_extent,
1472 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk,
1473 unsigned short len),
1474
1475 TP_ARGS(inode, lblk, pblk, len),
1476
1477 TP_FIELDS(
1478 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1479 ctf_integer(ino_t, ino, inode->i_ino)
1480 ctf_integer(ext4_fsblk_t, pblk, pblk)
1481 ctf_integer(ext4_lblk_t, lblk, lblk)
1482 ctf_integer(unsigned short, len, len)
1483 )
1484 )
1485
1486 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
1487 LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
1488
1489 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
1490 TP_PROTO(struct inode *inode, struct ext4_extent *ex,
1491 ext4_lblk_t from, ext4_fsblk_t to,
1492 struct partial_cluster *pc),
1493
1494 TP_ARGS(inode, ex, from, to, pc),
1495
1496 TP_FIELDS(
1497 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1498 ctf_integer(ino_t, ino, inode->i_ino)
1499 ctf_integer(ext4_lblk_t, from, from)
1500 ctf_integer(ext4_lblk_t, to, to)
1501 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1502 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1503 ctf_integer(unsigned short, ee_len, ext4_ext_get_actual_len(ex))
1504 ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu)
1505 ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk)
1506 ctf_integer(int, pc_state, pc->state)
1507 )
1508 )
1509
1510 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1511
1512 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
1513 TP_PROTO(struct inode *inode, struct ext4_extent *ex,
1514 ext4_lblk_t from, ext4_fsblk_t to,
1515 long long partial_cluster),
1516
1517 TP_ARGS(inode, ex, from, to, partial_cluster),
1518
1519 TP_FIELDS(
1520 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1521 ctf_integer(ino_t, ino, inode->i_ino)
1522 ctf_integer(ext4_lblk_t, from, from)
1523 ctf_integer(ext4_lblk_t, to, to)
1524 ctf_integer(long long, partial, partial_cluster)
1525 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1526 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1527 ctf_integer(unsigned short, ee_len, ext4_ext_get_actual_len(ex))
1528 )
1529 )
1530
1531 #else
1532
1533 LTTNG_TRACEPOINT_EVENT(ext4_remove_blocks,
1534 TP_PROTO(struct inode *inode, struct ext4_extent *ex,
1535 ext4_lblk_t from, ext4_fsblk_t to,
1536 ext4_fsblk_t partial_cluster),
1537
1538 TP_ARGS(inode, ex, from, to, partial_cluster),
1539
1540 TP_FIELDS(
1541 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1542 ctf_integer(ino_t, ino, inode->i_ino)
1543 ctf_integer(ext4_lblk_t, from, from)
1544 ctf_integer(ext4_lblk_t, to, to)
1545 ctf_integer(ext4_fsblk_t, partial, partial_cluster)
1546 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1547 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1548 ctf_integer(unsigned short, ee_len, ext4_ext_get_actual_len(ex))
1549 )
1550 )
1551
1552 #endif
1553
1554 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
1555 LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
1556
1557 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf,
1558 TP_PROTO(struct inode *inode, ext4_lblk_t start,
1559 struct ext4_extent *ex,
1560 struct partial_cluster *pc),
1561
1562 TP_ARGS(inode, start, ex, pc),
1563
1564 TP_FIELDS(
1565 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1566 ctf_integer(ino_t, ino, inode->i_ino)
1567 ctf_integer(ext4_lblk_t, start, start)
1568 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1569 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1570 ctf_integer(short, ee_len, ext4_ext_get_actual_len(ex))
1571 ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu)
1572 ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk)
1573 ctf_integer(int, pc_state, pc->state)
1574 )
1575 )
1576
1577 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1578
1579 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf,
1580 TP_PROTO(struct inode *inode, ext4_lblk_t start,
1581 struct ext4_extent *ex,
1582 long long partial_cluster),
1583
1584 TP_ARGS(inode, start, ex, partial_cluster),
1585
1586 TP_FIELDS(
1587 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1588 ctf_integer(ino_t, ino, inode->i_ino)
1589 ctf_integer(long long, partial, partial_cluster)
1590 ctf_integer(ext4_lblk_t, start, start)
1591 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1592 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1593 ctf_integer(short, ee_len, ext4_ext_get_actual_len(ex))
1594 )
1595 )
1596
1597 #else
1598
1599 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_leaf,
1600 TP_PROTO(struct inode *inode, ext4_lblk_t start,
1601 struct ext4_extent *ex, ext4_fsblk_t partial_cluster),
1602
1603 TP_ARGS(inode, start, ex, partial_cluster),
1604
1605 TP_FIELDS(
1606 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1607 ctf_integer(ino_t, ino, inode->i_ino)
1608 ctf_integer(long long, partial, partial_cluster)
1609 ctf_integer(ext4_lblk_t, start, start)
1610 ctf_integer(ext4_lblk_t, ee_lblk, le32_to_cpu(ex->ee_block))
1611 ctf_integer(ext4_fsblk_t, ee_pblk, ext4_ext_pblock(ex))
1612 ctf_integer(short, ee_len, ext4_ext_get_actual_len(ex))
1613 )
1614 )
1615
1616 #endif
1617
1618 LTTNG_TRACEPOINT_EVENT(ext4_ext_rm_idx,
1619 TP_PROTO(struct inode *inode, ext4_fsblk_t pblk),
1620
1621 TP_ARGS(inode, pblk),
1622
1623 TP_FIELDS(
1624 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1625 ctf_integer(ino_t, ino, inode->i_ino)
1626 ctf_integer(ext4_fsblk_t, pblk, pblk)
1627 )
1628 )
1629
1630 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1631
1632 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space,
1633 TP_PROTO(struct inode *inode, ext4_lblk_t start,
1634 ext4_lblk_t end, int depth),
1635
1636 TP_ARGS(inode, start, end, depth),
1637
1638 TP_FIELDS(
1639 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1640 ctf_integer(ino_t, ino, inode->i_ino)
1641 ctf_integer(ext4_lblk_t, start, start)
1642 ctf_integer(ext4_lblk_t, end, end)
1643 ctf_integer(int, depth, depth)
1644 )
1645 )
1646
1647 #else
1648
1649 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space,
1650 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth),
1651
1652 TP_ARGS(inode, start, depth),
1653
1654 TP_FIELDS(
1655 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1656 ctf_integer(ino_t, ino, inode->i_ino)
1657 ctf_integer(ext4_lblk_t, start, start)
1658 ctf_integer(int, depth, depth)
1659 )
1660 )
1661
1662 #endif
1663
1664 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) || \
1665 LTTNG_RHEL_KERNEL_RANGE(4,18,0,147,0,0, 4,19,0,0,0,0))
1666
1667 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
1668 TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end,
1669 int depth, struct partial_cluster *pc, __le16 eh_entries),
1670
1671 TP_ARGS(inode, start, end, depth, pc, eh_entries),
1672
1673 TP_FIELDS(
1674 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1675 ctf_integer(ino_t, ino, inode->i_ino)
1676 ctf_integer(ext4_lblk_t, start, start)
1677 ctf_integer(ext4_lblk_t, end, end)
1678 ctf_integer(int, depth, depth)
1679 ctf_integer(unsigned short, eh_entries, le16_to_cpu(eh_entries))
1680 ctf_integer(ext4_fsblk_t, pc_pclu, pc->pclu)
1681 ctf_integer(ext4_lblk_t, pc_lblk, pc->lblk)
1682 ctf_integer(int, pc_state, pc->state)
1683 )
1684 )
1685
1686 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1687
1688 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
1689 TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end,
1690 int depth, long long partial, __le16 eh_entries),
1691
1692 TP_ARGS(inode, start, end, depth, partial, eh_entries),
1693
1694 TP_FIELDS(
1695 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1696 ctf_integer(ino_t, ino, inode->i_ino)
1697 ctf_integer(ext4_lblk_t, start, start)
1698 ctf_integer(ext4_lblk_t, end, end)
1699 ctf_integer(int, depth, depth)
1700 ctf_integer(long long, partial, partial)
1701 ctf_integer(unsigned short, eh_entries, le16_to_cpu(eh_entries))
1702 )
1703 )
1704
1705 #else
1706
1707 LTTNG_TRACEPOINT_EVENT(ext4_ext_remove_space_done,
1708 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth,
1709 ext4_lblk_t partial, unsigned short eh_entries),
1710
1711 TP_ARGS(inode, start, depth, partial, eh_entries),
1712
1713 TP_FIELDS(
1714 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1715 ctf_integer(ino_t, ino, inode->i_ino)
1716 ctf_integer(ext4_lblk_t, start, start)
1717 ctf_integer(int, depth, depth)
1718 ctf_integer(ext4_lblk_t, partial, partial)
1719 ctf_integer(unsigned short, eh_entries, eh_entries)
1720 )
1721 )
1722
1723 #endif
1724
1725 #endif
1726
1727 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
1728
1729 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__es_extent,
1730 TP_PROTO(struct inode *inode, struct extent_status *es),
1731
1732 TP_ARGS(inode, es),
1733
1734 TP_FIELDS(
1735 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1736 ctf_integer(ino_t, ino, inode->i_ino)
1737 ctf_integer(ext4_lblk_t, lblk, es->es_lblk)
1738 ctf_integer(ext4_lblk_t, len, es->es_len)
1739 ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es))
1740 ctf_integer(char, status, ext4_es_status(es))
1741 )
1742 )
1743
1744 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__es_extent, ext4_es_insert_extent,
1745 TP_PROTO(struct inode *inode, struct extent_status *es),
1746
1747 TP_ARGS(inode, es)
1748 )
1749
1750 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__es_extent, ext4_es_cache_extent,
1751 TP_PROTO(struct inode *inode, struct extent_status *es),
1752
1753 TP_ARGS(inode, es)
1754 )
1755
1756 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
1757
1758 LTTNG_TRACEPOINT_EVENT(ext4_es_insert_extent,
1759 TP_PROTO(struct inode *inode, struct extent_status *es),
1760
1761 TP_ARGS(inode, es),
1762
1763 TP_FIELDS(
1764 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1765 ctf_integer(ino_t, ino, inode->i_ino)
1766 ctf_integer(ext4_lblk_t, lblk, es->es_lblk)
1767 ctf_integer(ext4_lblk_t, len, es->es_len)
1768 ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es))
1769 ctf_integer(char, status, ext4_es_status(es) >> 60)
1770 )
1771 )
1772
1773 LTTNG_TRACEPOINT_EVENT(ext4_es_remove_extent,
1774 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len),
1775
1776 TP_ARGS(inode, lblk, len),
1777
1778 TP_FIELDS(
1779 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1780 ctf_integer(ino_t, ino, inode->i_ino)
1781 ctf_integer(loff_t, lblk, lblk)
1782 ctf_integer(loff_t, len, len)
1783 )
1784 )
1785
1786 LTTNG_TRACEPOINT_EVENT(ext4_es_find_delayed_extent_range_enter,
1787 TP_PROTO(struct inode *inode, ext4_lblk_t lblk),
1788
1789 TP_ARGS(inode, lblk),
1790
1791 TP_FIELDS(
1792 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1793 ctf_integer(ino_t, ino, inode->i_ino)
1794 ctf_integer(ext4_lblk_t, lblk, lblk)
1795 )
1796 )
1797
1798 LTTNG_TRACEPOINT_EVENT(ext4_es_find_delayed_extent_range_exit,
1799 TP_PROTO(struct inode *inode, struct extent_status *es),
1800
1801 TP_ARGS(inode, es),
1802
1803 TP_FIELDS(
1804 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1805 ctf_integer(ino_t, ino, inode->i_ino)
1806 ctf_integer(ext4_lblk_t, lblk, es->es_lblk)
1807 ctf_integer(ext4_lblk_t, len, es->es_len)
1808 ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es))
1809 ctf_integer(char, status, ext4_es_status(es) >> 60)
1810 )
1811 )
1812
1813 LTTNG_TRACEPOINT_EVENT(ext4_es_lookup_extent_enter,
1814 TP_PROTO(struct inode *inode, ext4_lblk_t lblk),
1815
1816 TP_ARGS(inode, lblk),
1817
1818 TP_FIELDS(
1819 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1820 ctf_integer(ino_t, ino, inode->i_ino)
1821 ctf_integer(ext4_lblk_t, lblk, lblk)
1822 )
1823 )
1824
1825 LTTNG_TRACEPOINT_EVENT(ext4_es_lookup_extent_exit,
1826 TP_PROTO(struct inode *inode, struct extent_status *es,
1827 int found),
1828
1829 TP_ARGS(inode, es, found),
1830
1831 TP_FIELDS(
1832 ctf_integer(dev_t, dev, inode->i_sb->s_dev)
1833 ctf_integer(ino_t, ino, inode->i_ino)
1834 ctf_integer(ext4_lblk_t, lblk, es->es_lblk)
1835 ctf_integer(ext4_lblk_t, len, es->es_len)
1836 ctf_integer(ext4_fsblk_t, pblk, ext4_es_pblock(es))
1837 ctf_integer(char, status, ext4_es_status(es) >> 60)
1838 ctf_integer(int, found, found)
1839 )
1840 )
1841
1842 LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_enter,
1843 TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt),
1844
1845 TP_ARGS(sb, nr_to_scan, cache_cnt),
1846
1847 TP_FIELDS(
1848 ctf_integer(dev_t, dev, sb->s_dev)
1849 ctf_integer(int, nr_to_scan, nr_to_scan)
1850 ctf_integer(int, cache_cnt, cache_cnt)
1851 )
1852 )
1853
1854 LTTNG_TRACEPOINT_EVENT(ext4_es_shrink_exit,
1855 TP_PROTO(struct super_block *sb, int shrunk_nr, int cache_cnt),
1856
1857 TP_ARGS(sb, shrunk_nr, cache_cnt),
1858
1859 TP_FIELDS(
1860 ctf_integer(dev_t, dev, sb->s_dev)
1861 ctf_integer(int, shrunk_nr, shrunk_nr)
1862 ctf_integer(int, cache_cnt, cache_cnt)
1863 )
1864 )
1865
1866 #endif
1867
1868 #endif /* LTTNG_TRACE_EXT4_H */
1869
1870 /* This part must be outside protection */
1871 #include <probes/define_trace.h>
This page took 0.068415 seconds and 3 git commands to generate.