Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1171342yba; Tue, 2 Apr 2019 03:55:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqybJaWoRqXBzAiwJU73oVPa0WMkTIw55j+ZnsQDMfpILoow3WzS7u2T9KPUck9QSYBPnvMm X-Received: by 2002:a17:902:b28b:: with SMTP id u11mr19406399plr.257.1554202515831; Tue, 02 Apr 2019 03:55:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554202515; cv=none; d=google.com; s=arc-20160816; b=xX1N3hWNzsZxKHq85t4zCSrBcFEek1gMxUv1/uEu0C4LldHCBKlMLjKctXgLPi6eqP BHqbR7ugABB38oKBvUkBvBgZ1zzHbRK2OzSZm++VlJxqI8ecegsj/IL+0qNTx1txjCbW jovBuGPXtQFl6qAkFE7v5hvmD0qEOJmF5kDGj081pZFcqsRgsvhADuwgUI6JyHKm7WHA c6e+6eApHAwyaZGGgLB/i4hNuJtbJuHkS4IH9H4jVOfgo57136xS3sYjOcfDoZOf76Z+ iIOY1Q9jNTcWeaAVf2dGiu7aI84t/N/m3fj1ReZ4eEtQPvpfVQBHezECn3j2tRjIZt4n hI3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=Xe+hd1fOJWHicWSUp3mattZah2YNusDrtqW5d1DP+cI=; b=OU/yfRLFcJocI38nQP64fhar+mc+BjzIACeZNd0hgTXKdo5Uqlfe0M0jeuDugSAiu/ WudM/qoXOu8h5sIshkPjUIXGxZ39fwzZRE7Ed8FqGDOFANVeyxRLr6wVhAePIsFRLzi7 yevenMgcwPlMiico/eexumkDT8VZ196+U96i0Hi4TuamMc/rel+dfABEvYtYmFHETsdL q+JPo9TS+izuqHOf7NaDjA0yLN9k1zErAHZw/eRuFyhtQYVXRxXT+8PDOjGnnHKolPVa YkyBHMnh3W5ncXb3EXT+sanU9HCP3yWDakzvgaLWEKqdt9FGh6IfC/yWmTdL3gaLoUpV 81TA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12si11112594plp.47.2019.04.02.03.55.00; Tue, 02 Apr 2019 03:55:15 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730003AbfDBKxE (ORCPT + 99 others); Tue, 2 Apr 2019 06:53:04 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:2520 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725889AbfDBKwy (ORCPT ); Tue, 2 Apr 2019 06:52:54 -0400 Received: from DGGEMM406-HUB.china.huawei.com (unknown [10.3.20.214]) by Forcepoint Email with ESMTP id C4777617FE086F070D06; Tue, 2 Apr 2019 18:52:51 +0800 (CST) Received: from dggeme763-chm.china.huawei.com (10.3.19.109) by DGGEMM406-HUB.china.huawei.com (10.3.20.214) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 2 Apr 2019 18:52:51 +0800 Received: from szvp000201624.huawei.com (10.120.216.130) by dggeme763-chm.china.huawei.com (10.3.19.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Tue, 2 Apr 2019 18:52:50 +0800 From: Chao Yu To: CC: , , , Chao Yu Subject: [PATCH 4/5] f2fs: add tracepoint for f2fs_filemap_fault() Date: Tue, 2 Apr 2019 18:52:21 +0800 Message-ID: <20190402105222.28374-4-yuchao0@huawei.com> X-Mailer: git-send-email 2.18.0.rc1 In-Reply-To: <20190402105222.28374-1-yuchao0@huawei.com> References: <20190402105222.28374-1-yuchao0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.120.216.130] X-ClientProxiedBy: dggeme710-chm.china.huawei.com (10.1.199.106) To dggeme763-chm.china.huawei.com (10.3.19.109) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds tracepoint for f2fs_filemap_fault(). Signed-off-by: Chao Yu --- 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); + return ret; } diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index a3916b4dd57e..1b39b50511f5 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -1253,6 +1253,32 @@ DEFINE_EVENT(f2fs__page, f2fs_commit_inmem_page, TP_ARGS(page, type) ); +TRACE_EVENT(f2fs_filemap_fault, + + TP_PROTO(struct inode *inode, pgoff_t index, int ret), + + TP_ARGS(inode, index, ret), + + TP_STRUCT__entry( + __field(dev_t, dev) + __field(ino_t, ino) + __field(pgoff_t, index) + __field(int, ret) + ), + + TP_fast_assign( + __entry->dev = inode->i_sb->s_dev; + __entry->ino = inode->i_ino; + __entry->index = index; + __entry->ret = ret; + ), + + TP_printk("dev = (%d,%d), ino = %lu, index = %lu, ret = %d", + show_dev_ino(__entry), + (unsigned long)__entry->index, + ret) +); + TRACE_EVENT(f2fs_writepages, TP_PROTO(struct inode *inode, struct writeback_control *wbc, int type), -- 2.18.0.rc1