3 ===========================
4 Profile Guided Optimization
5 ===========================
7 :abbr:`PGO (Profile Guided Optimization)` is the process of adding
8 probes to a compiled binary, running said binary, then using the
9 run-time information to *recompile* the binary to (hopefully) make it
15 The supported interface for invoking a PGO build is to add ``MOZ_PGO=1`` to
16 configure flags and then build. e.g. in your mozconfig::
18 ac_add_options MOZ_PGO=1
24 This is roughly equivalent to::
26 #. Perform a build with *--enable-profile-generate* in $topobjdir/instrumented
27 #. Perform a run of the instrumented binaries with build/pgo/profileserver.py
28 #. Perform a build with *--enable-profile-use* in $topobjdir