Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2121331yba; Mon, 15 Apr 2019 05:30:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwLzjaSoscii/ycAsOtNsWGNvWX2yT+zx+sby1DONaAoq8tg8fEyEhUis6mtggHHtrQAVMT X-Received: by 2002:a17:902:e110:: with SMTP id cc16mr75605936plb.147.1555331420391; Mon, 15 Apr 2019 05:30:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555331420; cv=none; d=google.com; s=arc-20160816; b=GudJHeaW3GYSZ+4v9DonMZ28Ds/ZJV+zx6a0vgqJmdSm1yoj6ufPBE4A1QmeESMJEm pipTDpxck8oggr5w9fruutRPR8Mjru8+gYmYhNpwLL7LzRyJQoMiv1q0cA4p5wENuv1e EvSpA773PWumAW78l2pq8mlGEdQ/0S9ireUL9YhmHhc3EdLsO2uiLHHUzTivbFCt06Gk UdwxN2c9D3BmAUzzRitKJxsv6beRNos2HNr5Snlco/HZK7hgiTuDdfdLv10E7UWegRTl 3xS30BMTiehrwfQGJ+R0guCRNHsM4nw6YpxzJ+/0c7EIuwxwQtEyxEoyucDsHp0Gcgt+ ga6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=WlFJ2a0Gegd+f+5u8gC2fdwSw0IBQnT8ATkMdXPZXJU=; b=h6SXGcRVpJxWHegS2QkM+99iUkAZ8KsUW6JUcgAxKmpamVsKD1DGq5UbKJyt8GoOpf 4ddgMJnErtQ3pqLIr0I9icra0fJnLumngs3Sh8mu5ssh942H7RGJAzWxHli6HwdIFf5e Mnw5FvtRe1snnG4kIfio4aZjnzA4bfUdV1k4eWRMKDveVCRc8JP7PTEMp5DiV7xVJukc cxGe7nm9pyEXhA00ASBp+xnGbXBOi9o8HUqyNy11HPL4ge4j0W5MKgdK3J2EESJnW/z1 igHzwWZKcPDwL/IpFUDtX0VQof4ZcG4E4jKQZDia1eBkG4gQ0V4gTzzuWfFsq7qPtGYV j/tw== 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 k131si45175619pga.267.2019.04.15.05.30.03; Mon, 15 Apr 2019 05:30:20 -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 S1727340AbfDOM3R (ORCPT + 99 others); Mon, 15 Apr 2019 08:29:17 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:35307 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726042AbfDOM3R (ORCPT ); Mon, 15 Apr 2019 08:29:17 -0400 Received: by mail-qt1-f194.google.com with SMTP id h39so18825018qte.2 for ; Mon, 15 Apr 2019 05:29:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WlFJ2a0Gegd+f+5u8gC2fdwSw0IBQnT8ATkMdXPZXJU=; b=fEyHN/dF4/1e8rx3j/hot7lyuMs/pcfeF1jSd6k+01PHISxSuB/66qQw0p17EBGcg2 WGCXb/4+958NiZj2UJSm5klSfIN6KiYE8zXSH94VYJ/3poyPafIlUjebqHNM06SAMY6Z DuCrZiaA0wTLVASzS0gA1PP0FnvS4PWgI4aomjjpJQptS2bhGLFOt5yCFsKPqAAwIGlR gB6U5carCYod1UZHzuZ4lONIrilpJaVVhqF2h3SGAhfFv4BDow44OJ874Cvh55QC3EKu YZSRb24cGd7JZ39pZfRVBBjPXVGKvGMU32Ta3fwzXk7UUltxQLDU/VcvZWx3nw66XoaQ E8mw== X-Gm-Message-State: APjAAAVWymIppGwIgvsf32uHGmXEiRlsFXb3iRnvnQXACKMXbk6bs5gY U6s6Rgh/8QVH+IfONLbJhxQ+Ey68KjFgF0Y6AWU= X-Received: by 2002:ac8:1a0b:: with SMTP id v11mr62319215qtj.171.1555331355533; Mon, 15 Apr 2019 05:29:15 -0700 (PDT) MIME-Version: 1.0 References: <20190414194705.2e10802aca2df36c8f27f349@kernel.org> <20190414133458.zxdekgx6qwd562qa@shell.armlinux.org.uk> In-Reply-To: <20190414133458.zxdekgx6qwd562qa@shell.armlinux.org.uk> From: Arnd Bergmann Date: Mon, 15 Apr 2019 14:28:59 +0200 Message-ID: Subject: Re: Kconfig dependency issue on function-graph tracer and frame pointer on arm To: Russell King - ARM Linux admin Cc: Masami Hiramatsu , Steven Rostedt , Stefan Agner , Masahiro Yamada , Linux ARM , Naresh Kamboju , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 14, 2019 at 3:35 PM Russell King - ARM Linux admin wrote: > The subsequent hunks remove the defaulting of the choice according to > the function graph tracer - this is not a "hint" where the user can > still choose either option irrespective of the state of the function > graph tracer. They should only be able to select the frame pointer > option in that case. > > Another way forward would be for someone to put the work in to making > the function graph tracer work without frame pointers. I think Stefan was already looking into making CONFIG_FUNCTION_TRACER work with clang. I don't know what the status of that work is, but I think getting FUNCTION_GRAPH_TRACER working at the same time would be best. I never noticed the Kconfig issue here, because I was using a patch to turn off FUNCTION_TRACER on ARM with clang to make it build, and that turns off FUNCTION_GRAPH_TRACER in the process. > So, how about this: > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index 850b4805e2d1..9aed25a6019b 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -73,7 +73,7 @@ config ARM > select HAVE_EFFICIENT_UNALIGNED_ACCESS if (CPU_V6 || CPU_V6K || CPU_V7) && MMU > select HAVE_EXIT_THREAD > select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL > - select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL > + select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL && !CC_IS_CLANG > select HAVE_FUNCTION_TRACER if !XIP_KERNEL > select HAVE_GCC_PLUGINS > select HAVE_HW_BREAKPOINT if PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7) > diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug > index 6d6e0330930b..e388af4594a6 100644 > --- a/arch/arm/Kconfig.debug > +++ b/arch/arm/Kconfig.debug > @@ -47,8 +47,8 @@ config DEBUG_WX > > choice > prompt "Choose kernel unwinder" > - default UNWINDER_ARM if AEABI && !FUNCTION_GRAPH_TRACER > - default UNWINDER_FRAME_POINTER if !AEABI || FUNCTION_GRAPH_TRACER > + default UNWINDER_ARM if AEABI > + default UNWINDER_FRAME_POINTER if !AEABI > help > This determines which method will be used for unwinding kernel stack > traces for panics, oopses, bugs, warnings, perf, /proc//stack, > @@ -65,7 +65,7 @@ config UNWINDER_FRAME_POINTER > > config UNWINDER_ARM > bool "ARM EABI stack unwinder" > - depends on AEABI > + depends on AEABI && !FUNCTION_GRAPH_TRACER > select ARM_UNWIND > help > This option enables stack unwinding support in the kernel This looks good to me in the meantime, at least if there is any way to get the non-graph FUNCTION_TRACER to build with clang. Arnd