public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH] modpost.c: Add .text.unlikely to TEXT_SECTIONS
Date: Mon, 29 Apr 2013 09:15:12 -0400	[thread overview]
Message-ID: <517E7260.5070204@ti.com> (raw)
In-Reply-To: <87sj2aca9r.fsf@rustcorp.com.au>

On 04/28/2013 10:59 PM, Rusty Russell wrote:
> Tom Rini <trini@ti.com> writes:
> 
>> Recent gcc's may place functions into the .text.unlikely section and we
>> need to check this section as well for section mismatches now otherwise
>> we may have false negatives for this test.
> 
> Hmm, I don't think it's all that recent, is it?  I can find it back to
> gcc 4.0.4:
> 
> `-freorder-functions'
>      Reorder functions in the object file in order to improve code
>      locality.  This is implemented by using special subsections
>      `.text.hot' for most frequently executed functions and
>      `.text.unlikely' for unlikely executed functions.  Reordering is
>      done by the linker so object file format must support named
>      sections and linker must place them in a reasonable way.
> 
>      Also profile feedback must be available in to make this option
>      effective.  See `-fprofile-arcs' for details.
> 
>      Enabled at levels `-O2', `-O3', `-Os'.
> 
> The comment is the same in in gcc 4.7.
> 
> So is your real issue that this section is generated with
> -fprofile-arcs, or has something changed with gcc 4.8, or...?

I've started seeing this with Linaro based 4.7 toolchains.  I can go
back through their releases and see when it starts showing up there if
it helps.  I didn't add .text.hot as I didn't have that section at all,
fwiw.

-- 
Tom

  reply	other threads:[~2013-04-29 13:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24 22:26 [PATCH] modpost.c: Add .text.unlikely to TEXT_SECTIONS Tom Rini
2013-04-29  2:59 ` Rusty Russell
2013-04-29 13:15   ` Tom Rini [this message]
2013-05-01  2:19     ` Rusty Russell
2013-05-01 11:18       ` Tom Rini
2013-05-01 18:14         ` Tom Rini
2013-05-06  5:24           ` Rusty Russell

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=517E7260.5070204@ti.com \
    --to=trini@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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