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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 7CA3DC433EF for ; Thu, 3 Feb 2022 09:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hjbA6S7/4UtdgppYX+Lw8I1GCXNmjvJg4lWTmbYEsgQ=; b=eZNXMLmLcPPlP8 LHrS383wwh05t6MLyRHec8QLUnAvBaJeu1U6qdv7ZhCRIk7mKZ0GleX82RVu550YrCWaH5lqtaT52 3haIRD/uLOvQ2GmTwRrBfdEndP1e9rzlcxdkOFaDine6zp1otMsqwSNQc98udiYycpjExcOwxRz1m IF9GUu2gVPcm05V1lUsyeDlTf3+6x4WQGp0pC08PMBfsJAXFemAS02cnAAE7TAF5OA3XmfPp/Lh+d IBXAbqC21KNCESi4rufFYennsMlQ6Tks7w8ndy5CNrik3sFYtw+NAUepkHz4kazPZhkAVOp5p57Yt sQ5iWySsD+zsJbEPXkJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFYd7-000XTV-0T; Thu, 03 Feb 2022 09:42:17 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nFYd4-000XTB-1R for linux-arm-kernel@lists.infradead.org; Thu, 03 Feb 2022 09:42:15 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8B67960C62 for ; Thu, 3 Feb 2022 09:42:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2C76C340E4 for ; Thu, 3 Feb 2022 09:42:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643881333; bh=l6AyEqls/1zC+a+HaA6LzAyz3vJDk+0l+NxvR+ZR+GY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UoW2tC1DFvUjbxT0/QlnpFv2ojKCw6sNJ2oknm3h8NtNyHhgNLGKVBvDmgtQ4e/uo WJv1xyhw4bQxWIgv+c0z3PIm7/5D4IU9zwTEM4J1C+gvj9lZiwVLOKVcd91hfu6Huq GvLiNe1WAF/yEjAE2kUdjOXEtocvL70WFCmxCUz1vocscxHN2wwUm1sTnZzwGbdrbr Gbd4qxcttPHJRO2C8lzCVr/DBEGBLVnBzwVypG7X4BfDsHrL7wiD1Y5s3QIIQSUwwD gAc0X013PmjzgsCB94X/qZ3ee3tQHhxCMSaqWg2cDpZq7hNvq4CZdQvUZ1tr3SuLHS cKSBU4v2b9ryg== Received: by mail-wr1-f48.google.com with SMTP id g18so3468333wrb.6 for ; Thu, 03 Feb 2022 01:42:12 -0800 (PST) X-Gm-Message-State: AOAM531dNR0ORk07J/QmDr64xjVQsih4IZfOxyG/Xm4KkzrJeM9YLZzq 25FVJejr7LyivneJwB0vFq7JkNS+KBn3N2+QdHk= X-Google-Smtp-Source: ABdhPJws3PX2Z5gvExDrabisuNJL2G9Ouw2WKJo18Gi0CC1pWgc66EmKIO/quNGR3GaxEwK7Gp19Le59Vb2qD4jGUqM= X-Received: by 2002:a05:6000:1107:: with SMTP id z7mr28431893wrw.189.1643881331345; Thu, 03 Feb 2022 01:42:11 -0800 (PST) MIME-Version: 1.0 References: <20220203082204.1176734-1-ardb@kernel.org> <20220203082204.1176734-9-ardb@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Thu, 3 Feb 2022 10:41:59 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 08/13] ARM: ftrace: enable the graph tracer with the EABI unwinder To: Arnd Bergmann Cc: Russell King - ARM Linux , Linux ARM , Steven Rostedt , Sudeep Holla , Cristian Marussi , Nathan Chancellor , Nick Desaulniers , Linus Walleij , Masami Hiramatsu X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220203_014214_187094_142224F1 X-CRM114-Status: GOOD ( 34.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 3 Feb 2022 at 10:17, Arnd Bergmann wrote: > > On Thu, Feb 3, 2022 at 9:21 AM Ard Biesheuvel wrote: > > > > Enable the function graph tracer in combination with the EABI unwinder, > > so that Thumb2 builds or Clang ARM builds can make use of it. > > > > This involves using the unwinder to locate the return address of an > > instrumented function on the stack, so that it can be overridden and > > made to refer to the ftrace handling routines that need to be called at > > function return. > > > > Given that for these builds, it is not guaranteed that the value of the > > link register is stored on the stack, fall back to the stack slot that > > will be used by the ftrace exit code to restore LR in the instrumented > > function's execution context. > > > > Signed-off-by: Ard Biesheuvel > > Reviewed-by: Steven Rostedt (Google) > > > diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug > > index 07055a503022..cc7523f44be4 100644 > > --- a/arch/arm/Kconfig.debug > > +++ b/arch/arm/Kconfig.debug > > @@ -65,7 +65,7 @@ config UNWINDER_FRAME_POINTER > > > > config UNWINDER_ARM > > bool "ARM EABI stack unwinder" > > - depends on AEABI && !FUNCTION_GRAPH_TRACER > > + depends on AEABI > > # https://github.com/ClangBuiltLinux/linux/issues/732 > > depends on !LD_IS_LLD || LLD_VERSION >= 110000 > > select ARM_UNWIND > > What are the remaining tradeoffs between the two unwinders > on EABI kernels? The frame pointer based stack tracer dumps the values of the registers at each level, by decoding the instructions that push them onto the stack in the prologue. And the frame pointer unwinder is generally a bit more robust. > Since we require llvm-11 as the minimum > toolchain now, we can probably drop the LLD_VERSION > check here as well, so UNWINDER_ARM should finally work > for any EABI kernel. > Indeed. > According to the help text, the main downside is a small size > increase that I've measured at under 1% in multi_v7_defconfig, > however that seems to be far outweighed by allowing thumb2 > kernels that reduce the size by 15% in the same config. > Yeah the EABI format unwind info is a bit more compact than DWARF, so the size is manageable. I saw a ~30% reduction in .text size, so 15% for the core kernel is probably accurate, but it is likely a bit better for modules (modulo the rounding to page size, of course) > Are there any other reasons for keeping the frame pointer > unwinder as a normal option for ARMv7? > Just the points mentioned above _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel