diff options
| author | Mohan Srinivasan <srmohan@google.com> | 2016-09-19 17:33:50 -0700 |
|---|---|---|
| committer | Mohamad Ayyash <mkayyash@google.com> | 2016-09-20 21:33:24 +0000 |
| commit | 32cbbe59538d2dd0b77822cc27ce32ca487c467d (patch) | |
| tree | 3b32dc8ad698fbdc6b4238f92b8588ade42273c3 /fs/ext4/inline.c | |
| parent | cf43809d7aa07868ffacd83892745c85f91c8a53 (diff) | |
ANDROID: fs: FS tracepoints to track IO.
Adds tracepoints in ext4/f2fs/mpage to track readpages/buffered
write()s. This allows us to track files that are being read/written
to PIDs.
Change-Id: I26bd36f933108927d6903da04d8cb42fd9c3ef3d
Signed-off-by: Mohan Srinivasan <srmohan@google.com>
Diffstat (limited to 'fs/ext4/inline.c')
| -rw-r--r-- | fs/ext4/inline.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index d884989cc83d..af34979684a4 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -18,6 +18,7 @@ #include "ext4.h" #include "xattr.h" #include "truncate.h" +#include <trace/events/android_fs.h> #define EXT4_XATTR_SYSTEM_DATA "data" #define EXT4_MIN_INLINE_DATA_SIZE ((sizeof(__le32) * EXT4_N_BLOCKS)) @@ -500,6 +501,9 @@ int ext4_readpage_inline(struct inode *inode, struct page *page) return -EAGAIN; } + trace_android_fs_dataread_start(inode, page_offset(page), PAGE_SIZE, + current->pid, current->comm); + /* * Current inline data can only exist in the 1st page, * So for all the other pages, just set them uptodate. @@ -511,6 +515,8 @@ int ext4_readpage_inline(struct inode *inode, struct page *page) SetPageUptodate(page); } + trace_android_fs_dataread_end(inode, page_offset(page), PAGE_SIZE); + up_read(&EXT4_I(inode)->xattr_sem); unlock_page(page); |
