On 03/27/2014 10:48 AM, Martin Liška wrote:
Previous patch is wrong, I did a mistake in name ;)
Martin
On 03/27/2014 09:52 AM, Martin Liška wrote:
On 03/25/2014 09:50 PM, Jan Hubicka wrote:
Hello,
I've been compiling Chromium with LTO and I noticed that WPA
stream_out forks and do parallel:
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg02621.html.
I am unable to fit in 16GB memory: ld uses about 8GB and lto1 about
6GB. When WPA start to fork, memory consumption increases so that
lto1 is killed. I would appreciate an --param option to disable this
WPA fork. The number of forks is taken from build system (-flto=9)
which is fine for ltrans phase, because LD releases aforementioned
8GB.
What do you think about that?
I can take a look - our measurements suggested that the WPA memory will
be later dominated by ltrans. Perhaps Chromium does something that
makes
WPA to explode that would be interesting to analyze. I did not managed
to get through Chromium LTO build process recently (ninja builds are
not
my friends), can you send me the instructions?
Honza
Thanks,
Martin
There are instructions how can one build chromium with LTO:
1) install depot-tools and export PATH variable according to guide:
http://www.chromium.org/developers/how-tos/install-depot-tools
2) Checkout source code: gclient sync; cd src
3) Apply patch (enables system gold linker and disables LTO for a
sandbox that uses top-level asm)
4) which ld should point to ld.gold
5) unsure that ld.bfd points to ld.bfd
6) run: build/gyp_chromium -Dwerror=
7) ninja -C out/Release chrome -jX
If there are any problems, follow:
https://code.google.com/p/chromium/wiki/LinuxBuildInstructions
Martin
Hello,
taking latest trunk gcc, I built Firefox and Chromium. Both projects
compiled without debugging symbols and -O2 on an 8-core machine.
Firefox:
-flto=9, peak memory usage (in LTRANS): 11GB
Chromium:
-flto=6, peak memory usage (in parallel WPA phase ): 16.5GB
For details please see attached with graphs. The attachment contains
also -fmem-report and -fmem-report-wpa.
I think reduced memory footprint to ~3.5GB is a bit optimistic:
http://gcc.gnu.org/gcc-4.9/changes.html
Is there any way we can reduce the memory footprint?
Attachment (due to size restriction):
https://drive.google.com/file/d/0B0pisUJ80pO1bnV5V0RtWXJkaVU/edit?usp=sharing
Thank you,
Martin