build/docs/pgo.rst

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     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*.

mercurial