Profiling local talos runs
If you would like to use the built-in 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.
- Add
ac_add_options --enable-profiling
to your Firefox .mozconfig file.- If building Firefox 4 or earlier, enable the debug symbols (this became the default with Firefox 5): https://developer.mozilla.org/en/Building_Firefox_with_Debug_Symbols
- Generate the Breakpad symbol files by running
./mach buildsymbols
: https://developer.mozilla.org/en/Building_Firefox_with_Debug_Symbols#Breakpad_symbol_files - 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.
Profiling local builds (without using talos)
If you would like to use the built-in Gecko Profiler with a local build of Firefox for Windows, you will need to point the profiler to a local Snappy Symbolication Server instead of the official Mozilla symbolication server. The server will host the local Firefox symbols for the profiler and it will fetch any symbols not available locally from the official Mozilla symbolication server (e.g. symbols for Windows DLLs and plugin DLLs).
NOTE: You only need to run a local symbolication server if you're on Windows and you've built Firefox yourself. For any official release of Firefox (Nightly, Beta, etc), you do not need a local symbolication server.
How to deploy the Snappy Symbolication Server locally:
- Add
ac_add_options --enable-profiling
to your Firefox .mozconfig file.- Note that
buildsymbols
won't work if you haveac_add_options --disable-crashreporter
in your .mozconfig file - If you're using Firefox pre-5.0, you should enable debug symbols: https://developer.mozilla.org/en/Building_Firefox_with_Debug_Symbols
- Note that
- Generate the Breakpad symbol files by running
./mach buildsymbols
: https://developer.mozilla.org/en/Building_Firefox_with_Debug_Symbols#Breakpad_symbol_files - Get a copy of the Snappy Symbolication Server source code:
git clone git://github.com/mozilla/Snappy-Symbolication-Server.git
- Install pip
- Run
pip install tornado futures
- Edit the server's sample.ini configuration file:
- Set the
Firefox
symbol path to the newly generated Breakpad symbol files, for example:
Firefox = C:\mozilla-central\objdir\dist\crashreporter-symbols\
- Third party symbols such as Windows DLLs are hosted on Mozilla's servers, so set
Windows
to any empty directory on your drive. For example:
Windows = C:\Temp
You should do the same for theThunderbird
symbol path (unless you're trying to profile Thunderbird, of course):
Thunderbird = C:\Temp
- Uncomment the
remoteSymbolServer
line by removing the semi-colon - Clear out the value in the MozillaS3 line under the "SymbolURLs" category to:
MozillaS3 =
- Set the
- Run the server as follows. You will need to have Python 2.7 installed (https://www.python.org/getit/windows/):
python symbolicationWebService.py sample.ini
- Point the Gecko Profiler extension to the local symbolication server by adding a new string property "
profiler.symbolicationUrl
" to your browser's about:config page. Set the property value tohttps://127.0.0.1:8000
You should now be able to get full Windows and Firefox symbols in your profiler traces. If you run into issues with the server, you can make logging more verbose by changing the enableTracing
setting in the sample.ini
config file to 1
instead of 0
.