Closed Bug 1721109 Opened 5 years ago Closed 4 years ago

Preparations for profiler-get-symbols update

Categories

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

task

Tracking

(firefox92 fixed)

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(22 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

To fix bug 1615066, we'll need to make ProfilerGetSymbols.jsm use a new version of the profiler-get-symbols wasm blob. This new version has a very different API, because it lays the groundwork for adding a queryAPI endpoint which can look up symbols for multiple libraries in a single request. Specifically, the API wants to do two things in the worker which currently happen outside the worker:

  • Resolution of (debugName, breakpadId) to absolute paths
  • Trying multiple candidate paths, to satisfy the "check objdirs first" use case.

The patches in this bug will incrementally transform our current code into a state where these two things happen inside the worker. Then the actual update in bug 1615066 will be simple.

This reduces some code duplication.

Depends on D120168

At some point in the future, I'm planning to add another method to the SymbolicationService interface: queryAPI.

Depends on D120169

This may look odd now but it's a temporary step on the way to the final state.

Depends on D120173

The old version didn't have Worker.onmessageerror in its DOM type definitions.

Depends on D120180

After I wrote this patch, I noticed that the worker isn't actually covered
by TypeScript because it doesn't have a // @ts-check comment.
But it seems to be rather non-trivial to make it pass type checking, especially
around module import. For example, I don't know how to tell TypeScript that
this code runs in a worker global scope which has an importScripts function.

So I'm just going to leave the worker uncovered for now. I hope the JSDoc
comment doesn't give the wrong impression.

Depends on D120183

Depends on D120185

This prepares the worker for an upcoming update to a new profiler-get-symbols version;
this way of doing things is a much better match for the new API.

For requesting a single symbol table, this may look unnecessarily complicated, and it is.
But it paves the way for requesting symbols for multiple libraries in a single message.
In the future, rather than requesting a full symbol table for a single library, we will
want to have a queryAPI endpoint which lets us request symbols for multiple libraries
with a single message. This is just elaborate preparation for that step.

Depends on D120187

Severity: -- → N/A
Priority: -- → P3
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/efe0ed0e5769 Split createLibraryMap into two functions. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/f0c04013013d Move sharedLibraries extraction out of createMultiModalGetSymbolTableFn. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/4b795784be29 Use createMultiModalGetSymbolTableFn from captureProfile. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/096b151037d1 Rename createMultiModalGetSymbolTableFn to createLocalSymbolicationService and wrap the getSymbolTable function in SymbolicationService interface. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/592c5a8ec505 Move createLocalSymbolicationService into symbolication.jsm.js. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/74d7ec05b2b8 Create a LocalSymbolicationService class. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/90bf89c32c9b Check all local files in the same loop, both files in objdirs and the regular absolute path of the library. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/21c92c047f03 Move getSymbolTableMultiModal into the getSymbolTable method. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/e5dd46eb98b0 Make getCandidatePaths a method of LocalSymbolicationService. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/904a2cc6d4e3 Split out LocalSymbolicationServiceWithRemoteSymbolTableFallback. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/d4a18b255872 Move library lookup into _getCandidatePaths. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/62c17de83b93 Stop using createLibraryMap in LocalSymbolicationServiceWithRemoteSymbolTableFallback. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/f7455f096478 Make the geckoProfiler WebExtension API use createLocalSymbolicationService. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/09b3ee7ff4b3 Update TypeScript dependencies. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/ca3603e1f06e Move ProfilerGetSymbols code out of toolkit/components/extensions and into devtools directories. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/513ef908c863 Split getResultFromWorker out of getSymbolTableFromLocalBinary. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/117862f83a8c Add type coverage for the initial worker message. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/3f9122389f28 Inline-away getSymbolTableFromLocalBinary. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/ff3e4abbbe0f Remove createLibraryMap. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/e8e7a7c35254 Factor out getCompactSymbolTableFromPath in the worker. r=canaltinova https://hg.mozilla.org/integration/autoland/rev/b4687ec28375 Move candidate path handling and lib info map lookup into the worker. r=canaltinova

For some reason, having a function with this name makes TypeScript show an
error for frame-script.js, which also has a function with the same name and
a different signature. Renaming the worker function fixes the TypeScript
error - even though TypeScript doesn't even check the worker script!

Pushed by ncsoregi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b598037db93c Rename this getSymbolTable function to prevent some TypeScript confusion. r=fix CLOSED TREE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: