e02ecf428ef0d64e6443ee42a9082cc3d551eeac
[lttng-modules.git] / instrumentation / events / lttng-module / ext3.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM ext3
3
4 #if !defined(_TRACE_EXT3_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_EXT3_H
6
7 #include <linux/tracepoint.h>
8
9 #ifndef _TRACE_EXT3_DEF
10 #define _TRACE_EXT3_DEF
11 static struct dentry *dentry;
12 #endif
13
14
15 TRACE_EVENT(ext3_free_inode,
16 TP_PROTO(struct inode *inode),
17
18 TP_ARGS(inode),
19
20 TP_STRUCT__entry(
21 __field( dev_t, dev )
22 __field( ino_t, ino )
23 __field( umode_t, mode )
24 __field( uid_t, uid )
25 __field( gid_t, gid )
26 __field( blkcnt_t, blocks )
27 ),
28
29 TP_fast_assign(
30 tp_assign(dev, inode->i_sb->s_dev);
31 tp_assign(ino, inode->i_ino);
32 tp_assign(mode, inode->i_mode);
33 tp_assign(uid, inode->i_uid);
34 tp_assign(gid, inode->i_gid);
35 tp_assign(blocks, inode->i_blocks);
36 ),
37
38 TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %lu",
39 MAJOR(__entry->dev), MINOR(__entry->dev),
40 (unsigned long) __entry->ino,
41 __entry->mode, __entry->uid, __entry->gid,
42 (unsigned long) __entry->blocks)
43 )
44
45 TRACE_EVENT(ext3_request_inode,
46 TP_PROTO(struct inode *dir, int mode),
47
48 TP_ARGS(dir, mode),
49
50 TP_STRUCT__entry(
51 __field( dev_t, dev )
52 __field( ino_t, dir )
53 __field( umode_t, mode )
54 ),
55
56 TP_fast_assign(
57 tp_assign(dev, dir->i_sb->s_dev);
58 tp_assign(dir, dir->i_ino);
59 tp_assign(mode, mode);
60 ),
61
62 TP_printk("dev %d,%d dir %lu mode 0%o",
63 MAJOR(__entry->dev), MINOR(__entry->dev),
64 (unsigned long) __entry->dir, __entry->mode)
65 )
66
67 TRACE_EVENT(ext3_allocate_inode,
68 TP_PROTO(struct inode *inode, struct inode *dir, int mode),
69
70 TP_ARGS(inode, dir, mode),
71
72 TP_STRUCT__entry(
73 __field( dev_t, dev )
74 __field( ino_t, ino )
75 __field( ino_t, dir )
76 __field( umode_t, mode )
77 ),
78
79 TP_fast_assign(
80 tp_assign(dev, inode->i_sb->s_dev);
81 tp_assign(ino, inode->i_ino);
82 tp_assign(dir, dir->i_ino);
83 tp_assign(mode, mode);
84 ),
85
86 TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
87 MAJOR(__entry->dev), MINOR(__entry->dev),
88 (unsigned long) __entry->ino,
89 (unsigned long) __entry->dir, __entry->mode)
90 )
91
92 TRACE_EVENT(ext3_evict_inode,
93 TP_PROTO(struct inode *inode),
94
95 TP_ARGS(inode),
96
97 TP_STRUCT__entry(
98 __field( dev_t, dev )
99 __field( ino_t, ino )
100 __field( int, nlink )
101 ),
102
103 TP_fast_assign(
104 tp_assign(dev, inode->i_sb->s_dev);
105 tp_assign(ino, inode->i_ino);
106 tp_assign(nlink, inode->i_nlink);
107 ),
108
109 TP_printk("dev %d,%d ino %lu nlink %d",
110 MAJOR(__entry->dev), MINOR(__entry->dev),
111 (unsigned long) __entry->ino, __entry->nlink)
112 )
113
114 TRACE_EVENT(ext3_drop_inode,
115 TP_PROTO(struct inode *inode, int drop),
116
117 TP_ARGS(inode, drop),
118
119 TP_STRUCT__entry(
120 __field( dev_t, dev )
121 __field( ino_t, ino )
122 __field( int, drop )
123 ),
124
125 TP_fast_assign(
126 tp_assign(dev, inode->i_sb->s_dev);
127 tp_assign(ino, inode->i_ino);
128 tp_assign(drop, drop);
129 ),
130
131 TP_printk("dev %d,%d ino %lu drop %d",
132 MAJOR(__entry->dev), MINOR(__entry->dev),
133 (unsigned long) __entry->ino, __entry->drop)
134 )
135
136 TRACE_EVENT(ext3_mark_inode_dirty,
137 TP_PROTO(struct inode *inode, unsigned long IP),
138
139 TP_ARGS(inode, IP),
140
141 TP_STRUCT__entry(
142 __field( dev_t, dev )
143 __field( ino_t, ino )
144 __field(unsigned long, ip )
145 ),
146
147 TP_fast_assign(
148 tp_assign(dev, inode->i_sb->s_dev);
149 tp_assign(ino, inode->i_ino);
150 tp_assign(ip, IP);
151 ),
152
153 TP_printk("dev %d,%d ino %lu caller %pF",
154 MAJOR(__entry->dev), MINOR(__entry->dev),
155 (unsigned long) __entry->ino, (void *)__entry->ip)
156 )
157
158 TRACE_EVENT(ext3_write_begin,
159 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
160 unsigned int flags),
161
162 TP_ARGS(inode, pos, len, flags),
163
164 TP_STRUCT__entry(
165 __field( dev_t, dev )
166 __field( ino_t, ino )
167 __field( loff_t, pos )
168 __field( unsigned int, len )
169 __field( unsigned int, flags )
170 ),
171
172 TP_fast_assign(
173 tp_assign(dev, inode->i_sb->s_dev);
174 tp_assign(ino, inode->i_ino);
175 tp_assign(pos, pos);
176 tp_assign(len, len);
177 tp_assign(flags, flags);
178 ),
179
180 TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u",
181 MAJOR(__entry->dev), MINOR(__entry->dev),
182 (unsigned long) __entry->ino,
183 (unsigned long long) __entry->pos, __entry->len,
184 __entry->flags)
185 )
186
187 DECLARE_EVENT_CLASS(ext3__write_end,
188 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
189 unsigned int copied),
190
191 TP_ARGS(inode, pos, len, copied),
192
193 TP_STRUCT__entry(
194 __field( dev_t, dev )
195 __field( ino_t, ino )
196 __field( loff_t, pos )
197 __field( unsigned int, len )
198 __field( unsigned int, copied )
199 ),
200
201 TP_fast_assign(
202 tp_assign(dev, inode->i_sb->s_dev);
203 tp_assign(ino, inode->i_ino);
204 tp_assign(pos, pos);
205 tp_assign(len, len);
206 tp_assign(copied, copied);
207 ),
208
209 TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u",
210 MAJOR(__entry->dev), MINOR(__entry->dev),
211 (unsigned long) __entry->ino,
212 (unsigned long long) __entry->pos, __entry->len,
213 __entry->copied)
214 )
215
216 DEFINE_EVENT(ext3__write_end, ext3_ordered_write_end,
217
218 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
219 unsigned int copied),
220
221 TP_ARGS(inode, pos, len, copied)
222 )
223
224 DEFINE_EVENT(ext3__write_end, ext3_writeback_write_end,
225
226 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
227 unsigned int copied),
228
229 TP_ARGS(inode, pos, len, copied)
230 )
231
232 DEFINE_EVENT(ext3__write_end, ext3_journalled_write_end,
233
234 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
235 unsigned int copied),
236
237 TP_ARGS(inode, pos, len, copied)
238 )
239
240 DECLARE_EVENT_CLASS(ext3__page_op,
241 TP_PROTO(struct page *page),
242
243 TP_ARGS(page),
244
245 TP_STRUCT__entry(
246 __field( dev_t, dev )
247 __field( ino_t, ino )
248 __field( pgoff_t, index )
249
250 ),
251
252 TP_fast_assign(
253 tp_assign(index, page->index);
254 tp_assign(ino, page->mapping->host->i_ino);
255 tp_assign(dev, page->mapping->host->i_sb->s_dev);
256 ),
257
258 TP_printk("dev %d,%d ino %lu page_index %lu",
259 MAJOR(__entry->dev), MINOR(__entry->dev),
260 (unsigned long) __entry->ino, __entry->index)
261 )
262
263 DEFINE_EVENT(ext3__page_op, ext3_ordered_writepage,
264
265 TP_PROTO(struct page *page),
266
267 TP_ARGS(page)
268 )
269
270 DEFINE_EVENT(ext3__page_op, ext3_writeback_writepage,
271
272 TP_PROTO(struct page *page),
273
274 TP_ARGS(page)
275 )
276
277 DEFINE_EVENT(ext3__page_op, ext3_journalled_writepage,
278
279 TP_PROTO(struct page *page),
280
281 TP_ARGS(page)
282 )
283
284 DEFINE_EVENT(ext3__page_op, ext3_readpage,
285
286 TP_PROTO(struct page *page),
287
288 TP_ARGS(page)
289 )
290
291 DEFINE_EVENT(ext3__page_op, ext3_releasepage,
292
293 TP_PROTO(struct page *page),
294
295 TP_ARGS(page)
296 )
297
298 TRACE_EVENT(ext3_invalidatepage,
299 TP_PROTO(struct page *page, unsigned long offset),
300
301 TP_ARGS(page, offset),
302
303 TP_STRUCT__entry(
304 __field( pgoff_t, index )
305 __field( unsigned long, offset )
306 __field( ino_t, ino )
307 __field( dev_t, dev )
308
309 ),
310
311 TP_fast_assign(
312 tp_assign(index, page->index);
313 tp_assign(offset, offset);
314 tp_assign(ino, page->mapping->host->i_ino);
315 tp_assign(dev, page->mapping->host->i_sb->s_dev);
316 ),
317
318 TP_printk("dev %d,%d ino %lu page_index %lu offset %lu",
319 MAJOR(__entry->dev), MINOR(__entry->dev),
320 (unsigned long) __entry->ino,
321 __entry->index, __entry->offset)
322 )
323
324 TRACE_EVENT(ext3_discard_blocks,
325 TP_PROTO(struct super_block *sb, unsigned long blk,
326 unsigned long count),
327
328 TP_ARGS(sb, blk, count),
329
330 TP_STRUCT__entry(
331 __field( dev_t, dev )
332 __field( unsigned long, blk )
333 __field( unsigned long, count )
334
335 ),
336
337 TP_fast_assign(
338 tp_assign(dev, sb->s_dev);
339 tp_assign(blk, blk);
340 tp_assign(count, count);
341 ),
342
343 TP_printk("dev %d,%d blk %lu count %lu",
344 MAJOR(__entry->dev), MINOR(__entry->dev),
345 __entry->blk, __entry->count)
346 )
347
348 TRACE_EVENT(ext3_request_blocks,
349 TP_PROTO(struct inode *inode, unsigned long goal,
350 unsigned long count),
351
352 TP_ARGS(inode, goal, count),
353
354 TP_STRUCT__entry(
355 __field( dev_t, dev )
356 __field( ino_t, ino )
357 __field( unsigned long, count )
358 __field( unsigned long, goal )
359 ),
360
361 TP_fast_assign(
362 tp_assign(dev, inode->i_sb->s_dev);
363 tp_assign(ino, inode->i_ino);
364 tp_assign(count, count);
365 tp_assign(goal, goal);
366 ),
367
368 TP_printk("dev %d,%d ino %lu count %lu goal %lu ",
369 MAJOR(__entry->dev), MINOR(__entry->dev),
370 (unsigned long) __entry->ino,
371 __entry->count, __entry->goal)
372 )
373
374 TRACE_EVENT(ext3_allocate_blocks,
375 TP_PROTO(struct inode *inode, unsigned long goal,
376 unsigned long count, unsigned long block),
377
378 TP_ARGS(inode, goal, count, block),
379
380 TP_STRUCT__entry(
381 __field( dev_t, dev )
382 __field( ino_t, ino )
383 __field( unsigned long, block )
384 __field( unsigned long, count )
385 __field( unsigned long, goal )
386 ),
387
388 TP_fast_assign(
389 tp_assign(dev, inode->i_sb->s_dev);
390 tp_assign(ino, inode->i_ino);
391 tp_assign(block, block);
392 tp_assign(count, count);
393 tp_assign(goal, goal);
394 ),
395
396 TP_printk("dev %d,%d ino %lu count %lu block %lu goal %lu",
397 MAJOR(__entry->dev), MINOR(__entry->dev),
398 (unsigned long) __entry->ino,
399 __entry->count, __entry->block,
400 __entry->goal)
401 )
402
403 TRACE_EVENT(ext3_free_blocks,
404 TP_PROTO(struct inode *inode, unsigned long block,
405 unsigned long count),
406
407 TP_ARGS(inode, block, count),
408
409 TP_STRUCT__entry(
410 __field( dev_t, dev )
411 __field( ino_t, ino )
412 __field( umode_t, mode )
413 __field( unsigned long, block )
414 __field( unsigned long, count )
415 ),
416
417 TP_fast_assign(
418 tp_assign(dev, inode->i_sb->s_dev);
419 tp_assign(ino, inode->i_ino);
420 tp_assign(mode, inode->i_mode);
421 tp_assign(block, block);
422 tp_assign(count, count);
423 ),
424
425 TP_printk("dev %d,%d ino %lu mode 0%o block %lu count %lu",
426 MAJOR(__entry->dev), MINOR(__entry->dev),
427 (unsigned long) __entry->ino,
428 __entry->mode, __entry->block, __entry->count)
429 )
430
431 TRACE_EVENT(ext3_sync_file_enter,
432 TP_PROTO(struct file *file, int datasync),
433
434 TP_ARGS(file, datasync),
435
436 TP_STRUCT__entry(
437 __field( dev_t, dev )
438 __field( ino_t, ino )
439 __field( ino_t, parent )
440 __field( int, datasync )
441 ),
442
443 TP_fast_assign(
444 dentry = file->f_path.dentry;
445
446 tp_assign(dev, dentry->d_inode->i_sb->s_dev);
447 tp_assign(ino, dentry->d_inode->i_ino);
448 tp_assign(datasync, datasync);
449 tp_assign(parent, dentry->d_parent->d_inode->i_ino);
450 ),
451
452 TP_printk("dev %d,%d ino %lu parent %ld datasync %d ",
453 MAJOR(__entry->dev), MINOR(__entry->dev),
454 (unsigned long) __entry->ino,
455 (unsigned long) __entry->parent, __entry->datasync)
456 )
457
458 TRACE_EVENT(ext3_sync_file_exit,
459 TP_PROTO(struct inode *inode, int ret),
460
461 TP_ARGS(inode, ret),
462
463 TP_STRUCT__entry(
464 __field( int, ret )
465 __field( ino_t, ino )
466 __field( dev_t, dev )
467 ),
468
469 TP_fast_assign(
470 tp_assign(ret, ret);
471 tp_assign(ino, inode->i_ino);
472 tp_assign(dev, inode->i_sb->s_dev);
473 ),
474
475 TP_printk("dev %d,%d ino %lu ret %d",
476 MAJOR(__entry->dev), MINOR(__entry->dev),
477 (unsigned long) __entry->ino,
478 __entry->ret)
479 )
480
481 TRACE_EVENT(ext3_sync_fs,
482 TP_PROTO(struct super_block *sb, int wait),
483
484 TP_ARGS(sb, wait),
485
486 TP_STRUCT__entry(
487 __field( dev_t, dev )
488 __field( int, wait )
489
490 ),
491
492 TP_fast_assign(
493 tp_assign(dev, sb->s_dev);
494 tp_assign(wait, wait);
495 ),
496
497 TP_printk("dev %d,%d wait %d",
498 MAJOR(__entry->dev), MINOR(__entry->dev),
499 __entry->wait)
500 )
501
502 TRACE_EVENT(ext3_rsv_window_add,
503 TP_PROTO(struct super_block *sb,
504 struct ext3_reserve_window_node *rsv_node),
505
506 TP_ARGS(sb, rsv_node),
507
508 TP_STRUCT__entry(
509 __field( unsigned long, start )
510 __field( unsigned long, end )
511 __field( dev_t, dev )
512 ),
513
514 TP_fast_assign(
515 tp_assign(dev, sb->s_dev);
516 tp_assign(start, rsv_node->rsv_window._rsv_start);
517 tp_assign(end, rsv_node->rsv_window._rsv_end);
518 ),
519
520 TP_printk("dev %d,%d start %lu end %lu",
521 MAJOR(__entry->dev), MINOR(__entry->dev),
522 __entry->start, __entry->end)
523 )
524
525 TRACE_EVENT(ext3_discard_reservation,
526 TP_PROTO(struct inode *inode,
527 struct ext3_reserve_window_node *rsv_node),
528
529 TP_ARGS(inode, rsv_node),
530
531 TP_STRUCT__entry(
532 __field( unsigned long, start )
533 __field( unsigned long, end )
534 __field( ino_t, ino )
535 __field( dev_t, dev )
536 ),
537
538 TP_fast_assign(
539 tp_assign(start, rsv_node->rsv_window._rsv_start);
540 tp_assign(end, rsv_node->rsv_window._rsv_end);
541 tp_assign(ino, inode->i_ino);
542 tp_assign(dev, inode->i_sb->s_dev);
543 ),
544
545 TP_printk("dev %d,%d ino %lu start %lu end %lu",
546 MAJOR(__entry->dev), MINOR(__entry->dev),
547 (unsigned long)__entry->ino, __entry->start,
548 __entry->end)
549 )
550
551 TRACE_EVENT(ext3_alloc_new_reservation,
552 TP_PROTO(struct super_block *sb, unsigned long goal),
553
554 TP_ARGS(sb, goal),
555
556 TP_STRUCT__entry(
557 __field( dev_t, dev )
558 __field( unsigned long, goal )
559 ),
560
561 TP_fast_assign(
562 tp_assign(dev, sb->s_dev);
563 tp_assign(goal, goal);
564 ),
565
566 TP_printk("dev %d,%d goal %lu",
567 MAJOR(__entry->dev), MINOR(__entry->dev),
568 __entry->goal)
569 )
570
571 TRACE_EVENT(ext3_reserved,
572 TP_PROTO(struct super_block *sb, unsigned long block,
573 struct ext3_reserve_window_node *rsv_node),
574
575 TP_ARGS(sb, block, rsv_node),
576
577 TP_STRUCT__entry(
578 __field( unsigned long, block )
579 __field( unsigned long, start )
580 __field( unsigned long, end )
581 __field( dev_t, dev )
582 ),
583
584 TP_fast_assign(
585 tp_assign(block, block);
586 tp_assign(start, rsv_node->rsv_window._rsv_start);
587 tp_assign(end, rsv_node->rsv_window._rsv_end);
588 tp_assign(dev, sb->s_dev);
589 ),
590
591 TP_printk("dev %d,%d block %lu, start %lu end %lu",
592 MAJOR(__entry->dev), MINOR(__entry->dev),
593 __entry->block, __entry->start, __entry->end)
594 )
595
596 TRACE_EVENT(ext3_forget,
597 TP_PROTO(struct inode *inode, int is_metadata, unsigned long block),
598
599 TP_ARGS(inode, is_metadata, block),
600
601 TP_STRUCT__entry(
602 __field( dev_t, dev )
603 __field( ino_t, ino )
604 __field( umode_t, mode )
605 __field( int, is_metadata )
606 __field( unsigned long, block )
607 ),
608
609 TP_fast_assign(
610 tp_assign(dev, inode->i_sb->s_dev);
611 tp_assign(ino, inode->i_ino);
612 tp_assign(mode, inode->i_mode);
613 tp_assign(is_metadata, is_metadata);
614 tp_assign(block, block);
615 ),
616
617 TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %lu",
618 MAJOR(__entry->dev), MINOR(__entry->dev),
619 (unsigned long) __entry->ino,
620 __entry->mode, __entry->is_metadata, __entry->block)
621 )
622
623 TRACE_EVENT(ext3_read_block_bitmap,
624 TP_PROTO(struct super_block *sb, unsigned int group),
625
626 TP_ARGS(sb, group),
627
628 TP_STRUCT__entry(
629 __field( dev_t, dev )
630 __field( __u32, group )
631
632 ),
633
634 TP_fast_assign(
635 tp_assign(dev, sb->s_dev);
636 tp_assign(group, group);
637 ),
638
639 TP_printk("dev %d,%d group %u",
640 MAJOR(__entry->dev), MINOR(__entry->dev),
641 __entry->group)
642 )
643
644 TRACE_EVENT(ext3_direct_IO_enter,
645 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
646
647 TP_ARGS(inode, offset, len, rw),
648
649 TP_STRUCT__entry(
650 __field( ino_t, ino )
651 __field( dev_t, dev )
652 __field( loff_t, pos )
653 __field( unsigned long, len )
654 __field( int, rw )
655 ),
656
657 TP_fast_assign(
658 tp_assign(ino, inode->i_ino);
659 tp_assign(dev, inode->i_sb->s_dev);
660 tp_assign(pos, offset);
661 tp_assign(len, len);
662 tp_assign(rw, rw);
663 ),
664
665 TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d",
666 MAJOR(__entry->dev), MINOR(__entry->dev),
667 (unsigned long) __entry->ino,
668 (unsigned long long) __entry->pos, __entry->len,
669 __entry->rw)
670 )
671
672 TRACE_EVENT(ext3_direct_IO_exit,
673 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
674 int rw, int ret),
675
676 TP_ARGS(inode, offset, len, rw, ret),
677
678 TP_STRUCT__entry(
679 __field( ino_t, ino )
680 __field( dev_t, dev )
681 __field( loff_t, pos )
682 __field( unsigned long, len )
683 __field( int, rw )
684 __field( int, ret )
685 ),
686
687 TP_fast_assign(
688 tp_assign(ino, inode->i_ino);
689 tp_assign(dev, inode->i_sb->s_dev);
690 tp_assign(pos, offset);
691 tp_assign(len, len);
692 tp_assign(rw, rw);
693 tp_assign(ret, ret);
694 ),
695
696 TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d ret %d",
697 MAJOR(__entry->dev), MINOR(__entry->dev),
698 (unsigned long) __entry->ino,
699 (unsigned long long) __entry->pos, __entry->len,
700 __entry->rw, __entry->ret)
701 )
702
703 TRACE_EVENT(ext3_unlink_enter,
704 TP_PROTO(struct inode *parent, struct dentry *dentry),
705
706 TP_ARGS(parent, dentry),
707
708 TP_STRUCT__entry(
709 __field( ino_t, parent )
710 __field( ino_t, ino )
711 __field( loff_t, size )
712 __field( dev_t, dev )
713 ),
714
715 TP_fast_assign(
716 tp_assign(parent, parent->i_ino);
717 tp_assign(ino, dentry->d_inode->i_ino);
718 tp_assign(size, dentry->d_inode->i_size);
719 tp_assign(dev, dentry->d_inode->i_sb->s_dev);
720 ),
721
722 TP_printk("dev %d,%d ino %lu size %lld parent %ld",
723 MAJOR(__entry->dev), MINOR(__entry->dev),
724 (unsigned long) __entry->ino,
725 (unsigned long long)__entry->size,
726 (unsigned long) __entry->parent)
727 )
728
729 TRACE_EVENT(ext3_unlink_exit,
730 TP_PROTO(struct dentry *dentry, int ret),
731
732 TP_ARGS(dentry, ret),
733
734 TP_STRUCT__entry(
735 __field( ino_t, ino )
736 __field( dev_t, dev )
737 __field( int, ret )
738 ),
739
740 TP_fast_assign(
741 tp_assign(ino, dentry->d_inode->i_ino);
742 tp_assign(dev, dentry->d_inode->i_sb->s_dev);
743 tp_assign(ret, ret);
744 ),
745
746 TP_printk("dev %d,%d ino %lu ret %d",
747 MAJOR(__entry->dev), MINOR(__entry->dev),
748 (unsigned long) __entry->ino,
749 __entry->ret)
750 )
751
752 DECLARE_EVENT_CLASS(ext3__truncate,
753 TP_PROTO(struct inode *inode),
754
755 TP_ARGS(inode),
756
757 TP_STRUCT__entry(
758 __field( ino_t, ino )
759 __field( dev_t, dev )
760 __field( blkcnt_t, blocks )
761 ),
762
763 TP_fast_assign(
764 tp_assign(ino, inode->i_ino);
765 tp_assign(dev, inode->i_sb->s_dev);
766 tp_assign(blocks, inode->i_blocks);
767 ),
768
769 TP_printk("dev %d,%d ino %lu blocks %lu",
770 MAJOR(__entry->dev), MINOR(__entry->dev),
771 (unsigned long) __entry->ino, (unsigned long) __entry->blocks)
772 )
773
774 DEFINE_EVENT(ext3__truncate, ext3_truncate_enter,
775
776 TP_PROTO(struct inode *inode),
777
778 TP_ARGS(inode)
779 )
780
781 DEFINE_EVENT(ext3__truncate, ext3_truncate_exit,
782
783 TP_PROTO(struct inode *inode),
784
785 TP_ARGS(inode)
786 )
787
788 TRACE_EVENT(ext3_get_blocks_enter,
789 TP_PROTO(struct inode *inode, unsigned long lblk,
790 unsigned long len, int create),
791
792 TP_ARGS(inode, lblk, len, create),
793
794 TP_STRUCT__entry(
795 __field( ino_t, ino )
796 __field( dev_t, dev )
797 __field( unsigned long, lblk )
798 __field( unsigned long, len )
799 __field( int, create )
800 ),
801
802 TP_fast_assign(
803 tp_assign(ino, inode->i_ino);
804 tp_assign(dev, inode->i_sb->s_dev);
805 tp_assign(lblk, lblk);
806 tp_assign(len, len);
807 tp_assign(create, create);
808 ),
809
810 TP_printk("dev %d,%d ino %lu lblk %lu len %lu create %u",
811 MAJOR(__entry->dev), MINOR(__entry->dev),
812 (unsigned long) __entry->ino,
813 __entry->lblk, __entry->len, __entry->create)
814 )
815
816 TRACE_EVENT(ext3_get_blocks_exit,
817 TP_PROTO(struct inode *inode, unsigned long lblk,
818 unsigned long pblk, unsigned long len, int ret),
819
820 TP_ARGS(inode, lblk, pblk, len, ret),
821
822 TP_STRUCT__entry(
823 __field( ino_t, ino )
824 __field( dev_t, dev )
825 __field( unsigned long, lblk )
826 __field( unsigned long, pblk )
827 __field( unsigned long, len )
828 __field( int, ret )
829 ),
830
831 TP_fast_assign(
832 tp_assign(ino, inode->i_ino);
833 tp_assign(dev, inode->i_sb->s_dev);
834 tp_assign(lblk, lblk);
835 tp_assign(pblk, pblk);
836 tp_assign(len, len);
837 tp_assign(ret, ret);
838 ),
839
840 TP_printk("dev %d,%d ino %lu lblk %lu pblk %lu len %lu ret %d",
841 MAJOR(__entry->dev), MINOR(__entry->dev),
842 (unsigned long) __entry->ino,
843 __entry->lblk, __entry->pblk,
844 __entry->len, __entry->ret)
845 )
846
847 TRACE_EVENT(ext3_load_inode,
848 TP_PROTO(struct inode *inode),
849
850 TP_ARGS(inode),
851
852 TP_STRUCT__entry(
853 __field( ino_t, ino )
854 __field( dev_t, dev )
855 ),
856
857 TP_fast_assign(
858 tp_assign(ino, inode->i_ino);
859 tp_assign(dev, inode->i_sb->s_dev);
860 ),
861
862 TP_printk("dev %d,%d ino %lu",
863 MAJOR(__entry->dev), MINOR(__entry->dev),
864 (unsigned long) __entry->ino)
865 )
866
867 #endif /* _TRACE_EXT3_H */
868
869 /* This part must be outside protection */
870 #include "../../../probes/define_trace.h"
This page took 0.066988 seconds and 4 git commands to generate.