public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/46176] New: profile feedback causes 20% linux kernel binary growth
@ 2010-10-25 22:55 andi-gcc at firstfloor dot org
2010-10-25 22:57 ` [Bug middle-end/46176] " pinskia at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: andi-gcc at firstfloor dot org @ 2010-10-25 22:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46176
Summary: profile feedback causes 20% linux kernel binary growth
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: andi-gcc@firstfloor.org
Recent gcc 4.6 snapshot on x86_64-linux.
I did an experimental patch to use profile feedback with the Linux kernel
With a very simple training run (covering only ~50% of the files partially)
Unfortunately recompiling with the feedback data leads to a 20% larger
binary. This is compiled using -O2.
Trained:
text data bss dec hex filename
13615040 1202668 1357680 16175388 f6d11c vmlinux
Untrained:
11136452 1200876 1357552 13694880 d0f7a0 vmlinux
Comparing the symbols with the largest growth I get:
add/remove: 674/2006 grow/shrink: 12172/4139 up/down: 3000900/-510189 (2490711)
function old new delta
r600_kms_blit_copy 2640 16394 +13754
static.do_con_write - 10681 +10681
r600_blit_copy 10605 21205 +10600
zlib_inflate 5459 15261 +9802
static.rv770_startup - 9541 +9541
e1000_setup_copper_link - 9510 +9510
e1000_diag_test 14064 22948 +8884
kmem_cache_create 1385 10227 +8842
I have not analyzed it in detail, but current suspicion is much
more aggressive inlining?
Note also that a lot of functions were using fallback profiling data
because the training load wasn't very good.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/46176] profile feedback causes 20% linux kernel binary growth
2010-10-25 22:55 [Bug middle-end/46176] New: profile feedback causes 20% linux kernel binary growth andi-gcc at firstfloor dot org
@ 2010-10-25 22:57 ` pinskia at gcc dot gnu.org
2010-10-26 8:01 ` andi-gcc at firstfloor dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2010-10-25 22:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46176
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-10-25 22:57:50 UTC ---
I think this is unrolling. -fprofile-generate/-fprofile-use turns on
unrolling.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/46176] profile feedback causes 20% linux kernel binary growth
2010-10-25 22:55 [Bug middle-end/46176] New: profile feedback causes 20% linux kernel binary growth andi-gcc at firstfloor dot org
2010-10-25 22:57 ` [Bug middle-end/46176] " pinskia at gcc dot gnu.org
@ 2010-10-26 8:01 ` andi-gcc at firstfloor dot org
2010-10-26 10:28 ` andi-gcc at firstfloor dot org
2014-09-26 17:43 ` andi-gcc at firstfloor dot org
3 siblings, 0 replies; 5+ messages in thread
From: andi-gcc at firstfloor dot org @ 2010-10-26 8:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46176
--- Comment #2 from Andi Kleen <andi-gcc at firstfloor dot org> 2010-10-26 08:01:01 UTC ---
Thanks.
Unrolling seems to be part of it, but not all. I rebuilt/retrained with
-fno-unroll-loops
Trained:
text data bss dec hex filename
12774489 1198572 1357680 15330741 e9edb5 vmlinux
Untrained:
11136452 1200876 1357552 13694880 d0f7a0 ../obj-work2/vmlinux
So it's only 13% difference now, but still a lot.
function old new delta
r600_kms_blit_copy 2640 16394 +13754
static.do_con_write - 10163 +10163
static.rv770_startup - 9541 +9541
r600_blit_copy 10605 19626 +9021
e1000_setup_copper_link - 8894 +8894
kmem_cache_create 1385 10227 +8842
des3_ede_encrypt 1203 8208 +7005
des3_ede_decrypt 1203 8208 +7005
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/46176] profile feedback causes 20% linux kernel binary growth
2010-10-25 22:55 [Bug middle-end/46176] New: profile feedback causes 20% linux kernel binary growth andi-gcc at firstfloor dot org
2010-10-25 22:57 ` [Bug middle-end/46176] " pinskia at gcc dot gnu.org
2010-10-26 8:01 ` andi-gcc at firstfloor dot org
@ 2010-10-26 10:28 ` andi-gcc at firstfloor dot org
2014-09-26 17:43 ` andi-gcc at firstfloor dot org
3 siblings, 0 replies; 5+ messages in thread
From: andi-gcc at firstfloor dot org @ 2010-10-26 10:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46176
--- Comment #3 from Andi Kleen <andi-gcc at firstfloor dot org> 2010-10-26 10:28:34 UTC ---
Interesting tidbit: the file containing r600_kms_blit_copy -- which grew most
--
didn't get any profile feedback during training, there was no data file.
I generated lists and cgraph ipa dumps for the feedback, non feedback
compilations:
dumps:
http://halobates.de/tmp/20percent/r600_blit_kms.c.000i.cgraph-plain
http://halobates.de/tmp/20percent/r600_blit_kms.c.000i.cgraph-feedback
listings:
http://halobates.de/tmp/20percent/r600_blit_kms.lst-plain
http://halobates.de/tmp/20percent/r600_blit_kms.lst-feedback
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/46176] profile feedback causes 20% linux kernel binary growth
2010-10-25 22:55 [Bug middle-end/46176] New: profile feedback causes 20% linux kernel binary growth andi-gcc at firstfloor dot org
` (2 preceding siblings ...)
2010-10-26 10:28 ` andi-gcc at firstfloor dot org
@ 2014-09-26 17:43 ` andi-gcc at firstfloor dot org
3 siblings, 0 replies; 5+ messages in thread
From: andi-gcc at firstfloor dot org @ 2014-09-26 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46176
Andi Kleen <andi-gcc at firstfloor dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Andi Kleen <andi-gcc at firstfloor dot org> ---
I think this were broken profile feedback files.
I'll reopen if it happens again.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-26 17:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-25 22:55 [Bug middle-end/46176] New: profile feedback causes 20% linux kernel binary growth andi-gcc at firstfloor dot org
2010-10-25 22:57 ` [Bug middle-end/46176] " pinskia at gcc dot gnu.org
2010-10-26 8:01 ` andi-gcc at firstfloor dot org
2010-10-26 10:28 ` andi-gcc at firstfloor dot org
2014-09-26 17:43 ` andi-gcc at firstfloor dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).