From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F44EC433F5 for ; Mon, 18 Apr 2022 06:08:45 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Khc234vxKz3bfb for ; Mon, 18 Apr 2022 16:08:43 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=CNP2G9Ks; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=naveen.n.rao@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=CNP2G9Ks; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Khc1C6SyGz2xBv for ; Mon, 18 Apr 2022 16:07:59 +1000 (AEST) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 23I385n4011941; Mon, 18 Apr 2022 06:07:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : subject : to : cc : references : in-reply-to : mime-version : message-id : content-type : content-transfer-encoding; s=pp1; bh=hEYU7TSxmNSCWKfFM6R98nQJuLxOCA3m2I3lKbJSur0=; b=CNP2G9Ks3+J2PGhSb4L/bAZwLf0xeQSVfWGVBXVmh4pnqrpv2x2JIfGlyrMuUWooU8fj moLjXVG6PJIW1fILXtBLK80d6Ikjxk+v/dkF+gYjjq+4Uej2dXupLl9/fB5qxejziFCz GxfFhCbxeHoz3gXxICCDgZ9d7gIzy1atGGM7cwlzePQULOJKqUjsdy3xoOT1iMyip4r7 7iqy3kLRdHF8oPV+ZDJHWT3oiXZBGSE2usieUyj6S6jU9rUAdwVlnEjKR9ziR2ZuHddu aXum/kbAQH9YmpGcQrm0/os37Zty4UoCOE3++Zw2ccsRYy3nIPz12A8dbd9SgWbdXxHr 1A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fg7vmvvnp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Apr 2022 06:07:32 +0000 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 23I67UA9014131; Mon, 18 Apr 2022 06:07:31 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3fg7vmvvn2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Apr 2022 06:07:30 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23I63a5g029558; Mon, 18 Apr 2022 06:07:28 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 3ffn2htb05-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Apr 2022 06:07:28 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23I67Pd540698146 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 18 Apr 2022 06:07:25 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CD15F5204E; Mon, 18 Apr 2022 06:07:25 +0000 (GMT) Received: from localhost (unknown [9.43.2.186]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 5A1675204F; Mon, 18 Apr 2022 06:07:25 +0000 (GMT) Date: Mon, 18 Apr 2022 11:37:24 +0530 From: "Naveen N. Rao" Subject: Re: [PATCH v1 06/22] powerpc/ftrace: Inline ftrace_modify_code() To: Benjamin Herrenschmidt , Christophe Leroy , Ingo Molnar , Michael Ellerman , Paul Mackerras , Steven Rostedt References: <3b651381f4c53988ede62f4a1505e7e8ccab56b4.1648131740.git.christophe.leroy@csgroup.eu> In-Reply-To: <3b651381f4c53988ede62f4a1505e7e8ccab56b4.1648131740.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 User-Agent: astroid/4d6b06ad (https://github.com/astroidmail/astroid) Message-Id: <1650261933.e8kr43zvw0.naveen@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: c_Ai493M3FHtorzRm2KnCHnUJ-TXtrjP X-Proofpoint-GUID: 9G1SCLofCI3lLHSN_ZqL5heQ3oVtygPN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-18_02,2022-04-15_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 mlxscore=0 phishscore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 impostorscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204180035 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Christophe Leroy wrote: > Inlining ftrace_modify_code(), it increases a bit the > size of ftrace code but brings 5% improvment on ftrace > activation. >=20 > Signed-off-by: Christophe Leroy > --- > arch/powerpc/kernel/trace/ftrace.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/arch/powerpc/kernel/trace/ftrace.c b/arch/powerpc/kernel/tra= ce/ftrace.c > index 41c45b9c7f39..98e82fa4980f 100644 > --- a/arch/powerpc/kernel/trace/ftrace.c > +++ b/arch/powerpc/kernel/trace/ftrace.c > @@ -53,7 +53,7 @@ ftrace_call_replace(unsigned long ip, unsigned long add= r, int link) > return op; > } >=20 > -static int > +static inline int > ftrace_modify_code(unsigned long ip, ppc_inst_t old, ppc_inst_t new) > { > ppc_inst_t replaced; I thought gcc was free to inline functions without the need for=20 'inline'. Don't you see this being inlined otherwise? On the flip side, don't we need __always_inline if we want to force=20 inlining? - Naveen