summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-08-31 23:13:11 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-08-31 23:13:11 -0400
commitb3a3ca8ca0c3c29abc5b2bfe94bb14f3f4590df9 (patch)
tree1006f780d43ec8ff90ed11b1eb0d5ed961c9f613 /include/trace
parentde89de6e0cf4b1eb13f27137cf2aa40d287aabdf (diff)
downloadop-kernel-dev-b3a3ca8ca0c3c29abc5b2bfe94bb14f3f4590df9.zip
op-kernel-dev-b3a3ca8ca0c3c29abc5b2bfe94bb14f3f4590df9.tar.gz
ext4: Add new tracepoint: trace_ext4_da_write_pages()
Add a new tracepoint which shows the pages that will be written using write_cache_pages() by ext4_da_writepages(). Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/ext4.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 15051d2..dd43399 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -251,6 +251,40 @@ TRACE_EVENT(ext4_da_writepages,
__entry->range_cyclic)
);
+TRACE_EVENT(ext4_da_write_pages,
+ TP_PROTO(struct inode *inode, struct mpage_da_data *mpd),
+
+ TP_ARGS(inode, mpd),
+
+ TP_STRUCT__entry(
+ __field( dev_t, dev )
+ __field( ino_t, ino )
+ __field( __u64, b_blocknr )
+ __field( __u32, b_size )
+ __field( __u32, b_state )
+ __field( unsigned long, first_page )
+ __field( int, io_done )
+ __field( int, pages_written )
+ ),
+
+ TP_fast_assign(
+ __entry->dev = inode->i_sb->s_dev;
+ __entry->ino = inode->i_ino;
+ __entry->b_blocknr = mpd->b_blocknr;
+ __entry->b_size = mpd->b_size;
+ __entry->b_state = mpd->b_state;
+ __entry->first_page = mpd->first_page;
+ __entry->io_done = mpd->io_done;
+ __entry->pages_written = mpd->pages_written;
+ ),
+
+ 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",
+ jbd2_dev_to_name(__entry->dev), __entry->ino,
+ __entry->b_blocknr, __entry->b_size,
+ __entry->b_state, __entry->first_page,
+ __entry->io_done, __entry->pages_written)
+);
+
TRACE_EVENT(ext4_da_writepages_result,
TP_PROTO(struct inode *inode, struct writeback_control *wbc,
int ret, int pages_written),
OpenPOWER on IntegriCloud