public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Tom Rini <trini@ti.com>
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: Wed, 01 May 2013 11:49:47 +0930	[thread overview]
Message-ID: <87ppxbxwzg.fsf@rustcorp.com.au> (raw)
In-Reply-To: <517E7260.5070204@ti.com>

Tom Rini <trini@ti.com> writes:
> 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.

Weird, did you turn on CONFIG_GCOV_KERNEL?  AFAICT you shouldn't see
this section without that.

Thanks,
Rusty.

  reply	other threads:[~2013-05-01  5:32 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
2013-05-01  2:19     ` Rusty Russell [this message]
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=87ppxbxwzg.fsf@rustcorp.com.au \
    --to=rusty@rustcorp.com.au \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trini@ti.com \
    /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