Bug 1443712 - Add /d2:-cgsummary to PGO link flags; r?build
This will tell us which functions PGO is spending its time in,
which functions are being optimized, and other interesting
statistics. The output is a handful of pages of text in our
current PGO builds and it seems useful for understanding the PGO
black box.
MozReview-Commit-ID: HUbAhltQrdL
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1261,17 +1261,20 @@ def pgo_flags(compiler):
# treated as an error sometimes. This might be a consequence
# of using WARNINGS_AS_ERRORS in some modules, combined
# with the linker doing most of the work in the whole-program
# optimization/PGO case. I think it's probably a compiler bug,
# but we work around it here.
use_cflags=['-GL', '-wd4624', '-wd4952'],
# XXX: should be -LTCG:PGOPTIMIZE, but that fails on libxul.
# Probably also a compiler bug, but what can you do?
- use_ldflags=['-LTCG:PGUPDATE', cgthreads],
+ # /d2:-cgsummary prints a summary of what is happening during
+ # code generation. How long individual functions are optimized,
+ # which functions are optimized, etc.
+ use_ldflags=['-LTCG:PGUPDATE', cgthreads, '-d2:-cgsummary'],
)
set_config('PROFILE_GEN_CFLAGS', pgo_flags.gen_cflags)
set_config('PROFILE_GEN_LDFLAGS', pgo_flags.gen_ldflags)
set_config('PROFILE_USE_CFLAGS', pgo_flags.use_cflags)
set_config('PROFILE_USE_LDFLAGS', pgo_flags.use_ldflags)