aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/ext4.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events/ext4.h')
-rw-r--r--include/trace/events/ext4.h183
1 files changed, 75 insertions, 108 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index d09550bf3f95..d0b6cd3afb2f 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -38,7 +38,7 @@ TRACE_EVENT(ext4_free_inode,
38 __entry->blocks = inode->i_blocks; 38 __entry->blocks = inode->i_blocks;
39 ), 39 ),
40 40
41 TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", 41 TP_printk("dev %s ino %lu mode 0%o uid %u gid %u blocks %llu",
42 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 42 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
43 __entry->mode, __entry->uid, __entry->gid, 43 __entry->mode, __entry->uid, __entry->gid,
44 (unsigned long long) __entry->blocks) 44 (unsigned long long) __entry->blocks)
@@ -61,7 +61,7 @@ TRACE_EVENT(ext4_request_inode,
61 __entry->mode = mode; 61 __entry->mode = mode;
62 ), 62 ),
63 63
64 TP_printk("dev %s dir %lu mode %d", 64 TP_printk("dev %s dir %lu mode 0%o",
65 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->dir, 65 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->dir,
66 __entry->mode) 66 __entry->mode)
67); 67);
@@ -85,12 +85,12 @@ TRACE_EVENT(ext4_allocate_inode,
85 __entry->mode = mode; 85 __entry->mode = mode;
86 ), 86 ),
87 87
88 TP_printk("dev %s ino %lu dir %lu mode %d", 88 TP_printk("dev %s ino %lu dir %lu mode 0%o",
89 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 89 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
90 (unsigned long) __entry->dir, __entry->mode) 90 (unsigned long) __entry->dir, __entry->mode)
91); 91);
92 92
93TRACE_EVENT(ext4_write_begin, 93DECLARE_EVENT_CLASS(ext4__write_begin,
94 94
95 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 95 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
96 unsigned int flags), 96 unsigned int flags),
@@ -118,7 +118,23 @@ TRACE_EVENT(ext4_write_begin,
118 __entry->pos, __entry->len, __entry->flags) 118 __entry->pos, __entry->len, __entry->flags)
119); 119);
120 120
121TRACE_EVENT(ext4_ordered_write_end, 121DEFINE_EVENT(ext4__write_begin, ext4_write_begin,
122
123 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
124 unsigned int flags),
125
126 TP_ARGS(inode, pos, len, flags)
127);
128
129DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin,
130
131 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
132 unsigned int flags),
133
134 TP_ARGS(inode, pos, len, flags)
135);
136
137DECLARE_EVENT_CLASS(ext4__write_end,
122 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 138 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
123 unsigned int copied), 139 unsigned int copied),
124 140
@@ -145,57 +161,36 @@ TRACE_EVENT(ext4_ordered_write_end,
145 __entry->pos, __entry->len, __entry->copied) 161 __entry->pos, __entry->len, __entry->copied)
146); 162);
147 163
148TRACE_EVENT(ext4_writeback_write_end, 164DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end,
165
149 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 166 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
150 unsigned int copied), 167 unsigned int copied),
151 168
152 TP_ARGS(inode, pos, len, copied), 169 TP_ARGS(inode, pos, len, copied)
170);
153 171
154 TP_STRUCT__entry( 172DEFINE_EVENT(ext4__write_end, ext4_writeback_write_end,
155 __field( dev_t, dev )
156 __field( ino_t, ino )
157 __field( loff_t, pos )
158 __field( unsigned int, len )
159 __field( unsigned int, copied )
160 ),
161 173
162 TP_fast_assign( 174 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
163 __entry->dev = inode->i_sb->s_dev; 175 unsigned int copied),
164 __entry->ino = inode->i_ino;
165 __entry->pos = pos;
166 __entry->len = len;
167 __entry->copied = copied;
168 ),
169 176
170 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 177 TP_ARGS(inode, pos, len, copied)
171 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
172 __entry->pos, __entry->len, __entry->copied)
173); 178);
174 179
175TRACE_EVENT(ext4_journalled_write_end, 180DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end,
181
176 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 182 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
177 unsigned int copied), 183 unsigned int copied),
178 TP_ARGS(inode, pos, len, copied),
179 184
180 TP_STRUCT__entry( 185 TP_ARGS(inode, pos, len, copied)
181 __field( dev_t, dev ) 186);
182 __field( ino_t, ino )
183 __field( loff_t, pos )
184 __field( unsigned int, len )
185 __field( unsigned int, copied )
186 ),
187 187
188 TP_fast_assign( 188DEFINE_EVENT(ext4__write_end, ext4_da_write_end,
189 __entry->dev = inode->i_sb->s_dev;
190 __entry->ino = inode->i_ino;
191 __entry->pos = pos;
192 __entry->len = len;
193 __entry->copied = copied;
194 ),
195 189
196 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 190 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
197 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 191 unsigned int copied),
198 __entry->pos, __entry->len, __entry->copied) 192
193 TP_ARGS(inode, pos, len, copied)
199); 194);
200 195
201TRACE_EVENT(ext4_writepage, 196TRACE_EVENT(ext4_writepage,
@@ -310,7 +305,6 @@ TRACE_EVENT(ext4_da_writepages_result,
310 __field( int, ret ) 305 __field( int, ret )
311 __field( int, pages_written ) 306 __field( int, pages_written )
312 __field( long, pages_skipped ) 307 __field( long, pages_skipped )
313 __field( char, encountered_congestion )
314 __field( char, more_io ) 308 __field( char, more_io )
315 __field( char, no_nrwrite_index_update ) 309 __field( char, no_nrwrite_index_update )
316 __field( pgoff_t, writeback_index ) 310 __field( pgoff_t, writeback_index )
@@ -322,75 +316,20 @@ TRACE_EVENT(ext4_da_writepages_result,
322 __entry->ret = ret; 316 __entry->ret = ret;
323 __entry->pages_written = pages_written; 317 __entry->pages_written = pages_written;
324 __entry->pages_skipped = wbc->pages_skipped; 318 __entry->pages_skipped = wbc->pages_skipped;
325 __entry->encountered_congestion = wbc->encountered_congestion;
326 __entry->more_io = wbc->more_io; 319 __entry->more_io = wbc->more_io;
327 __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; 320 __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update;
328 __entry->writeback_index = inode->i_mapping->writeback_index; 321 __entry->writeback_index = inode->i_mapping->writeback_index;
329 ), 322 ),
330 323
331 TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d writeback_index %lu", 324 TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld more_io %d no_nrwrite_index_update %d writeback_index %lu",
332 jbd2_dev_to_name(__entry->dev), 325 jbd2_dev_to_name(__entry->dev),
333 (unsigned long) __entry->ino, __entry->ret, 326 (unsigned long) __entry->ino, __entry->ret,
334 __entry->pages_written, __entry->pages_skipped, 327 __entry->pages_written, __entry->pages_skipped,
335 __entry->encountered_congestion, __entry->more_io, 328 __entry->more_io,
336 __entry->no_nrwrite_index_update, 329 __entry->no_nrwrite_index_update,
337 (unsigned long) __entry->writeback_index) 330 (unsigned long) __entry->writeback_index)
338); 331);
339 332
340TRACE_EVENT(ext4_da_write_begin,
341 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
342 unsigned int flags),
343
344 TP_ARGS(inode, pos, len, flags),
345
346 TP_STRUCT__entry(
347 __field( dev_t, dev )
348 __field( ino_t, ino )
349 __field( loff_t, pos )
350 __field( unsigned int, len )
351 __field( unsigned int, flags )
352 ),
353
354 TP_fast_assign(
355 __entry->dev = inode->i_sb->s_dev;
356 __entry->ino = inode->i_ino;
357 __entry->pos = pos;
358 __entry->len = len;
359 __entry->flags = flags;
360 ),
361
362 TP_printk("dev %s ino %lu pos %llu len %u flags %u",
363 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
364 __entry->pos, __entry->len, __entry->flags)
365);
366
367TRACE_EVENT(ext4_da_write_end,
368 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
369 unsigned int copied),
370
371 TP_ARGS(inode, pos, len, copied),
372
373 TP_STRUCT__entry(
374 __field( dev_t, dev )
375 __field( ino_t, ino )
376 __field( loff_t, pos )
377 __field( unsigned int, len )
378 __field( unsigned int, copied )
379 ),
380
381 TP_fast_assign(
382 __entry->dev = inode->i_sb->s_dev;
383 __entry->ino = inode->i_ino;
384 __entry->pos = pos;
385 __entry->len = len;
386 __entry->copied = copied;
387 ),
388
389 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
390 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
391 __entry->pos, __entry->len, __entry->copied)
392);
393
394TRACE_EVENT(ext4_discard_blocks, 333TRACE_EVENT(ext4_discard_blocks,
395 TP_PROTO(struct super_block *sb, unsigned long long blk, 334 TP_PROTO(struct super_block *sb, unsigned long long blk,
396 unsigned long long count), 335 unsigned long long count),
@@ -650,30 +589,32 @@ TRACE_EVENT(ext4_allocate_blocks,
650 589
651TRACE_EVENT(ext4_free_blocks, 590TRACE_EVENT(ext4_free_blocks,
652 TP_PROTO(struct inode *inode, __u64 block, unsigned long count, 591 TP_PROTO(struct inode *inode, __u64 block, unsigned long count,
653 int metadata), 592 int flags),
654 593
655 TP_ARGS(inode, block, count, metadata), 594 TP_ARGS(inode, block, count, flags),
656 595
657 TP_STRUCT__entry( 596 TP_STRUCT__entry(
658 __field( dev_t, dev ) 597 __field( dev_t, dev )
659 __field( ino_t, ino ) 598 __field( ino_t, ino )
599 __field( umode_t, mode )
660 __field( __u64, block ) 600 __field( __u64, block )
661 __field( unsigned long, count ) 601 __field( unsigned long, count )
662 __field( int, metadata ) 602 __field( int, flags )
663
664 ), 603 ),
665 604
666 TP_fast_assign( 605 TP_fast_assign(
667 __entry->dev = inode->i_sb->s_dev; 606 __entry->dev = inode->i_sb->s_dev;
668 __entry->ino = inode->i_ino; 607 __entry->ino = inode->i_ino;
608 __entry->mode = inode->i_mode;
669 __entry->block = block; 609 __entry->block = block;
670 __entry->count = count; 610 __entry->count = count;
671 __entry->metadata = metadata; 611 __entry->flags = flags;
672 ), 612 ),
673 613
674 TP_printk("dev %s ino %lu block %llu count %lu metadata %d", 614 TP_printk("dev %s ino %lu mode 0%o block %llu count %lu flags %d",
675 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, 615 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
676 __entry->block, __entry->count, __entry->metadata) 616 __entry->mode, __entry->block, __entry->count,
617 __entry->flags)
677); 618);
678 619
679TRACE_EVENT(ext4_sync_file, 620TRACE_EVENT(ext4_sync_file,
@@ -907,6 +848,32 @@ TRACE_EVENT(ext4_mballoc_free,
907 __entry->result_len, __entry->result_logical) 848 __entry->result_len, __entry->result_logical)
908); 849);
909 850
851TRACE_EVENT(ext4_forget,
852 TP_PROTO(struct inode *inode, int is_metadata, __u64 block),
853
854 TP_ARGS(inode, is_metadata, block),
855
856 TP_STRUCT__entry(
857 __field( dev_t, dev )
858 __field( ino_t, ino )
859 __field( umode_t, mode )
860 __field( int, is_metadata )
861 __field( __u64, block )
862 ),
863
864 TP_fast_assign(
865 __entry->dev = inode->i_sb->s_dev;
866 __entry->ino = inode->i_ino;
867 __entry->mode = inode->i_mode;
868 __entry->is_metadata = is_metadata;
869 __entry->block = block;
870 ),
871
872 TP_printk("dev %s ino %lu mode 0%o is_metadata %d block %llu",
873 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
874 __entry->mode, __entry->is_metadata, __entry->block)
875);
876
910#endif /* _TRACE_EXT4_H */ 877#endif /* _TRACE_EXT4_H */
911 878
912/* This part must be outside protection */ 879/* This part must be outside protection */