public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Matt Helsley <mhelsley@vmware.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [RFC][PATCH 00/13] Cleanup recordmcount and begin objtool conversion
Date: Fri, 31 May 2019 13:34:51 -0500	[thread overview]
Message-ID: <20190531183451.vncrseq2s7cpevrp@treble> (raw)
In-Reply-To: <20190530235219.GB63275@rlwimi.vmware.com>

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

      reply	other threads:[~2019-05-31 18:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23  0:03 [RFC][PATCH 00/13] Cleanup recordmcount and begin objtool conversion Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 01/13] recordmcount: Remove redundant strcmp Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 02/13] recordmcount: Remove uread() Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 03/13] recordmcount: Remove unused fd from uwrite() and ulseek() Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 04/13] recordmcount: Rewrite error/success handling Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 05/13] recordmcount: Kernel style function signature formatting Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 06/13] recordmcount: Kernel style formatting Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 07/13] recordmcount: Remove redundant cleanup() calls Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 08/13] recordmcount: Clarify what cleanup() does Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 09/13] objtool: Prepare to merge recordmcount Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 10/13] objtool: Make recordmcount into an objtool subcmd Matt Helsley
2019-05-28 14:54   ` Josh Poimboeuf
2019-05-23  0:03 ` [RFC][PATCH 11/13] objtool: recordmcount: Start using objtool's elf wrapper Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 12/13] objtool: recordmcount: Search for __mcount_loc before walking the sections Matt Helsley
2019-05-23  0:03 ` [RFC][PATCH 13/13] objtool: recordmcount: Convert do_func() relhdrs Matt Helsley
2019-05-28 14:43 ` [RFC][PATCH 00/13] Cleanup recordmcount and begin objtool conversion Josh Poimboeuf
2019-05-28 14:50   ` Steven Rostedt
2019-05-29 13:41   ` Peter Zijlstra
2019-05-29 14:11     ` Josh Poimboeuf
2019-05-30 23:52       ` Matt Helsley
2019-05-31 18:34         ` Josh Poimboeuf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190531183451.vncrseq2s7cpevrp@treble \
    --to=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhelsley@vmware.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox