aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/ext4.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2009-12-07 01:28:35 -0500
committerFrederic Weisbecker <fweisbec@gmail.com>2009-12-07 01:29:22 -0500
commit6548698f929814375fa5d62ae1db96959b0418c1 (patch)
tree340924ae82cb0946aa15045b2b72186de52a8146 /include/trace/events/ext4.h
parent1d2c6cfd40b2dece3bb958cbbc405a2c1536ab75 (diff)
parent22763c5cf3690a681551162c15d34d935308c8d7 (diff)
Merge commit 'v2.6.32' into reiserfs/kill-bkl
Merge-reason: The tree was based 2.6.31. It's better to be up to date with 2.6.32. Although no conflicting changes were made in between, it gives benchmarking results closer to the lastest kernel behaviour.
Diffstat (limited to 'include/trace/events/ext4.h')
-rw-r--r--include/trace/events/ext4.h320
1 files changed, 278 insertions, 42 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 7d8b5bc74185..d09550bf3f95 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -5,10 +5,16 @@
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;
14struct mpage_da_data;
15
16#define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
17
12TRACE_EVENT(ext4_free_inode, 18TRACE_EVENT(ext4_free_inode,
13 TP_PROTO(struct inode *inode), 19 TP_PROTO(struct inode *inode),
14 20
@@ -33,8 +39,8 @@ TRACE_EVENT(ext4_free_inode,
33 ), 39 ),
34 40
35 TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", 41 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, 42 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
37 __entry->uid, __entry->gid, 43 __entry->mode, __entry->uid, __entry->gid,
38 (unsigned long long) __entry->blocks) 44 (unsigned long long) __entry->blocks)
39); 45);
40 46
@@ -56,7 +62,8 @@ TRACE_EVENT(ext4_request_inode,
56 ), 62 ),
57 63
58 TP_printk("dev %s dir %lu mode %d", 64 TP_printk("dev %s dir %lu mode %d",
59 jbd2_dev_to_name(__entry->dev), __entry->dir, __entry->mode) 65 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->dir,
66 __entry->mode)
60); 67);
61 68
62TRACE_EVENT(ext4_allocate_inode, 69TRACE_EVENT(ext4_allocate_inode,
@@ -79,7 +86,8 @@ TRACE_EVENT(ext4_allocate_inode,
79 ), 86 ),
80 87
81 TP_printk("dev %s ino %lu dir %lu mode %d", 88 TP_printk("dev %s ino %lu dir %lu mode %d",
82 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->dir, __entry->mode) 89 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
90 (unsigned long) __entry->dir, __entry->mode)
83); 91);
84 92
85TRACE_EVENT(ext4_write_begin, 93TRACE_EVENT(ext4_write_begin,
@@ -106,8 +114,8 @@ TRACE_EVENT(ext4_write_begin,
106 ), 114 ),
107 115
108 TP_printk("dev %s ino %lu pos %llu len %u flags %u", 116 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, 117 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
110 __entry->flags) 118 __entry->pos, __entry->len, __entry->flags)
111); 119);
112 120
113TRACE_EVENT(ext4_ordered_write_end, 121TRACE_EVENT(ext4_ordered_write_end,
@@ -133,8 +141,8 @@ TRACE_EVENT(ext4_ordered_write_end,
133 ), 141 ),
134 142
135 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 143 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, 144 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
137 __entry->copied) 145 __entry->pos, __entry->len, __entry->copied)
138); 146);
139 147
140TRACE_EVENT(ext4_writeback_write_end, 148TRACE_EVENT(ext4_writeback_write_end,
@@ -160,8 +168,8 @@ TRACE_EVENT(ext4_writeback_write_end,
160 ), 168 ),
161 169
162 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 170 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, 171 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
164 __entry->copied) 172 __entry->pos, __entry->len, __entry->copied)
165); 173);
166 174
167TRACE_EVENT(ext4_journalled_write_end, 175TRACE_EVENT(ext4_journalled_write_end,
@@ -186,8 +194,8 @@ TRACE_EVENT(ext4_journalled_write_end,
186 ), 194 ),
187 195
188 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 196 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, 197 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
190 __entry->copied) 198 __entry->pos, __entry->len, __entry->copied)
191); 199);
192 200
193TRACE_EVENT(ext4_writepage, 201TRACE_EVENT(ext4_writepage,
@@ -209,7 +217,8 @@ TRACE_EVENT(ext4_writepage,
209 ), 217 ),
210 218
211 TP_printk("dev %s ino %lu page_index %lu", 219 TP_printk("dev %s ino %lu page_index %lu",
212 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) 220 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
221 __entry->index)
213); 222);
214 223
215TRACE_EVENT(ext4_da_writepages, 224TRACE_EVENT(ext4_da_writepages,
@@ -227,8 +236,8 @@ TRACE_EVENT(ext4_da_writepages,
227 __field( char, nonblocking ) 236 __field( char, nonblocking )
228 __field( char, for_kupdate ) 237 __field( char, for_kupdate )
229 __field( char, for_reclaim ) 238 __field( char, for_reclaim )
230 __field( char, for_writepages )
231 __field( char, range_cyclic ) 239 __field( char, range_cyclic )
240 __field( pgoff_t, writeback_index )
232 ), 241 ),
233 242
234 TP_fast_assign( 243 TP_fast_assign(
@@ -241,16 +250,52 @@ TRACE_EVENT(ext4_da_writepages,
241 __entry->nonblocking = wbc->nonblocking; 250 __entry->nonblocking = wbc->nonblocking;
242 __entry->for_kupdate = wbc->for_kupdate; 251 __entry->for_kupdate = wbc->for_kupdate;
243 __entry->for_reclaim = wbc->for_reclaim; 252 __entry->for_reclaim = wbc->for_reclaim;
244 __entry->for_writepages = wbc->for_writepages;
245 __entry->range_cyclic = wbc->range_cyclic; 253 __entry->range_cyclic = wbc->range_cyclic;
254 __entry->writeback_index = inode->i_mapping->writeback_index;
246 ), 255 ),
247 256
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", 257 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 writeback_index %lu",
249 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write, 258 jbd2_dev_to_name(__entry->dev),
259 (unsigned long) __entry->ino, __entry->nr_to_write,
250 __entry->pages_skipped, __entry->range_start, 260 __entry->pages_skipped, __entry->range_start,
251 __entry->range_end, __entry->nonblocking, 261 __entry->range_end, __entry->nonblocking,
252 __entry->for_kupdate, __entry->for_reclaim, 262 __entry->for_kupdate, __entry->for_reclaim,
253 __entry->for_writepages, __entry->range_cyclic) 263 __entry->range_cyclic,
264 (unsigned long) __entry->writeback_index)
265);
266
267TRACE_EVENT(ext4_da_write_pages,
268 TP_PROTO(struct inode *inode, struct mpage_da_data *mpd),
269
270 TP_ARGS(inode, mpd),
271
272 TP_STRUCT__entry(
273 __field( dev_t, dev )
274 __field( ino_t, ino )
275 __field( __u64, b_blocknr )
276 __field( __u32, b_size )
277 __field( __u32, b_state )
278 __field( unsigned long, first_page )
279 __field( int, io_done )
280 __field( int, pages_written )
281 ),
282
283 TP_fast_assign(
284 __entry->dev = inode->i_sb->s_dev;
285 __entry->ino = inode->i_ino;
286 __entry->b_blocknr = mpd->b_blocknr;
287 __entry->b_size = mpd->b_size;
288 __entry->b_state = mpd->b_state;
289 __entry->first_page = mpd->first_page;
290 __entry->io_done = mpd->io_done;
291 __entry->pages_written = mpd->pages_written;
292 ),
293
294 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",
295 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
296 __entry->b_blocknr, __entry->b_size,
297 __entry->b_state, __entry->first_page,
298 __entry->io_done, __entry->pages_written)
254); 299);
255 300
256TRACE_EVENT(ext4_da_writepages_result, 301TRACE_EVENT(ext4_da_writepages_result,
@@ -268,6 +313,7 @@ TRACE_EVENT(ext4_da_writepages_result,
268 __field( char, encountered_congestion ) 313 __field( char, encountered_congestion )
269 __field( char, more_io ) 314 __field( char, more_io )
270 __field( char, no_nrwrite_index_update ) 315 __field( char, no_nrwrite_index_update )
316 __field( pgoff_t, writeback_index )
271 ), 317 ),
272 318
273 TP_fast_assign( 319 TP_fast_assign(
@@ -279,13 +325,16 @@ TRACE_EVENT(ext4_da_writepages_result,
279 __entry->encountered_congestion = wbc->encountered_congestion; 325 __entry->encountered_congestion = wbc->encountered_congestion;
280 __entry->more_io = wbc->more_io; 326 __entry->more_io = wbc->more_io;
281 __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; 327 __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update;
328 __entry->writeback_index = inode->i_mapping->writeback_index;
282 ), 329 ),
283 330
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", 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",
285 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->ret, 332 jbd2_dev_to_name(__entry->dev),
333 (unsigned long) __entry->ino, __entry->ret,
286 __entry->pages_written, __entry->pages_skipped, 334 __entry->pages_written, __entry->pages_skipped,
287 __entry->encountered_congestion, __entry->more_io, 335 __entry->encountered_congestion, __entry->more_io,
288 __entry->no_nrwrite_index_update) 336 __entry->no_nrwrite_index_update,
337 (unsigned long) __entry->writeback_index)
289); 338);
290 339
291TRACE_EVENT(ext4_da_write_begin, 340TRACE_EVENT(ext4_da_write_begin,
@@ -311,8 +360,8 @@ TRACE_EVENT(ext4_da_write_begin,
311 ), 360 ),
312 361
313 TP_printk("dev %s ino %lu pos %llu len %u flags %u", 362 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, 363 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
315 __entry->flags) 364 __entry->pos, __entry->len, __entry->flags)
316); 365);
317 366
318TRACE_EVENT(ext4_da_write_end, 367TRACE_EVENT(ext4_da_write_end,
@@ -338,8 +387,8 @@ TRACE_EVENT(ext4_da_write_end,
338 ), 387 ),
339 388
340 TP_printk("dev %s ino %lu pos %llu len %u copied %u", 389 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, 390 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
342 __entry->copied) 391 __entry->pos, __entry->len, __entry->copied)
343); 392);
344 393
345TRACE_EVENT(ext4_discard_blocks, 394TRACE_EVENT(ext4_discard_blocks,
@@ -389,8 +438,8 @@ TRACE_EVENT(ext4_mb_new_inode_pa,
389 ), 438 ),
390 439
391 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", 440 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu",
392 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, 441 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
393 __entry->pa_len, __entry->pa_lstart) 442 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
394); 443);
395 444
396TRACE_EVENT(ext4_mb_new_group_pa, 445TRACE_EVENT(ext4_mb_new_group_pa,
@@ -417,8 +466,8 @@ TRACE_EVENT(ext4_mb_new_group_pa,
417 ), 466 ),
418 467
419 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", 468 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu",
420 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, 469 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
421 __entry->pa_len, __entry->pa_lstart) 470 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
422); 471);
423 472
424TRACE_EVENT(ext4_mb_release_inode_pa, 473TRACE_EVENT(ext4_mb_release_inode_pa,
@@ -444,8 +493,8 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
444 ), 493 ),
445 494
446 TP_printk("dev %s ino %lu block %llu count %u", 495 TP_printk("dev %s ino %lu block %llu count %u",
447 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, 496 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
448 __entry->count) 497 __entry->block, __entry->count)
449); 498);
450 499
451TRACE_EVENT(ext4_mb_release_group_pa, 500TRACE_EVENT(ext4_mb_release_group_pa,
@@ -490,7 +539,7 @@ TRACE_EVENT(ext4_discard_preallocations,
490 ), 539 ),
491 540
492 TP_printk("dev %s ino %lu", 541 TP_printk("dev %s ino %lu",
493 jbd2_dev_to_name(__entry->dev), __entry->ino) 542 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino)
494); 543);
495 544
496TRACE_EVENT(ext4_mb_discard_preallocations, 545TRACE_EVENT(ext4_mb_discard_preallocations,
@@ -545,8 +594,8 @@ TRACE_EVENT(ext4_request_blocks,
545 ), 594 ),
546 595
547 TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", 596 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, 597 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
549 __entry->len, 598 __entry->flags, __entry->len,
550 (unsigned long long) __entry->logical, 599 (unsigned long long) __entry->logical,
551 (unsigned long long) __entry->goal, 600 (unsigned long long) __entry->goal,
552 (unsigned long long) __entry->lleft, 601 (unsigned long long) __entry->lleft,
@@ -589,8 +638,8 @@ TRACE_EVENT(ext4_allocate_blocks,
589 ), 638 ),
590 639
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 ", 640 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, 641 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
593 __entry->len, __entry->block, 642 __entry->flags, __entry->len, __entry->block,
594 (unsigned long long) __entry->logical, 643 (unsigned long long) __entry->logical,
595 (unsigned long long) __entry->goal, 644 (unsigned long long) __entry->goal,
596 (unsigned long long) __entry->lleft, 645 (unsigned long long) __entry->lleft,
@@ -623,8 +672,8 @@ TRACE_EVENT(ext4_free_blocks,
623 ), 672 ),
624 673
625 TP_printk("dev %s ino %lu block %llu count %lu metadata %d", 674 TP_printk("dev %s ino %lu block %llu count %lu metadata %d",
626 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, 675 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
627 __entry->count, __entry->metadata) 676 __entry->block, __entry->count, __entry->metadata)
628); 677);
629 678
630TRACE_EVENT(ext4_sync_file, 679TRACE_EVENT(ext4_sync_file,
@@ -647,8 +696,8 @@ TRACE_EVENT(ext4_sync_file,
647 ), 696 ),
648 697
649 TP_printk("dev %s ino %ld parent %ld datasync %d ", 698 TP_printk("dev %s ino %ld parent %ld datasync %d ",
650 jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->parent, 699 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
651 __entry->datasync) 700 (unsigned long) __entry->parent, __entry->datasync)
652); 701);
653 702
654TRACE_EVENT(ext4_sync_fs, 703TRACE_EVENT(ext4_sync_fs,
@@ -671,6 +720,193 @@ TRACE_EVENT(ext4_sync_fs,
671 __entry->wait) 720 __entry->wait)
672); 721);
673 722
723TRACE_EVENT(ext4_alloc_da_blocks,
724 TP_PROTO(struct inode *inode),
725
726 TP_ARGS(inode),
727
728 TP_STRUCT__entry(
729 __field( dev_t, dev )
730 __field( ino_t, ino )
731 __field( unsigned int, data_blocks )
732 __field( unsigned int, meta_blocks )
733 ),
734
735 TP_fast_assign(
736 __entry->dev = inode->i_sb->s_dev;
737 __entry->ino = inode->i_ino;
738 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
739 __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
740 ),
741
742 TP_printk("dev %s ino %lu data_blocks %u meta_blocks %u",
743 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
744 __entry->data_blocks, __entry->meta_blocks)
745);
746
747TRACE_EVENT(ext4_mballoc_alloc,
748 TP_PROTO(struct ext4_allocation_context *ac),
749
750 TP_ARGS(ac),
751
752 TP_STRUCT__entry(
753 __field( dev_t, dev )
754 __field( ino_t, ino )
755 __field( __u16, found )
756 __field( __u16, groups )
757 __field( __u16, buddy )
758 __field( __u16, flags )
759 __field( __u16, tail )
760 __field( __u8, cr )
761 __field( __u32, orig_logical )
762 __field( int, orig_start )
763 __field( __u32, orig_group )
764 __field( int, orig_len )
765 __field( __u32, goal_logical )
766 __field( int, goal_start )
767 __field( __u32, goal_group )
768 __field( int, goal_len )
769 __field( __u32, result_logical )
770 __field( int, result_start )
771 __field( __u32, result_group )
772 __field( int, result_len )
773 ),
774
775 TP_fast_assign(
776 __entry->dev = ac->ac_inode->i_sb->s_dev;
777 __entry->ino = ac->ac_inode->i_ino;
778 __entry->found = ac->ac_found;
779 __entry->flags = ac->ac_flags;
780 __entry->groups = ac->ac_groups_scanned;
781 __entry->buddy = ac->ac_buddy;
782 __entry->tail = ac->ac_tail;
783 __entry->cr = ac->ac_criteria;
784 __entry->orig_logical = ac->ac_o_ex.fe_logical;
785 __entry->orig_start = ac->ac_o_ex.fe_start;
786 __entry->orig_group = ac->ac_o_ex.fe_group;
787 __entry->orig_len = ac->ac_o_ex.fe_len;
788 __entry->goal_logical = ac->ac_g_ex.fe_logical;
789 __entry->goal_start = ac->ac_g_ex.fe_start;
790 __entry->goal_group = ac->ac_g_ex.fe_group;
791 __entry->goal_len = ac->ac_g_ex.fe_len;
792 __entry->result_logical = ac->ac_f_ex.fe_logical;
793 __entry->result_start = ac->ac_f_ex.fe_start;
794 __entry->result_group = ac->ac_f_ex.fe_group;
795 __entry->result_len = ac->ac_f_ex.fe_len;
796 ),
797
798 TP_printk("dev %s inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
799 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x "
800 "tail %u broken %u",
801 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
802 __entry->orig_group, __entry->orig_start,
803 __entry->orig_len, __entry->orig_logical,
804 __entry->goal_group, __entry->goal_start,
805 __entry->goal_len, __entry->goal_logical,
806 __entry->result_group, __entry->result_start,
807 __entry->result_len, __entry->result_logical,
808 __entry->found, __entry->groups, __entry->cr,
809 __entry->flags, __entry->tail,
810 __entry->buddy ? 1 << __entry->buddy : 0)
811);
812
813TRACE_EVENT(ext4_mballoc_prealloc,
814 TP_PROTO(struct ext4_allocation_context *ac),
815
816 TP_ARGS(ac),
817
818 TP_STRUCT__entry(
819 __field( dev_t, dev )
820 __field( ino_t, ino )
821 __field( __u32, orig_logical )
822 __field( int, orig_start )
823 __field( __u32, orig_group )
824 __field( int, orig_len )
825 __field( __u32, result_logical )
826 __field( int, result_start )
827 __field( __u32, result_group )
828 __field( int, result_len )
829 ),
830
831 TP_fast_assign(
832 __entry->dev = ac->ac_inode->i_sb->s_dev;
833 __entry->ino = ac->ac_inode->i_ino;
834 __entry->orig_logical = ac->ac_o_ex.fe_logical;
835 __entry->orig_start = ac->ac_o_ex.fe_start;
836 __entry->orig_group = ac->ac_o_ex.fe_group;
837 __entry->orig_len = ac->ac_o_ex.fe_len;
838 __entry->result_logical = ac->ac_b_ex.fe_logical;
839 __entry->result_start = ac->ac_b_ex.fe_start;
840 __entry->result_group = ac->ac_b_ex.fe_group;
841 __entry->result_len = ac->ac_b_ex.fe_len;
842 ),
843
844 TP_printk("dev %s inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
845 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
846 __entry->orig_group, __entry->orig_start,
847 __entry->orig_len, __entry->orig_logical,
848 __entry->result_group, __entry->result_start,
849 __entry->result_len, __entry->result_logical)
850);
851
852TRACE_EVENT(ext4_mballoc_discard,
853 TP_PROTO(struct ext4_allocation_context *ac),
854
855 TP_ARGS(ac),
856
857 TP_STRUCT__entry(
858 __field( dev_t, dev )
859 __field( ino_t, ino )
860 __field( __u32, result_logical )
861 __field( int, result_start )
862 __field( __u32, result_group )
863 __field( int, result_len )
864 ),
865
866 TP_fast_assign(
867 __entry->dev = ac->ac_inode->i_sb->s_dev;
868 __entry->ino = ac->ac_inode->i_ino;
869 __entry->result_logical = ac->ac_b_ex.fe_logical;
870 __entry->result_start = ac->ac_b_ex.fe_start;
871 __entry->result_group = ac->ac_b_ex.fe_group;
872 __entry->result_len = ac->ac_b_ex.fe_len;
873 ),
874
875 TP_printk("dev %s inode %lu extent %u/%d/%u@%u ",
876 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
877 __entry->result_group, __entry->result_start,
878 __entry->result_len, __entry->result_logical)
879);
880
881TRACE_EVENT(ext4_mballoc_free,
882 TP_PROTO(struct ext4_allocation_context *ac),
883
884 TP_ARGS(ac),
885
886 TP_STRUCT__entry(
887 __field( dev_t, dev )
888 __field( ino_t, ino )
889 __field( __u32, result_logical )
890 __field( int, result_start )
891 __field( __u32, result_group )
892 __field( int, result_len )
893 ),
894
895 TP_fast_assign(
896 __entry->dev = ac->ac_inode->i_sb->s_dev;
897 __entry->ino = ac->ac_inode->i_ino;
898 __entry->result_logical = ac->ac_b_ex.fe_logical;
899 __entry->result_start = ac->ac_b_ex.fe_start;
900 __entry->result_group = ac->ac_b_ex.fe_group;
901 __entry->result_len = ac->ac_b_ex.fe_len;
902 ),
903
904 TP_printk("dev %s inode %lu extent %u/%d/%u@%u ",
905 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino,
906 __entry->result_group, __entry->result_start,
907 __entry->result_len, __entry->result_logical)
908);
909
674#endif /* _TRACE_EXT4_H */ 910#endif /* _TRACE_EXT4_H */
675 911
676/* This part must be outside protection */ 912/* This part must be outside protection */