"Fossies" - the Fresh Open Source Software Archive

Member "firefox-69.0.1/build/docs/pgo.rst" (17 Sep 2019, 1102 Bytes) of package /linux/www/firefox-69.0.1.source.tar.xz:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the last Fossies "Diffs" side-by-side code changes report for "pgo.rst": 60.7.2_vs_68.0.

Profile Guided Optimization

PGO (Profile Guided Optimization) is the process of adding probes to a compiled binary, running said binary, then using the run-time information to recompile the binary to (hopefully) make it faster.

How PGO Builds Work

The supported interface for invoking a PGO build is to add MOZ_PGO=1 to configure flags and then build. e.g. in your mozconfig:

ac_add_options MOZ_PGO=1


$ ./mach build

This is roughly equivalent to:

#. Perform a build with *MOZ_PROFILE_GENERATE=1*
#. Performing a run of the instrumented binaries
#. $ make maybe_clobber_profiledbuild
#. Perform a build with *MOZ_PROFILE_USE=1*

Differences between toolchains

There are some implementation differences depending on the compiler toolchain being used.

The maybe_clobber_profiledbuild step gets its name because of a difference. On Windows, this step merely moves some .pgc files around. Using GCC or Clang, it is equivalent to a make clean.