Uh oh!
There was an error while loading. Please reload this page.
[wasm] Don't generate unused imports in jiterpreter traces - #83061
Conversation
Generate functions into a temporary buffer before generating all the sections, so we know which imports are used Fix estimateHeat
ghost
commented
Mar 7, 2023
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsThis PR restructures trace generation so that we generate the trace body before the rest of the module, which allows us to identify which imports are actually used and only emit those. This frees up more space for the actual trace and probably also makes instantiating the module a bit faster since it will typically have 1-8 imports instead of the dozens it does now. This should help a lot for #82963, and it also will allow #82773 to potentially do direct calls (by dynamically adding new imports) instead of indirect calls. This PR also fixes a bug that was causing the heat estimation mode to undercount failed traces.
|
This PR restructures trace generation so that we generate the trace body before the rest of the module, which allows us to identify which imports are actually used and only emit those. This frees up more space for the actual trace and probably also makes instantiating the module a bit faster since it will typically have 1-8 imports instead of the dozens it does now. This should help a lot for #82963, and it also will allow #82773 to potentially do direct calls (by dynamically adding new imports) instead of indirect calls.
This PR also fixes a bug that was causing the heat estimation mode to undercount failed traces.