This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH i386] Enable -freorder-blocks-and-partition
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Teresa Johnson <tejohnson at google dot com>
- Cc: Martin Liška <marxin dot liska at gmail dot com>, Jeff Law <law at redhat dot com>, Jan Hubicka <hubicka at ucw dot cz>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 13 Dec 2013 02:13:09 +0100
- Subject: Re: [PATCH i386] Enable -freorder-blocks-and-partition
- Authentication-results: sourceware.org; auth=none
- References: <CAAe5K+WL3a1uMUrX-K7vgrr5T9RTrZH1rCYsej-mTdC_HtfigQ at mail dot gmail dot com> <528BA299 dot 7040606 at redhat dot com> <CAAe5K+Vc7RXzNqs9mMn=j=vtsHaSjhFc9VhiMfrLCGmxM++6eQ at mail dot gmail dot com> <CAObPJ3OZHvET=QNmNtx9ZjaHZk=GhokWjoF2njr5mgwcv2ogDA at mail dot gmail dot com> <20131128140655 dot GA20730 at kam dot mff dot cuni dot cz> <CAAe5K+UFRuLZAE_WOnyG-At220DNf9QjJh-BagugwtNKJYSYAQ at mail dot gmail dot com> <529CB252 dot 4070806 at redhat dot com> <CAObPJ3M80TuS_7UA6h_HhE8f3COyKa8M_WTnPFP4OEhAGD9sTA at mail dot gmail dot com> <CAObPJ3OdvTE4jeVVDRrrsGkvmjjcczp24zqNVGisKaf-OM6U7A at mail dot gmail dot com> <CAAe5K+VnKXQ=S2km6_73mBZ2vGBAxu9wwmi4Z_QM_ncwrT0CjA at mail dot gmail dot com>
> On Wed, Dec 11, 2013 at 1:21 AM, Martin Liška <marxin.liska@gmail.com> wrote:
> > Hello,
> > I prepared a collection of systemtap graphs for GIMP.
> >
> > 1) just my profile-based function reordering: 550 pages
> > 2) just -freorder-blocks-and-partitions: 646 pages
> > 3) just -fno-reorder-blocks-and-partitions: 638 pages
> >
> > Please see attached data.
>
> Thanks for the data. A few observations/questions:
>
> With both 1) (your (time-based?) reordering) and 2)
> (-freorder-blocks-and-partitions) there are a fair amount of accesses
> out of the cold section. I'm not seeing so many accesses out of the
> cold section in the apps I am looking at with splitting enabled. In
I see you already comitted the patch, so perhaps Martin's measurement assume
the pass is off by default?
I rebuilded GCC with profiledboostrap and with the linkerscript unmapping
text.unlikely. I get ICE in:
(gdb) bt
#0 diagnostic_set_caret_max_width(diagnostic_context*, int) () at ../../gcc/diagnostic.c:108
#1 0x0000000000f68457 in diagnostic_initialize (context=0x18ae000 <global_diagnostic_context>, n_opts=n_opts@entry=1290) at ../../gcc/diagnostic.c:135
#2 0x000000000100050e in general_init (argv0=<optimized out>) at ../../gcc/toplev.c:1110
#3 toplev_main(int, char**) () at ../../gcc/toplev.c:1922
#4 0x00007ffff774cbe5 in __libc_start_main () from /lib64/libc.so.6
#5 0x0000000000f7898d in _start () at ../sysdeps/x86_64/start.S:122
That is relatively early in startup process. The function seems inlined and
it fails only on second invocation, did not have time to investigate further,
yet while without -fprofile-use it starts...
On our periodic testers I see off-noise improvement in crafty 2200->2300
and regression on Vortex, 2900->2800, plus code size increase.
Honza