Profiling local builds

As of March 2018, profiling local builds on Windows should work out of the box, with full symbol information. In the past you had to need to run mach buildsymbols manually, but this is no longer needed. The profiler automatically reads symbols from the pdb files that are generated during the build process.

You probably need a 64 bit build of Firefox for this to work, though. It looks like we consume too much memory when creating the symbol table for this to work in 32 bit Firefox builds. Unfortunately, 32 bit is still the default when building Firefox locally. You need to add the lines ac_add_options --target=x86_64-pc-mingw32 and ac_add_options --host=x86_64-pc-mingw32 to your mozconfig in order to build a 64 bit build of Firefox.

Profiling local talos runs

If you would like to use the Gecko Profiler with a local talos run of a local build of Firefox for Windows, you will need to point talos to a zipfile containing breakpad-style symbols for your build. Follow the steps below:

NOTE: You only need to do this if you're on Windows and you've built Firefox yourself. For any official release of Firefox (Nightly, Beta, etc), you do not need to use these steps.

  1. Make sure you don't have ac_add_options --disable-crashreporter in your Firefox .mozconfig file.
  2. If you're building a Beta or Release channel version, and you want proper C++ callstacks in your profiles, add ac_add_options --enable-profiling to your Firefox .mozconfig file. You don't need to do this if you're building Nightly, because --enable-profiling is the default on Nightly.
  3. Build Firefox as usual, e.g. using ./mach build.
  4. Generate the Breakpad symbol files by running ./mach buildsymbols: /en/Building_Firefox_with_Debug_Symbols#Breakpad_symbol_files
  5. This will have created symbols under $OBJDIR/dist/ , named after the binary name, architecture and version, so something like "firefox-40.0a1.en-US-win32.crashreporter-symbols.zip"
    Point talos to this zipfile by passing its path to the --symbolsPath flag.