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