Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp540927yba; Wed, 24 Apr 2019 05:47:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhumEB+OyF/3AqMx1x2YL3M7yW5OZAvgaSFoVXrczLex6vtM9T+WsDeSMBTDBdEV6j5uo2 X-Received: by 2002:a63:e64:: with SMTP id 36mr22819911pgo.127.1556110021909; Wed, 24 Apr 2019 05:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556110021; cv=none; d=google.com; s=arc-20160816; b=PpQBE55/UA275YJJ1UW2GUDkhcdApcinF22qCfrkk28CD04z72pT7u7UtJ5h62TCNc vVv9JFVpPETLPiLoa7R18m1po34rnj2uwehGkXNgIRdEJb/RIMNBGTJBiyXPgviIddlO a41ayQicXzN5w4PFVHxWgGxGRdqbK0iFoCUekHW/Zdz4kmXbkz1F/Jpm0bkwHmY75Bhf vqlmLKmH0EOlOaiL96H+4CNmbCBYEyqXFFbs4jZYiGlf46Yb3fZsm6VCYAfm4lySgYsx 0Y+zCztH8VhDZWKtREjj7380mqltCM8XhI4dqII5fFtAxXMiRAyElhWGiSQVUmoktYfR 2jTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=wOJo5BC23fTPChkomt//pCLhBzl2AddykU9cUnwFkqs=; b=Yac6YihuaRQEFI5rfOWEaqpscymaSUh5QkCtx+TcYnAimZxLEqVLQgxMtcA9R9Su5G lijyX6AZOQ08ONgOBSI3XHMJjr/T02UTAqPWozsm32bXKO+qKoDQN4dSN1GBJN7IfOel +rawnbg4Vn7onSj0o3W+C5yJ8LyQuYpe0UMrrAMkHFN/JqxeDr4EzmkoV783QzPV1nPf jGTAOquSFA25kUz8gYEpxBIGRTIGDdK7eyieSSQ6bye8xtdrk6vXq990WZKM5B7to+bu GcgsLa0aADyXstU9dJHHfCLyAT4NyyHEF2xifAUl3mPTEceLGhyejC43KrKGqpfBQYTA vI8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gzxPgVfO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1si16015020pgq.214.2019.04.24.05.46.47; Wed, 24 Apr 2019 05:47:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gzxPgVfO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730293AbfDXMpP (ORCPT + 99 others); Wed, 24 Apr 2019 08:45:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:53348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730026AbfDXMpO (ORCPT ); Wed, 24 Apr 2019 08:45:14 -0400 Received: from [192.168.0.101] (unknown [58.212.133.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 42B58218B0; Wed, 24 Apr 2019 12:45:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556109913; bh=SPZSMVr6z8nSB8TYQMEgvpbJgmsaw5UH5zLsRz+0/CM=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=gzxPgVfOabD9Msp4zd8ZPs7nwd/w1LE/3mBb05VnGJuImWY6T/0Bnfoo8al+Ll2eq 4Z1QMvReOu7ccjDSWLoXKsdebdkK8bpAPNReMeNRuxyDy8QJRZWxXyv67U0kji4MMg BjVu7OqQm4+67XB/at6xxFAa6NC0P+AzXnFTz+b8= Subject: Re: [PATCH v2 4/5] f2fs: add tracepoint for f2fs_filemap_fault() To: Jaegeuk Kim , Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <20190415072219.1613-1-yuchao0@huawei.com> <20190424091456.GB38756@jaegeuk-macbookpro.roam.corp.google.com> From: Chao Yu Message-ID: <8919a08e-a548-7bd8-c43e-99596e33ca97@kernel.org> Date: Wed, 24 Apr 2019 20:45:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190424091456.GB38756@jaegeuk-macbookpro.roam.corp.google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-4-24 17:14, Jaegeuk Kim wrote: > On 04/15, Chao Yu wrote: >> This patch adds tracepoint for f2fs_filemap_fault(). >> >> Signed-off-by: Chao Yu >> --- >> v2: >> - fix wrong type of @ret parameter >> fs/f2fs/file.c | 2 ++ >> include/trace/events/f2fs.h | 26 ++++++++++++++++++++++++++ >> 2 files changed, 28 insertions(+) >> >> diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c >> index 30d49467578e..578486e03427 100644 >> --- a/fs/f2fs/file.c >> +++ b/fs/f2fs/file.c >> @@ -39,6 +39,8 @@ static vm_fault_t f2fs_filemap_fault(struct vm_fault *vmf) >> ret = filemap_fault(vmf); >> up_read(&F2FS_I(inode)->i_mmap_sem); >> >> + trace_f2fs_filemap_fault(inode, vmf->pgoff, ret); > > In order to avoid wrong casting warning, how about this? Confirmed, I used wrong type in v2, thanks for fixing this. Thanks, > > --- > include/trace/events/f2fs.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h > index abe763cc1d0b..c29dea7ac0fe 100644 > --- a/include/trace/events/f2fs.h > +++ b/include/trace/events/f2fs.h > @@ -1286,7 +1286,7 @@ DEFINE_EVENT(f2fs__page, f2fs_commit_inmem_page, > > TRACE_EVENT(f2fs_filemap_fault, > > - TP_PROTO(struct inode *inode, pgoff_t index, enum vm_fault_reason ret), > + TP_PROTO(struct inode *inode, pgoff_t index, vm_fault_t ret), > > TP_ARGS(inode, index, ret), > > @@ -1294,7 +1294,7 @@ TRACE_EVENT(f2fs_filemap_fault, > __field(dev_t, dev) > __field(ino_t, ino) > __field(pgoff_t, index) > - __field(enum vm_fault_reason, ret) > + __field(vm_fault_t, ret) > ), > > TP_fast_assign( > @@ -1304,10 +1304,10 @@ TRACE_EVENT(f2fs_filemap_fault, > __entry->ret = ret; > ), > > - TP_printk("dev = (%d,%d), ino = %lu, index = %lu, ret = %u", > + TP_printk("dev = (%d,%d), ino = %lu, index = %lu, ret = %lx", > show_dev_ino(__entry), > (unsigned long)__entry->index, > - ret) > + (unsigned long)__entry->ret) > ); > > TRACE_EVENT(f2fs_writepages, >