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: Wed, 1 May 2013 14:14:56 -0400 [thread overview]
Message-ID: <51815BA0.1090209@ti.com> (raw)
In-Reply-To: <5180F9FB.8010307@ti.com>
On 05/01/2013 07:18 AM, Tom Rini wrote:
> On 04/30/2013 10:19 PM, Rusty Russell wrote:
>> 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.
>
> Nope, CONFIG_GCOV_KERNEL is off. Must be related to whatever flags the
> Linaro folks set as default on -O2 (at least in their 2013.03 release),
> after reading over one of the .o.cmd files in the build.
>
> Do you want me to re-word the commit message a bit or ? Thanks!
I poked around, and every Linaro binary I can grab (2012.01 and gcc 4.6
to 2013.04 and gcc 4.8) has this behaviour.
--
Tom
next prev parent reply other threads:[~2013-05-01 18: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
2013-05-01 2:19 ` Rusty Russell
2013-05-01 11:18 ` Tom Rini
2013-05-01 18:14 ` Tom Rini [this message]
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=51815BA0.1090209@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