All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
	Miroslav Benes <mbenes@suse.cz>, Borislav Petkov <bp@alien8.de>
Subject: Re: [PATCH v3] scripts: Create objdump-func helper script
Date: Thu, 21 Apr 2022 22:39:44 +0200	[thread overview]
Message-ID: <20220421203944.GQ2731@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20220421173759.ijvytapqhoqpt22n@treble>

On Thu, Apr 21, 2022 at 10:37:59AM -0700, Josh Poimboeuf wrote:
> On Thu, Apr 21, 2022 at 10:52:44AM +0200, Peter Zijlstra wrote:
> > On Wed, Apr 20, 2022 at 10:16:36AM -0700, Josh Poimboeuf wrote:
> > 
> > > +${OBJDUMP} -wdr $OBJ | gawk -M -v f=$FUNC '/^$/ { P=0; } $0 ~ "<" f ">:" { P=1; O=strtonum("0x" $1); } { if (P) { o=strtonum("0x" $1); printf("%04x ", o-O); print $0; } }'
> > 
> > Two noteworthy changes:
> > 
> >  - $@ went missing, I've occasionally abused that to add extra argument
> >    to objdump.
> 
> Just to clarify, you'd add the extra arg at the end like this, right?
> 
>   objdump-func <file> <func> -Mintel

Yeah, highly awkward, but it worked ;-)

> >  - you removed the glob after FUNC, I had that so that .cold and
> >    .constprop etc.. variants of the function also show up.
> 
> Sure, I'll match ".whatever" if there's a period, but not other
> substring matches, e.g. "put_page" shouldn't match "put_pages_list".
> 
>   {OBJDUMP} -wdr $@ $OBJ | gawk -M -v f=$FUNC '/^$/ { P=0; } $0 ~ "<" f "(\\..*)?>:" { P=1; O=strtonum("0x" $1); } { if (P) { o=strtonum("0x" $1); printf("%04x ", o-O); print $0; } }'

Ah, good thinking requiring that '.' in there. I just ignored the extra
gunk on the very rare occasion I got it.

      reply	other threads:[~2022-04-21 20:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 17:16 [PATCH v3] scripts: Create objdump-func helper script Josh Poimboeuf
2022-04-20 18:35 ` Borislav Petkov
2022-04-21  8:52 ` Peter Zijlstra
2022-04-21 17:37   ` Josh Poimboeuf
2022-04-21 20:39     ` Peter Zijlstra [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=20220421203944.GQ2731@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bp@alien8.de \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbenes@suse.cz \
    --cc=x86@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.