Re: [RFC][PATCH 00/13] Cleanup recordmcount and begin objtool conversion

From: Josh Poimboeuf
Date: Wed May 29 2019 - 10:15:15 EST


On Wed, May 29, 2019 at 03:41:52PM +0200, Peter Zijlstra wrote:
> On Tue, May 28, 2019 at 09:43:28AM -0500, Josh Poimboeuf wrote:
> > Would it be feasible to eventually combine subcommands so that objtool
> > could do both ORC and mcount generation in a single invocation? I
> > wonder what what the interface would look like.
>
> 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]

> Alternatively, we ditch the command thing entirely and live off of pure
> flags:
>
> 'o', "orc", "Generate ORC data"
> 'c', "mcount', "Generate mcount() location data"

--
Josh