<div dir="ltr">Hi all,<br><br>I have written a new stack-fixing tool, called `fix-stacks`, which symbolizes stack traces produced by Firefox.<br><br>`fix-stacks` is intended to replace our existing stack-fixing scripts, `fix_{linux,macosx}_stack.py` and `fix_stack_using_bpsyms.py`, which are used (a) on many test outputs, both locally and on automation, and (b) by DMD, Firefox's built-in heap profiler.<br><br>`fix-stacks` is now installed by `mach bootstrap` on Windows, Mac, and Linux. It is usable from Python code via the `fix_stacks.py` wrapper script. Its code is at <a href="https://github.com/mozilla/fix-stacks/">https://github.com/mozilla/fix-stacks/</a>.<br><br>In bug 1604095 I replaced the use of `fix_{linux,macosx}_stack.py` with `fix_stacks.py` for DMD, with the following benefits.<br><br>* On Linux, stack-fixing of DMD output files (which occurs when you run `dmd.py`) is roughly 100x faster. On my Linux box I saw reductions from 20-something minutes to ~13 seconds.<br><br>* On Mac, stack-fixing of DMD output files on Mac is roughly 10x faster. On my Mac laptop I saw reductions from ~7 minutes to ~45 seconds.<br><br>* On Windows, stack-fixing of DMD output files now occurs. (It previously did not because there is no `fix_window_stacks.py` script.) This means that DMD is now realistically usable on Windows without jumping through hoops to use breakpad symbols.<br><br>There is more work to be done. Soon, I plan to:<br><br>* use `fix-stacks` on test outputs (in `utils.py` and `<a href="http://automation.py.in">automation.py.in</a>`);<br><br>* re-enable stack fixing on Mac test runs on local builds, which is currently disabled because it is so slow;<br><br>* add breakpad symbol support to `fix-stacks`;<br><br>* remove the old scripts.<br><br>The tree of relevant bugs can be seen at<br><a href="https://bugzilla.mozilla.org/showdependencytree.cgi?id=1596292&hide_resolved=1">https://bugzilla.mozilla.org/showdependencytree.cgi?id=1596292&hide_resolved=1</a>.<br><br>The stack traces produced by `fix-stacks` are sometimes different to those produced by the old stack-fixers. In my experience these differences are minor and you won't notice them if you aren't looking for them. But let me know if you have any problems.                                <br><br>Nick</div>