Closed Bug 1808982 Opened 3 years ago Closed 3 years ago

Update profiler-get-symbols to pick up some fixes

Categories

(DevTools :: Performance Tools (Profiler/Timeline), task)

task

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(2 files)

My immediate need is to fix bug 1805915, but the update also comes with a few other fixes. Most importantly, we'll show fewer misleading symbols in the case where we don't have any debug symbols and fall back to the symbols from the stripped binary.

As usual, the changes to profiler_get_symbols.js were auto-generated by wasm-bindgen
and do not need to be reviewed carefully.

This update comes with the following fixes and improvements:

  • For ELF files without a build ID, the fallback debug ID is now computed correctly. (fixes bug 1805915)
  • If no symbol information is available, and we fall back to a stripped binary,
    the fallback symbols are less misleading. We now show fun_1b3d4f symbols for
    functions with missing symbols, instead of taking the name of the closest
    "exported" symbol. This fixes another long-standing annoyance.
  • Symbols now have a "function_size" attribute, which is needed for the
    upcoming assembly view in order to know how many bytes to disassemble.
  • A new API path has been added: /asm/v1. This is a first implementation
    of an assembly endpoint, to be used in the upcoming assembly view in the
    profiler.

We need to implement one new method in the helper: getCandidatePathsForBinary.
This method is used to find the file which we can get the assembly code bytes from.
However, we end up listing almost the same paths in it as in getCandidatePathsForDebugFile;
the only difference is that we don't list the path to the Windows PDB file,
by not adding an entry for the lib's debugPath.

This makes symbolication work on macOS 13+ for system libraries for which the Mozilla symbol server has no symbols,
for example for system libraries from macOS Beta versions.

It also makes the /asm/v1 endpoint work for system libraries on macOS 13+.

The dyld shared cache moved to a new location in that version.

This fix matches the fix for samply in https://github.com/mstange/samply/commit/da71321c597d4499730976923a7d0695147030b7 .

Depends on D166227

Attachment #9311155 - Attachment description: Bug 1808982 - Update profiler-get-symbols wasm blob to commit 4e1a6c6c6ecdd1e2a28e2499871c4c273d2c766c. r=canaltinova → Bug 1808982 - Update profiler-get-symbols wasm blob to commit 0373708893e45e8299e58ca692764be448e3457d. r=canaltinova
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/b89625b09839 Update profiler-get-symbols wasm blob to commit 0373708893e45e8299e58ca692764be448e3457d. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/b4f3b24bbc5d Add the macOS 13 dyld shared cache path. r=canaltinova
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Duplicate of this bug: 1617247
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: