Bug 1443712 - Add /d2:-cgsummary to PGO link flags; r=ted
authorGregory Szorc <gps@mozilla.com>
Tue, 06 Mar 2018 20:26:32 -0800
changeset 461995 7d7d8043d20c98f9dc62153654fdc5ee7dc335d4
parent 461994 9e8108c83a684ca15b416d0152f75c0a4822bbff
child 461996 b8b7a46f6a24a81029c6f18bce0802db060e6aa2
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1443712 - Add /d2:-cgsummary to PGO link flags; r=ted 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)