Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp814631ybg; Tue, 9 Jun 2020 13:37:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMxAU7oBawJi/aXHKhxyN2ACJBr6nwROBzi4wU5lAjOt/QNiBYzeePZsX6GZw2mn0jeBWW X-Received: by 2002:a17:906:e05:: with SMTP id l5mr210416eji.318.1591735033604; Tue, 09 Jun 2020 13:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591735033; cv=none; d=google.com; s=arc-20160816; b=PdJSjqD8pu6hgTHWqU3ZpNCsG9GXHPJxfor6gp8HWeku0wmfm1tuG509lPK/ilE+bF Ci/XuFMRhSnhDGEVXMvHRPSTk0U0AsSqWwEAD5y6h/gNL7JXAwBZgqTX11ShjdNF0fDp JZZbZroBXzyvNL5o/qxmlQAZPk7FXc38BDC9wLt4yCuT+Wo450Xz3FzsszSzxyO4X7zv xF4YB5tRZouxk9ztxYebitZ37SE3KkMUA7u3cmFAzSXKSAkoSOEHlV3g6HlYhizjuhUf 1fmWpDYD0ABpaJYYMFunmB8v0FwmSlGrOqJS11WSFIuhBWFefTM1bKUeQK14OquBbJdE fVgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date; bh=h//nninZt9gw7sjc94C6qCrf1htcH4OrWflLbwX3ZRc=; b=oDsykhwCqboqSBBoWk7PWaQBNXoI70AowwaMiXNhTpn0VxN3cmBOhPUgl+p5cifCE2 IYfDVgQkDTb4mRfGYONSUFjUvLIhx+0YTkHdMdGnHWIlh/OycEUYpFOOoILvZNXKBwpV sOUCAmN6H2DhP1XNAZX19+IR/r7RyS5gXgz5kRwpeWh5pBD3fixkGMWlpFPOsgvwZs4u OG4+Uy5SCoKhYipQ+Af4jWX/UUhzFTEA3mX5eijtwFiKkjcRDQr4iihktNTn10o31Zo4 +NpOQmWfi6JruSskvJGmlafaUMOXlYaK6XG6kA9StNG7Jr2lOkFyf1Jce9v3JBK0sYvm MqlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q12si11132749edc.303.2020.06.09.13.36.49; Tue, 09 Jun 2020 13:37:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730305AbgFIS42 (ORCPT + 99 others); Tue, 9 Jun 2020 14:56:28 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:17545 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728189AbgFIS41 (ORCPT ); Tue, 9 Jun 2020 14:56:27 -0400 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Tue, 9 Jun 2020 11:56:24 -0700 Received: from localhost (unknown [10.166.65.245]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 68E6F408D4; Tue, 9 Jun 2020 11:56:26 -0700 (PDT) Date: Tue, 9 Jun 2020 11:56:26 -0700 From: Matt Helsley To: Steven Rostedt CC: Julien Thierry , , Josh Poimboeuf , Peter Zijlstra , Sami Tolvanen , Kamalesh Babulal Subject: Re: [RFC][PATCH v4 02/32] objtool: Make recordmcount into mcount subcmd Message-ID: <20200609185626.GF1284251@rlwimi.vmware.com> Mail-Followup-To: Matt Helsley , Steven Rostedt , Julien Thierry , linux-kernel@vger.kernel.org, Josh Poimboeuf , Peter Zijlstra , Sami Tolvanen , Kamalesh Babulal References: <0d44e0b1b8ebce4af8b90f73e351a003ef016005.1591125127.git.mhelsley@vmware.com> <20200609183951.GE1284251@rlwimi.vmware.com> <20200609145207.1d9dafa2@oasis.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200609145207.1d9dafa2@oasis.local.home> Received-SPF: None (EX13-EDG-OU-002.vmware.com: mhelsley@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 09, 2020 at 02:52:07PM -0400, Steven Rostedt wrote: > On Tue, 9 Jun 2020 11:39:51 -0700 > Matt Helsley wrote: > > > > > +ifeq ($(SRCARCH),sparc) > > > > + SUBCMD_MCOUNT := y > > > > > > Is there some arch for which MCOUNT is not supported? If not you could just > > > have MCOUNT default to 'y' and avoid adding all those tests (or maybe reduce > > > the numbers and set to 'n' only for arches not supporting it). > > > > Yes, there are some which it does not support. For those architectures > > we keep recordmcount.pl around. > > > > It occured to me that with your suggestion to use more CONFIG_ variables > > we could eliminate this pattern and replace it with these pseudo-patches: > > > > +++ b/kernel/trace/Kconfig > > > > +config OBJTOOL_SUBCMD_MCOUNT > > + bool > > + depends on HAVE_C_RECORDMCOUNT > > + select OBJTOOL_SUBCMDS > > + help > > + Record mcount call locations using objtool > > > > and then change the Makefiles to use the CONFIG_ variables > > rather than have one ifeq block per arch: > > > > +++ b/tools/objtool/Makefile > > > > +SUBCMD_MCOUNT := $(CONFIG_OBJTOOL_SUBCMD_MCOUNT) > > If you can make this work, this is definitely the way to go. I think I can so I'll give it a go! Cheers, -Matt Helsley