Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 evaluate the
16 *build* target of client.mk with *MOZ_PGO* defined. e.g.::
18 $ make -f client.mk MOZ_PGO=1
20 This is equivalent to::
22 $ make -f client.mk profiledbuild
24 Which is roughly equivalent to:
26 #. Perform a build with *MOZ_PROFILE_GENERATE=1* and *MOZ_PGO_INSTRUMENTED=1*
27 #. Package with *MOZ_PGO_INSTRUMENTED=1*
28 #. Performing a run of the instrumented binaries
29 #. $ make maybe_clobber_profiledbuild
30 #. Perform a build with *MOZ_PROFILE_USE=1*
32 Differences between toolchains
33 ==============================
35 There are some implementation differences depending on the compiler
36 toolchain being used.
38 The *maybe_clobber_profiledbuild* step gets its name because of a
39 difference. On Windows, this step merely moves some *.pgc* files around.
40 Using GCC or Clang, it is equivalent to a *make clean*.