Skip to content

Conversation

@kg
Copy link
Member

@kg kg commented Mar 7, 2023

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.

kg added 2 commits March 6, 2023 17:23
Generate functions into a temporary buffer before generating all the sections, so we know which imports are used
Fix estimateHeat
@kg kg added arch-wasm WebAssembly architecture area-Codegen-Jiterpreter-mono labels Mar 7, 2023
@ghost ghost assigned kg Mar 7, 2023
@ghost
Copy link

ghost commented Mar 7, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

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.

Author: kg
Assignees: -
Labels:

arch-wasm, area-Codegen-Jiterpreter-mono

Milestone: -

@lewing lewing merged commit c9a7a2d into dotnet:main Mar 7, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants