Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp350677yba; Wed, 24 Apr 2019 02:16:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhbOFdCXVCY+uIIjFKVwbo4XS7XU1z3jdjucAcNHaB4FEmV6+FMldXCBW8KtEgb+zE1SG6 X-Received: by 2002:a63:e20b:: with SMTP id q11mr30452246pgh.263.1556097396777; Wed, 24 Apr 2019 02:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556097396; cv=none; d=google.com; s=arc-20160816; b=BvDRJjcV89tta44JU5wHx1m3F+4IK1GJ/hSH1QWp6fysZ2evPqU9Ikk7DfmFqX7LMJ UIZZZ/hMjS3XPEw0w7aTsWrK6rI2knYZGJNtx4+SZbpvxpO+vgAbuQbyS8HEzp6SjiCo d4F2oz1HMn6JXfThhENoyt4WjWWzV/sOFGhcEgGtDJw+kIyOFMU14jz4hrOElX7kprTv 7qLqHnMuxq0fdrOuNRHB27hiDhAqEd1DXCh1yfhv7oetsP+Sg+BMC056amwI/r3f1CiD gnwUn/kAI71VuvB9GEH6RcoAslcrewzKFgLxj6mPFyNXduBdfW6fq7OLY6L+uIjIFDyn Hhaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=75G+rmAO7zS27zEg6XX7qNFgSSPU+Vf5Ihi/h1HdKfc=; b=neLuacQtSjUtruc+/DC27GV5ZqNHkCr4h/hcYSvnVVnzmTCGF8e7PTD7R0zOavHmF+ RNG5Ftu7Iz6DT6vaa7VbknBs5ygRgoFVzpiyb8UXxd3y5pqnyBNG7JyI3zscAAkX8ASG eOXeJXdvO6vr39T+J8jEGimD3J+TulDq3iRmYvO2h9NNDsYuOl6idDD149s2FFEWP6zA msgJO6GE+6/VWYy0NLYY6gKN01OnmWKWMEVq5XmKCUvW82TTQRSwLOM8XmijVi4OU9Zj nwJIx2H6KgGXszVUcW4fAkyNo928+k6+GirBqtdav9ssLY9tciOeo3TRE2Ush2w54lUG AQrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2UIJESRb; 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 f12si19043905pfh.257.2019.04.24.02.16.21; Wed, 24 Apr 2019 02:16:36 -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=2UIJESRb; 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 S1727408AbfDXJO7 (ORCPT + 99 others); Wed, 24 Apr 2019 05:14:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:35938 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726921AbfDXJO7 (ORCPT ); Wed, 24 Apr 2019 05:14:59 -0400 Received: from localhost (unknown [104.132.45.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 561FD20656; Wed, 24 Apr 2019 09:14:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556097298; bh=Yr/IDKMMqkGJbj7j5S0Z4HCvIM4RuYst75fudGbpuZo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2UIJESRbkiSEH9tP3TuukI2IzKuHl49JHzDQBxbWsk0GRBoqmXs74y9lrNwP3MiI5 6McJX8fkne2wT5cEKHpFt6JvB+PbDJVastLlGvvTt8H5JjioNmWTHmcYWJRZPOyNQv d2Cda/HaQvenGOvxDYzvJBQnfyaaeA1p2vvnJiZg= Date: Wed, 24 Apr 2019 10:14:56 +0100 From: Jaegeuk Kim To: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, chao@kernel.org Subject: Re: [PATCH v2 4/5] f2fs: add tracepoint for f2fs_filemap_fault() Message-ID: <20190424091456.GB38756@jaegeuk-macbookpro.roam.corp.google.com> References: <20190415072219.1613-1-yuchao0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190415072219.1613-1-yuchao0@huawei.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? --- 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, -- 2.19.0.605.g01d371f741-goog