clang with afdo is memory hungry |
|
Issue descriptionIt 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
,
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
,
Apr 26 2016
ok, so I assume it is related to the size of the AFDO file. 160 MB is quite large. Can you compare against GCC?
,
May 5 2016
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
,
May 31 2016
|
|
►
Sign in to add a comment |
|
Comment 1 by llozano@chromium.org
, Apr 25 2016