Report wasm function tier correctly to profiler with lazy tiering
Categories
(Core :: JavaScript: WebAssembly, task, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox136 | --- | fixed |
People
(Reporter: rhunt, Assigned: jpages)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
We use this function [1] when profiling wasm code to figure out which tier a function belongs to. It's a bit of a hack that uses the codeRange_ pointer that the ProfilingFrameIter [2] has lying around to figure out which tier it's on. It does this by searching all the CodeRangeVector's that the CodeBlock's on a Code have to find where the CodeRange pointer came from. It searches just the two 'complete' tiers that we have when we're not doing lazy tiering.
With lazy tiering we may have hundreds of code blocks, so searching through them all will not be efficient. We should rework this to support lazy tiering and just be faster too.
Here's an idea:
- Add a
Category category_field to ProfilingFrameIter - Change all uses of wasm::LookupCode in ProfilingFrameIter to use wasm::LookupCodeBlock and then get a profiling category from the CodeBlock::kind field. Store that in the category_ field.
- Return this category field from the accessor.
[1] https://searchfox.org/mozilla-central/rev/6597dd03bad82c891d084eed25cafd0c85fb333e/js/src/wasm/WasmCode.cpp#1384
[2] https://searchfox.org/mozilla-central/rev/6597dd03bad82c891d084eed25cafd0c85fb333e/js/src/wasm/WasmFrameIter.cpp#2009
| Assignee | ||
Comment 1•1 year ago
|
||
| Assignee | ||
Comment 2•1 year ago
|
||
Added a patch for this issue, it seems to correctly display which compiler is used in https://bugzilla.mozilla.org/show_bug.cgi?id=1939425
Comment 4•1 year ago
|
||
Backed out for causing sm bustages in WasmFrameIter.cpp.
- Backout link
- Push with failures
- Failure Log
- Failure line: INFO stderr 2> [27219] Assertion failure: codeRange_, at /builds/worker/checkouts/gecko/js/src/wasm/WasmFrameIter.cpp:1703
| Assignee | ||
Updated•1 year ago
|
Comment 6•1 year ago
|
||
| bugherder | ||
Description
•