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.h146
1 files changed, 106 insertions, 40 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 7d8b5bc74185..c1bd8f1e8b94 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -5,10 +5,15 @@
5#define _TRACE_EXT4_H 5#define _TRACE_EXT4_H
6 6
7#include <linux/writeback.h> 7#include <linux/writeback.h>
8#include "../../../fs/ext4/ext4.h"
9#include "../../../fs/ext4/mballoc.h"
10#include <linux/tracepoint.h> 8#include <linux/tracepoint.h>
11 9
10struct ext4_allocation_context;
11struct ext4_allocation_request;
12struct ext4_prealloc_space;
13struct ext4_inode_info;
14
15#define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
16
12TRACE_EVENT(ext4_free_inode, 17TRACE_EVENT(ext4_free_inode,
13 TP_PROTO(struct inode *inode), 18 TP_PROTO(struct inode *inode),
14 19
@@ -33,8 +38,8 @@ TRACE_EVENT(ext4_free_inode,
33 ), 38 ),
34 39
35 TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", 40 TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu",
36 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->mode, 41 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
37 __entry->uid, __entry->gid, 42 __entry->mode, __entry->uid, __entry->gid,
38 (unsigned long long) __entry->blocks) 43 (unsigned long long) __entry->blocks)
39); 44);
40 45
@@ -56,7 +61,8 @@ TRACE_EVENT(ext4_request_inode,
56 ), 61 ),
57 62
58 TP_printk("dev %s dir %lu mode %d", 63 TP_printk("dev %s dir %lu mode %d",
59 jbd2_dev_to_name(__entry->dev), __entry->dir, __entry->mode) 64 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->dir,
65 __entry->mode)
60); 66);
61 67
62TRACE_EVENT(ext4_allocate_inode, 68TRACE_EVENT(ext4_allocate_inode,
@@ -79,7 +85,8 @@ TRACE_EVENT(ext4_allocate_inode,
79 ), 85 ),
80 86
81 TP_printk("dev %s ino %lu dir %lu mode %d", 87 TP_printk("dev %s ino %lu dir %lu mode %d",
82 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->dir, __entry->mode) 88 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
89 (unsigned long) __entry->dir, __entry->mode)
83); 90);
84 91
85TRACE_EVENT(ext4_write_begin, 92TRACE_EVENT(ext4_write_begin,
@@ -106,8 +113,8 @@ TRACE_EVENT(ext4_write_begin,
106 ), 113 ),
107 114
108 TP_printk("dev %s ino %lu pos %llu len %u flags %u", 115 TP_printk("dev %s ino %lu pos %llu len %u flags %u",
109 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, 116 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
110 __entry->flags) 117 __entry->pos, __entry->len, __entry->flags)
111); 118);
112 119
113TRACE_EVENT(ext4_ordered_write_end, 120TRACE_EVENT(ext4_ordered_write_end,
@@ -133,8 +140,8 @@ TRACE_EVENT(ext4_ordered_write_end,
133 ), 140 ),
134 141
135 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 142 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
136 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, 143 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
137 __entry->copied) 144 __entry->pos, __entry->len, __entry->copied)
138); 145);
139 146
140TRACE_EVENT(ext4_writeback_write_end, 147TRACE_EVENT(ext4_writeback_write_end,
@@ -160,8 +167,8 @@ TRACE_EVENT(ext4_writeback_write_end,
160 ), 167 ),
161 168
162 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 169 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
163 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, 170 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
164 __entry->copied) 171 __entry->pos, __entry->len, __entry->copied)
165); 172);
166 173
167TRACE_EVENT(ext4_journalled_write_end, 174TRACE_EVENT(ext4_journalled_write_end,
@@ -186,8 +193,8 @@ TRACE_EVENT(ext4_journalled_write_end,
186 ), 193 ),
187 194
188 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 195 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
189 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, 196 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
190 __entry->copied) 197 __entry->pos, __entry->len, __entry->copied)
191); 198);
192 199
193TRACE_EVENT(ext4_writepage, 200TRACE_EVENT(ext4_writepage,
@@ -209,7 +216,8 @@ TRACE_EVENT(ext4_writepage,
209 ), 216 ),
210 217
211 TP_printk("dev %s ino %lu page_index %lu", 218 TP_printk("dev %s ino %lu page_index %lu",
212 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) 219 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
220 __entry->index)
213); 221);
214 222
215TRACE_EVENT(ext4_da_writepages, 223TRACE_EVENT(ext4_da_writepages,
@@ -227,7 +235,6 @@ TRACE_EVENT(ext4_da_writepages,
227 __field( char, nonblocking ) 235 __field( char, nonblocking )
228 __field( char, for_kupdate ) 236 __field( char, for_kupdate )
229 __field( char, for_reclaim ) 237 __field( char, for_reclaim )
230 __field( char, for_writepages )
231 __field( char, range_cyclic ) 238 __field( char, range_cyclic )
232 ), 239 ),
233 240
@@ -241,16 +248,50 @@ TRACE_EVENT(ext4_da_writepages,
241 __entry->nonblocking = wbc->nonblocking; 248 __entry->nonblocking = wbc->nonblocking;
242 __entry->for_kupdate = wbc->for_kupdate; 249 __entry->for_kupdate = wbc->for_kupdate;
243 __entry->for_reclaim = wbc->for_reclaim; 250 __entry->for_reclaim = wbc->for_reclaim;
244 __entry->for_writepages = wbc->for_writepages;
245 __entry->range_cyclic = wbc->range_cyclic; 251 __entry->range_cyclic = wbc->range_cyclic;
246 ), 252 ),
247 253
248 TP_printk("dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d for_writepages %d range_cyclic %d", 254 TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d",
249 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write, 255 jbd2_dev_to_name(__entry->dev),
256 (unsigned long) __entry->ino, __entry->nr_to_write,
250 __entry->pages_skipped, __entry->range_start, 257 __entry->pages_skipped, __entry->range_start,
251 __entry->range_end, __entry->nonblocking, 258 __entry->range_end, __entry->nonblocking,
252 __entry->for_kupdate, __entry->for_reclaim, 259 __entry->for_kupdate, __entry->for_reclaim,
253 __entry->for_writepages, __entry->range_cyclic) 260 __entry->range_cyclic)
261);
262
263TRACE_EVENT(ext4_da_write_pages,
264 TP_PROTO(struct inode *inode, struct mpage_da_data *mpd),
265
266 TP_ARGS(inode, mpd),
267
268 TP_STRUCT__entry(
269 __field( dev_t, dev )
270 __field( ino_t, ino )
271 __field( __u64, b_blocknr )
272 __field( __u32, b_size )
273 __field( __u32, b_state )
274 __field( unsigned long, first_page )
275 __field( int, io_done )
276 __field( int, pages_written )
277 ),
278
279 TP_fast_assign(
280 __entry->dev = inode->i_sb->s_dev;
281 __entry->ino = inode->i_ino;
282 __entry->b_blocknr = mpd->b_blocknr;
283 __entry->b_size = mpd->b_size;
284 __entry->b_state = mpd->b_state;
285 __entry->first_page = mpd->first_page;
286 __entry->io_done = mpd->io_done;
287 __entry->pages_written = mpd->pages_written;
288 ),
289
290 TP_printk("dev %s ino %lu b_blocknr %llu b_size %u b_state 0x%04x first_page %lu io_done %d pages_written %d",
291 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
292 __entry->b_blocknr, __entry->b_size,
293 __entry->b_state, __entry->first_page,
294 __entry->io_done, __entry->pages_written)
254); 295);
255 296
256TRACE_EVENT(ext4_da_writepages_result, 297TRACE_EVENT(ext4_da_writepages_result,
@@ -282,7 +323,8 @@ TRACE_EVENT(ext4_da_writepages_result,
282 ), 323 ),
283 324
284 TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d", 325 TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d",
285 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->ret, 326 jbd2_dev_to_name(__entry->dev),
327 (unsigned long) __entry->ino, __entry->ret,
286 __entry->pages_written, __entry->pages_skipped, 328 __entry->pages_written, __entry->pages_skipped,
287 __entry->encountered_congestion, __entry->more_io, 329 __entry->encountered_congestion, __entry->more_io,
288 __entry->no_nrwrite_index_update) 330 __entry->no_nrwrite_index_update)
@@ -311,8 +353,8 @@ TRACE_EVENT(ext4_da_write_begin,
311 ), 353 ),
312 354
313 TP_printk("dev %s ino %lu pos %llu len %u flags %u", 355 TP_printk("dev %s ino %lu pos %llu len %u flags %u",
314 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, 356 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
315 __entry->flags) 357 __entry->pos, __entry->len, __entry->flags)
316); 358);
317 359
318TRACE_EVENT(ext4_da_write_end, 360TRACE_EVENT(ext4_da_write_end,
@@ -338,8 +380,8 @@ TRACE_EVENT(ext4_da_write_end,
338 ), 380 ),
339 381
340 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 382 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
341 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, 383 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
342 __entry->copied) 384 __entry->pos, __entry->len, __entry->copied)
343); 385);
344 386
345TRACE_EVENT(ext4_discard_blocks, 387TRACE_EVENT(ext4_discard_blocks,
@@ -389,8 +431,8 @@ TRACE_EVENT(ext4_mb_new_inode_pa,
389 ), 431 ),
390 432
391 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", 433 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu",
392 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, 434 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
393 __entry->pa_len, __entry->pa_lstart) 435 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
394); 436);
395 437
396TRACE_EVENT(ext4_mb_new_group_pa, 438TRACE_EVENT(ext4_mb_new_group_pa,
@@ -417,8 +459,8 @@ TRACE_EVENT(ext4_mb_new_group_pa,
417 ), 459 ),
418 460
419 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", 461 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu",
420 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, 462 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
421 __entry->pa_len, __entry->pa_lstart) 463 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
422); 464);
423 465
424TRACE_EVENT(ext4_mb_release_inode_pa, 466TRACE_EVENT(ext4_mb_release_inode_pa,
@@ -444,8 +486,8 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
444 ), 486 ),
445 487
446 TP_printk("dev %s ino %lu block %llu count %u", 488 TP_printk("dev %s ino %lu block %llu count %u",
447 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, 489 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
448 __entry->count) 490 __entry->block, __entry->count)
449); 491);
450 492
451TRACE_EVENT(ext4_mb_release_group_pa, 493TRACE_EVENT(ext4_mb_release_group_pa,
@@ -490,7 +532,7 @@ TRACE_EVENT(ext4_discard_preallocations,
490 ), 532 ),
491 533
492 TP_printk("dev %s ino %lu", 534 TP_printk("dev %s ino %lu",
493 jbd2_dev_to_name(__entry->dev), __entry->ino) 535 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino)
494); 536);
495 537
496TRACE_EVENT(ext4_mb_discard_preallocations, 538TRACE_EVENT(ext4_mb_discard_preallocations,
@@ -545,8 +587,8 @@ TRACE_EVENT(ext4_request_blocks,
545 ), 587 ),
546 588
547 TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", 589 TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ",
548 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, 590 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
549 __entry->len, 591 __entry->flags, __entry->len,
550 (unsigned long long) __entry->logical, 592 (unsigned long long) __entry->logical,
551 (unsigned long long) __entry->goal, 593 (unsigned long long) __entry->goal,
552 (unsigned long long) __entry->lleft, 594 (unsigned long long) __entry->lleft,
@@ -589,8 +631,8 @@ TRACE_EVENT(ext4_allocate_blocks,
589 ), 631 ),
590 632
591 TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", 633 TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ",
592 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, 634 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
593 __entry->len, __entry->block, 635 __entry->flags, __entry->len, __entry->block,
594 (unsigned long long) __entry->logical, 636 (unsigned long long) __entry->logical,
595 (unsigned long long) __entry->goal, 637 (unsigned long long) __entry->goal,
596 (unsigned long long) __entry->lleft, 638 (unsigned long long) __entry->lleft,
@@ -623,8 +665,8 @@ TRACE_EVENT(ext4_free_blocks,
623 ), 665 ),
624 666
625 TP_printk("dev %s ino %lu block %llu count %lu metadata %d", 667 TP_printk("dev %s ino %lu block %llu count %lu metadata %d",
626 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, 668 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
627 __entry->count, __entry->metadata) 669 __entry->block, __entry->count, __entry->metadata)
628); 670);
629 671
630TRACE_EVENT(ext4_sync_file, 672TRACE_EVENT(ext4_sync_file,
@@ -647,8 +689,8 @@ TRACE_EVENT(ext4_sync_file,
647 ), 689 ),
648 690
649 TP_printk("dev %s ino %ld parent %ld datasync %d ", 691 TP_printk("dev %s ino %ld parent %ld datasync %d ",
650 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->parent, 692 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
651 __entry->datasync) 693 (unsigned long) __entry->parent, __entry->datasync)
652); 694);
653 695
654TRACE_EVENT(ext4_sync_fs, 696TRACE_EVENT(ext4_sync_fs,
@@ -671,6 +713,30 @@ TRACE_EVENT(ext4_sync_fs,
671 __entry->wait) 713 __entry->wait)
672); 714);
673 715
716TRACE_EVENT(ext4_alloc_da_blocks,
717 TP_PROTO(struct inode *inode),
718
719 TP_ARGS(inode),
720
721 TP_STRUCT__entry(
722 __field( dev_t, dev )
723 __field( ino_t, ino )
724 __field( unsigned int, data_blocks )
725 __field( unsigned int, meta_blocks )
726 ),
727
728 TP_fast_assign(
729 __entry->dev = inode->i_sb->s_dev;
730 __entry->ino = inode->i_ino;
731 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
732 __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
733 ),
734
735 TP_printk("dev %s ino %lu data_blocks %u meta_blocks %u",
736 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
737 __entry->data_blocks, __entry->meta_blocks)
738);
739
674#endif /* _TRACE_EXT4_H */ 740#endif /* _TRACE_EXT4_H */
675 741
676/* This part must be outside protection */ 742/* This part must be outside protection */