Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp587743ybz; Wed, 15 Apr 2020 14:37:31 -0700 (PDT) X-Google-Smtp-Source: APiQypLbK6+ymnhKnOTBmpu3Wj+zRYFlZ8ohGETMJjVcP/9jWFoB0+0QjV53z5GiqwZIIY2kWa+V X-Received: by 2002:a17:906:c281:: with SMTP id r1mr7035214ejz.310.1586986651286; Wed, 15 Apr 2020 14:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586986651; cv=none; d=google.com; s=arc-20160816; b=FZOC9lKlAoWrI+KxafR52xCtibiKz9aek8wOh1Fe1gn4lNWWrfSeMNxWo3ia62OzDD DIbZP2A6xVzVKok1eAzmV3piSUq5dzS7pUl7+jmGsWV5ExuLP0wKUhxber6seaTahhxU eUwyPvkNUN5UWlF7jSYaZz3mCsNslg+8AM2B9XgNA0buOd7iRLd62aND6bxae+YTBmf6 P9O+mX7q1sFum2Wtd92AOEs7Jdc6rqT8+u/ON0XK2PvrFdO51JVWmkmcHNKng112w6XM bsKar4LBUjCbQTMi9h+6Za6fevk8S02j7hsj0lMBcsFDqsvFTHA0I+Ttku8a2+ZIwp00 Skzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=zGMSl0V0XK2y2mvP7vKoZc8mac1Y6NWtlLevezHXkOQ=; b=zj7DyJbgLBee7TTUZAUl3J+xIWBQXDNHzaZrShs1tujXiaj69XKsIqdPDew59MLxtv 0yxjdwIYs2diIu1MaUHe9jCX8Br6ZZVJJ/eld4jk0+uqF5y81SPBE9rdS4+Woh3z0y5J MPuq5JOsxSUpJFwaEtuUclcTTcBvjtcaDqiWk2kQwcYnKD4oUEbSwsa0Tep3uCeqINJ8 Guqzj6VdyRf79Ub9C6sC2ArxNp8GIt0WmbbeO4uFy70/gGpu2+nuG/liRhx5rYQkJrXH ttbHyJBmF7MbKcb8Ggdtas49TpfhO4pEXdNZevk+RB3618cpfx2hvHoiHlaktAAN+t7a TxXw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gz10si7146055ejb.167.2020.04.15.14.37.07; Wed, 15 Apr 2020 14:37:31 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387458AbgDNNg0 (ORCPT + 99 others); Tue, 14 Apr 2020 09:36:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:42728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732332AbgDNNfJ (ORCPT ); Tue, 14 Apr 2020 09:35:09 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 67D2820575; Tue, 14 Apr 2020 13:35:08 +0000 (UTC) Date: Tue, 14 Apr 2020 09:35:06 -0400 From: Steven Rostedt To: Julien Thierry Cc: Matt Helsley , linux-kernel@vger.kernel.org, Josh Poimboeuf , Peter Zijlstra , Ingo Molnar , Miroslav Benes Subject: Re: [RFC][PATCH 00/36] objtool: Make recordmcount a subcommand Message-ID: <20200414093506.7b91bbbb@gandalf.local.home> In-Reply-To: <3a3f70df-07b0-91d9-33e1-e997e72b0c5c@redhat.com> References: <3a3f70df-07b0-91d9-33e1-e997e72b0c5c@redhat.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Apr 2020 08:24:15 +0100 Julien Thierry wrote: > If all you need from objtool it the elf parsing code, wouldn't it make > more sense to move that out of objtool, as a utility library that both > objtool and recordmcount could use (and perhaps other tools in the future?) > > In patch 3 you seem to mention that other tools already have their own > code to parse elf. So instead of converting everything as an objtool > subcommand, maybe just have the library with the required functionality. > > Any opinions on the above? What do people prefer? I think we discussed this before (and originally that was the plan), but I believe one of the goals for bringing recordmcount into objtool is to speed up the processing. Instead of having to read the elf sections for each use case, we do it once, and then execute all the necessary operations for that build. If we just have a elf parsing library, then each object file is going to have that read redundantly for each operation that is done on it. I was hoping to have objtool handle all the operations needed that required reading elf headers. But if that's not what objtool maintainers want, then we can certainly go back to looking at pulling out the elf headers, and have each tool be a standalone again. -- Steve