From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Allan Xavier <allan.x.xavier@oracle.com>
Cc: Peter Zijlstra <peterz@infradead.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] objtool: Fix GCC 8 cold function processing without -freorder-functions
Date: Wed, 27 Jun 2018 10:15:44 -0500 [thread overview]
Message-ID: <20180627151544.wieelchsffq3gjel@treble> (raw)
In-Reply-To: <0556953a-3e9f-ff22-3514-b40ca7b5de1b@oracle.com>
On Wed, Jun 27, 2018 at 10:35:03AM +0100, Allan Xavier wrote:
> Looks good overall, just one comment.
>
> On 26/06/18 19:44, Josh Poimboeuf wrote:
> > + /*
> > + * Unfortunately, -fnoreorder-functions puts the child
> > + * inside the parent. Remove the overlap so we can
> > + * have sane assumptions.
> > + */
> > + if (sym->sec == pfunc->sec &&
> > + sym->offset >= pfunc->offset &&
> > + sym->offset < pfunc->offset + pfunc->len &&
> > + sym->offset + sym->len == pfunc->offset + pfunc->len) {
> > + pfunc->len -= sym->len;
>
> It's a bit of a nit but I'd say you could drop the third condition of the if
> since sym->offset would have to be less than pfunc->offset + pfunc->len for the
> fourth condition to ever be true. The only situation it would have caught is
> where sym->len == 0, which I think (hope?) is reasonable to assume wont happen
> and wouldn't have had an effect on pfunc->len anyway.
>
> if (sym->sec == pfunc->sec &&
> sym->offset >= pfunc->offset &&
> sym->offset + sym->len == pfunc->offset + pfunc->len)
Thanks, will do.
--
Josh
prev parent reply other threads:[~2018-06-27 15:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-26 16:20 Allan Xavier
2018-06-26 16:43 ` Peter Zijlstra
2018-06-26 18:31 ` Allan Xavier
2018-06-26 18:44 ` Josh Poimboeuf
2018-06-26 19:43 ` Peter Zijlstra
2018-06-26 21:07 ` Josh Poimboeuf
2018-06-27 9:35 ` Allan Xavier
2018-06-27 15:15 ` 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=20180627151544.wieelchsffq3gjel@treble \
--to=jpoimboe@redhat.com \
--cc=allan.x.xavier@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®