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