From patchwork Thu Dec 21 22:42:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 10128551 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AB9DD603B5 for ; Thu, 21 Dec 2017 23:46:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CD2D29E75 for ; Thu, 21 Dec 2017 23:46:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91C8729EDB; Thu, 21 Dec 2017 23:46:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3903929E75 for ; Thu, 21 Dec 2017 23:46:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755423AbdLUXqH (ORCPT ); Thu, 21 Dec 2017 18:46:07 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:57229 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755277AbdLUXpm (ORCPT ); Thu, 21 Dec 2017 18:45:42 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vBLNgGfd020318 for ; Thu, 21 Dec 2017 23:45:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2017-10-26; bh=1p/sV8OUfEjm6zlIOK2zyJmvvhu8RoOwcXKMTUjg7bE=; b=qeD7qlkLJ9mCJssEOt1/4i2pXliaA3I2iLgA+BoijapjI+1KPCVO1knnv/rEHBIeA+Tm +vp0cakBOgBGqeu0cRc6janWyAJlubePsDg/VLxx6TLWq8vdnavBe/9ZAr8sV6N7ffII oCBcRLc9WhOzIHNYYMZFWWtaOdeCbmZKFC8TSOwNbZBDNpkqPGht5qcNamhzvJxwQBuC djfGGq774+zYDBK1m/PhzHIPFdOrj7uuU2ZZfle1cQRZTR7loGQkEwi1ntCEZX92uTss Kv2OaQqCY+0vQnNRH5HlP08GnZ5K7VAu/nS/03pe+h4YhMzbLQEreUoTINywkD9+TowS ug== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2f0ptyg0g0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 21 Dec 2017 23:45:41 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vBLNjefk010782 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 21 Dec 2017 23:45:41 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id vBLNjeY5024117 for ; Thu, 21 Dec 2017 23:45:40 GMT Received: from dhcp-10-211-47-181.usdhcp.oraclecorp.com.com (/10.211.47.181) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 21 Dec 2017 15:45:40 -0800 From: Liu Bo To: linux-btrfs@vger.kernel.org Subject: [PATCH 10/10] Btrfs: noinline merge_extent_mapping Date: Thu, 21 Dec 2017 15:42:56 -0700 Message-Id: <20171221224256.18196-11-bo.li.liu@oracle.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20171221224256.18196-1-bo.li.liu@oracle.com> References: <20171221224256.18196-1-bo.li.liu@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8752 signatures=668651 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=5 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=521 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1712210312 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In order to debug subtle bugs around merge_extent_mapping(), perf probe can be used to check the arguments, but sometimes merge_extent_mapping() got inlined by compiler and couldn't be probed. This is adding noinline attribute to merge_extent_mapping(). Signed-off-by: Liu Bo --- fs/btrfs/extent_map.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 40e4d30..f10a6fc 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -480,10 +480,10 @@ static struct extent_map *prev_extent_map(struct extent_map *em) * extent to map_start, and an extent that you want to insert, deal with overlap * and insert the best fitted new extent into the tree. */ -static int merge_extent_mapping(struct extent_map_tree *em_tree, - struct extent_map *existing, - struct extent_map *em, - u64 map_start, u64 map_len) +static noinline int merge_extent_mapping(struct extent_map_tree *em_tree, + struct extent_map *existing, + struct extent_map *em, + u64 map_start, u64 map_len) { struct extent_map *prev; struct extent_map *next;