Bug 1797755 - Part 5: Use a single initial mark stack size regardless of whether...
[gecko.git] / build / docs / pgo.rst
blob722056c727d098810250adb9e8eb41facf3709ae
1 .. _pgo:
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
10 faster.
12 How PGO Builds Work
13 ===================
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
20 Then::
22     $ ./mach build
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