Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp971216ybi; Fri, 31 May 2019 11:36:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqw00kOWN83FxshrfjcHmMSw9ofK6bQz7OOdkcGmaLPIkcjufraDrBnrpXz2xMQ83cahwfRa X-Received: by 2002:a17:902:8546:: with SMTP id d6mr3891217plo.207.1559327779768; Fri, 31 May 2019 11:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559327779; cv=none; d=google.com; s=arc-20160816; b=YSMoyuBvGoMkEaZtEVqDU961Ivg71DJT7g00borBpd7seZdIAPbAIWe1CyNFtJGKtA OSWwkLR4sI9irN+gIsgFmHUbDfzXQPvdphnUzQerDBxur52rC4T/Qf4Q+TV71GcN23rb CBKiKVfNC0cHPouXBMLBGCeBmyp4YogIcWBjCPJL5BYVxhTwBn+PPPZtU2AmA4CRkycy 8y222XjFEJQ+Xnzv7f6ZXWE2NrHRi4ZT2Pk7/tcGiO6ou2DzQLRFOhomeTEPCFxFmIAH d5cMDT7figYro6H7KbbZZMhpZP6PVIWV83Lp/WrOIoU2XuerL38Ij4DagCFS3XQyl3uI h0kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=njY9IMCZHRBiS9H5Ewe+XqR+Fuk9HBAxb7ygfkfgMGw=; b=WuF9Rh+eC5bdMTQln6lJ4vSRHBAVd5I6UpSD2HKsRxYboK3lqvM9Lt0G9rRCpA1GHD sBzgUtYztsABUCNEzN82m0S0uOMFk9KnIPsSQN8d2yskdO77cXDskiIXPiJDXF+prFx/ kf9BO2/0FLGUZjYZ5+nJiQXZflisECpC4VyvLw5FprbLM/AIZqS4u6BNnIZfEYZi39ky d3zJuly6gdaqbuNpc7W1ZLO3CfpJKSeX0G2+9vIZm59ATR15bj9EiQPoereMXA/gz/M3 E2mYpOnQOSRzxbF2d4J1FDln5f5fOuO4dmiuLKUgt7zp5vFGjIBeh9Vs6+UnbkAugpj9 8TfQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si6973352plo.203.2019.05.31.11.36.01; Fri, 31 May 2019 11:36:19 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727132AbfEaSey (ORCPT + 99 others); Fri, 31 May 2019 14:34:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43518 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726640AbfEaSey (ORCPT ); Fri, 31 May 2019 14:34:54 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D4B930842A9; Fri, 31 May 2019 18:34:54 +0000 (UTC) Received: from treble (ovpn-124-142.rdu2.redhat.com [10.10.124.142]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 98E1616C6D; Fri, 31 May 2019 18:34:53 +0000 (UTC) Date: Fri, 31 May 2019 13:34:51 -0500 From: Josh Poimboeuf To: Matt Helsley Cc: Peter Zijlstra , LKML , Ingo Molnar , Steven Rostedt Subject: Re: [RFC][PATCH 00/13] Cleanup recordmcount and begin objtool conversion Message-ID: <20190531183451.vncrseq2s7cpevrp@treble> References: <20190528144328.6wygc2ofk5oaggaf@treble> <20190529134152.GX2623@hirez.programming.kicks-ass.net> <20190529141145.4tycu25a3os3fpgr@treble> <20190530235219.GB63275@rlwimi.vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190530235219.GB63275@rlwimi.vmware.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 31 May 2019 18:34:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 30, 2019 at 04:52:19PM -0700, Matt Helsley wrote: > > > objtool orc+mcount ? > > > > > > That is, have '+' be a separator for cmd thingies. That would of course > > > require all other arguments to be shared between all commands, which is > > > currently already so, but I've not checked the mcount patches. > > > > The problem is that you have to combine "orc generate" with "mcount > > record". Because even the subcommands have subcommands ;-) > > > > And also sharing arguments between all subcommands isn't ideal. > > > > Maybe could do: > > > > objtool orc generate [orc options] + mcount record [mcount options] > > I think that makes more sense; it'll be easier to construct > Make recipes this way. I was thinking '+' would be something like the > getopt handling of the '--' argument where it stops argument parsing so > someting else can consume the remainder. > > The really interesting part is deciding which file to operate on is > specified by the arguments to the first subcommand and subsequent subcmds > would then operate on the same object file. For example: > > objtool orc generate [orc opts] foo.o + mcount record [mcount opts] > > Would it be clearer what's going on if the object file(s) were specified > first and then the passes to run and their arguments came afterwards? > I'm thinking it'd go somewhat like this: > > objtool foo.o [bar.o] -- check [check opts] + \ > orc generate [orc opts] + \ > mcount record [mcount opts] > > Then objtool would iterate over the object file(s) to open, > hand off the ELF data structures into each successive pass, and > finally write any accumulated changes back. Yeah, I forgot about the .o file. Something like that would probably work. The ordering seems a bit funny to me. Another possibly more readable variation would be: objtool check [check opts] + orc generate [orc opts] + mcount record [mcount opts] -- foo.o [bar.o] or, just use '--' as a generic separator which can be used to separate subcommands or file names. objtool check [check opts] -- orc generate [orc opts] -- mcount record [mcount opts] -- foo.o [bar.o] I kind of like that. But I think any of these variations would probably work. -- Josh