New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 606307 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: May 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 605423



Sign in to add a comment

clang with afdo is memory hungry

Project Member Reported by laszio@chromium.org, Apr 25 2016

Issue description

It eats more than 3GB memory on a hello_world.cc.

This is easily reproducible using the clang/llvm in the chroot, where the afdo_file is generated from some large perf.data + unstripped chrome binary:

(Don't use the built-in 'time' in bash.)
$ time -f "%E\t%M KB" clang++ hello_world.cc -fprofile-sample-use=afdo_file
0:02.92 3223044 KB # more than 3GB!

However, a vanilla release_3.8/HEAD clang/llvm/compiler_rt is fine:
0:00.64 183640 KB

Although it's still much larger than one without afdo:
0:00.21 20756 KB

 
what happens with a large chrome source file? can you do the same experiment and show the numbers?

Comment 2 by laszio@chromium.org, Apr 26 2016

It seems that the difference of memory usage between afdo and non-afdo is not related to the size of source file being compiled.

Results from a c++ file which is more than 120000 lines after macro expension:
non-afdo: 154736 KB
    afdo: 315408 KB
    diff: 160672 KB

compared to hello_world:
non-afdo:  20756 KB
    afdo: 183640 KB
    diff: 162884 KB
ok, so I assume it is related to the size of the AFDO file.
160 MB is quite large. Can you compare against GCC?


Together with build time, the memory usage comparison can be found at

https://docs.google.com/a/google.com/spreadsheets/d/10hCRTmkFid4Ho2oQCLTI7Ia1_bebpc-PlpJhC13Vqog/edit?usp=sharing

Comment 5 by laszio@chromium.org, May 31 2016

Status: Verified (was: Assigned)
Fixed in https://chromium-review.googlesource.com/#/c/341336/

Sign in to add a comment