New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 735513 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Decouple wasm linking from debug-specific information

Project Member Reported by mtrofin@chromium.org, Jun 21 2017

Issue description

We currently* rely on source position information to link a wasm instance's functions and imports. To reduce memory pressure, we want to eventually move non-runtime critical information offline, and make it available on-demand (either when needed at runtime/debug time, or enabled only if developer wants)


*post https://codereview.chromium.org/2627613002. We can likely reuse the previous strategy, the complexity was O(n*log(n)) - there's only one map constructed per module instance, not per function.
 
One thing to consider: In the lazy compilation case (for asm.js), we actually generate code that always calls the illegal builtin, and later patch this to call the right wasm functions (https://cs.chromium.org/chromium/src/v8/src/compiler/wasm-compiler.cc?rcl=165c183f7c47e7ff100baa5dd4d96948e239460b&l=2223).
This would also need to change if we want to go back to the old approach.

Also, during serialization, we currently emit imported functions, as the wrappers are recreated at instantiation time anyway (see also  crbug.com/735509 ). Without using the call index from the wire bytes, we would need to emit something there which allows us to identify the import to be called.
We're currently using lazy for asm.js, where serialization isn't supported. If we decide to extend lazy to wasm, then the PoR was to serialize fully-compiled modules, meaning serialization would first ensure everything is compiled.
The problem with lazy compilation is not about serialization, but about code generation. We would need to emit the correct calls when building the graph, instead of always calling the illegal builtin, and patching this later. 
Components: Blink>JavaScript>WebAssembly
Labels: -Type-Bug Type-Feature
Project Member

Comment 5 by sheriffbot@chromium.org, Jul 3

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Fixed (was: Untriaged)
This is fixed. We don't use the wire bytes any more for relocation. We still keep them currently for debugging and lazy compilation.

Sign in to add a comment