From mboxrd@z Thu Jan 1 00:00:00 1970 From: chao@kernel.org (Chao Yu) Date: Tue, 3 Jul 2018 21:52:13 +0800 Subject: [PATCH 11/11] erofs: support tracepoint In-Reply-To: References: <20180622020131.65525-1-yuchao0@huawei.com> <20180622020131.65525-11-yuchao0@huawei.com> Message-ID: <080d2c39-83ee-9643-4ec6-0991ae31769c@kernel.org> Hi Xiang, On 2018/7/3 17:44, Gao Xiang wrote: > Hi Chao, > > On 2018/6/22 10:01, Chao Yu wrote: >> Add tracepoints for ->readpage{,s}, ->lookup. >> >> Signed-off-by: Chao Yu --- > > Very useful feature (I could use it for the new unzip implementation :) ) It seems we need more tracepoints for debug or accounting, but now I just add basic ones, let's add more. ;) > >> fs/erofs/data.c | 8 +++ >> fs/erofs/namei.c | 5 ++ >> fs/erofs/super.c | 2 + >> fs/erofs/unzip.c | 10 +++- >> include/trace/events/erofs.h | 109 +++++++++++++++++++++++++++++++++++ >> 5 files changed, 133 insertions(+), 1 deletion(-) >> create mode 100644 include/trace/events/erofs.h >> >> + trace_erofs_readpage(page, true); >> + >> bio = erofs_read_raw_page(NULL, page->mapping, >> page, &last_block, 1, false); >> >> @@ -354,6 +359,9 @@ static int erofs_raw_access_readpages(struct file *filp, >> erofs_off_t last_block; >> struct bio *bio = NULL; >> gfp_t gfp = readahead_gfp_mask(mapping); >> + struct page *page = list_last_entry(pages, struct page, lru); >> + >> + trace_erofs_readpages(mapping->host, page, nr_pages, true); >> >> for (; nr_pages; --nr_pages) { >> struct page *page = list_entry(pages->prev, struct page, lru); > > minor, how about remove the in-loop 'page' defination? Okay, let me remove this. Thanks, > > Reviewed-by: Gao Xiang > > Thanks, > Gao Xiang > >> diff --git a/fs/erofs/namei.c b/fs/erofs/namei.c >> index e30294b279d1..b701d9ba52a6 100644 >> --- a/fs/erofs/namei.c >> +++ b/fs/erofs/namei.c