a small fact about the LTO work done for gcc 4.7: it can now LTO linux as well (needs a few minutes and a few GBs of memory on a quad-core SNB). that's quite an achievement compared to previous versions (4.5 dies an honourable death, 4.6 produces lots of symbol related errors after consuming 40 mins and 11GB of memory).
Posted Mar 23, 2012 2:33 UTC (Fri) by scientes (guest, #83068)
[Link]
This is for linux modules right?
GCC celebrates 25 years with the 4.7.0 release
Posted Mar 23, 2012 8:18 UTC (Fri) by PaXTeam (subscriber, #24616)
[Link]
nope ;)
$ size linux-3.3-pax*/vmlinux
text data bss dec hex filename
13552485 9980097 3715072 27247654 19fc426 linux-3.3-pax-clang/vmlinux
13434172 7919561 3796992 25150725 17fc505 linux-3.3-pax-lto/vmlinux
14145894 9323349 3776512 27245755 19fbcbb linux-3.3-pax/vmlinux
GCC celebrates 25 years with the 4.7.0 release
Posted Mar 23, 2012 9:08 UTC (Fri) by engla (guest, #47454)
[Link]
Any performance improvements with LTO?
GCC celebrates 25 years with the 4.7.0 release
Posted Mar 23, 2012 10:11 UTC (Fri) by PaXTeam (subscriber, #24616)
[Link]
i didn't do any benchmarks so i can't tell. note also that the above kernels don't have the exact same config due to some yet-to-be-fixed deficiences with LTO or clang (e.g., the LTO kernel above didn't have KALLSYMS/KPROBES/FUNCTION_TRACER enabled and the clang one didn't use the PaX gcc plugins for obvious reasons).
GCC celebrates 25 years with the 4.7.0 release
Posted Mar 25, 2012 1:07 UTC (Sun) by nix (subscriber, #2304)
[Link]
I frankly doubt you'd see enormous improvements in non-pathological benchmarks anyway, because the kernel is not the predominant consumer of CPU time in most benchmarks, and LTO will do nothing to improve locality of reference or any of the heaps of algorithmic things which a kernel has to deal with and which really do take time. You'd probably see an improvement from reduction in icache pressure though, but I have no idea how big it might be. Probably minimal, but one can hope.
As always, the numbers will tell.
GCC celebrates 25 years with the 4.7.0 release
Posted Mar 23, 2012 16:04 UTC (Fri) by slashdot (guest, #22014)
[Link]
What's causing the massive .data size differences?
GCC celebrates 25 years with the 4.7.0 release
Posted Mar 23, 2012 23:58 UTC (Fri) by PaXTeam (subscriber, #24616)
[Link]
some of it is due to the .config difference, some of it is genuine LTO but i don't have numbers for same .config compilations now, sorry.
GCC celebrates 25 years with the 4.7.0 release
Posted Apr 6, 2012 18:33 UTC (Fri) by nathanwm (guest, #83115)
[Link]
Could you guys release the clang patches for the kernel? I plan on implementing a distro based on llvm, mclinker, toybox and various other bits with a preference for code quality.
GCC celebrates 25 years with the 4.7.0 release
Posted Apr 7, 2012 21:12 UTC (Sat) by PaXTeam (subscriber, #24616)
[Link]
oh boy, next time better email me directly please, it's only by luck that i caught this in rss ;). as for the patches, i did submit them last year to the cfe-dev list, only a few things changed since. if you're in a hurry for an up-to-date version (against linux 3.3.1) then email me please (lwn doesn't reveal your email address).
one of these days i'd also like to post an update now that llvm/clang 3.1 is nearing completion, i just have to finish my default argument support patch for asm macros so that we may then be able to use integrated-as for linux.
GCC celebrates 25 years with the 4.7.0 release
Posted Mar 23, 2012 8:14 UTC (Fri) by jezuch (subscriber, #52988)
[Link]
> a small fact about the LTO work done for gcc 4.7: it can now LTO linux as well
Are there any instructions on how to do this? I tried and failed several times, just not familiar enough with the Linux build system :)
> (needs a few minutes and a few GBs of memory on a quad-core SNB)
Actually, as odd as it sounds, I bought extra RAM for my computer specifically to be able to compile things with LTO... GCC 4.7 vastly reduces memory usage of LTO but no, Chromium still does not fit ;)
GCC celebrates 25 years with the 4.7.0 release
Posted Mar 23, 2012 10:13 UTC (Fri) by PaXTeam (subscriber, #24616)
[Link]
i don't know of any public instructions for LTO'ing linux, i had to work it out myself. it needs a somewhat ugly 50k patch including a gcc plugin (on top of PaX which has the gcc plugin build infrastructure).
GCC celebrates 25 years with the 4.7.0 release
Posted Mar 23, 2012 12:20 UTC (Fri) by grobian (guest, #83608)
[Link]