Stream: git-wasmtime

Topic: wasmtime / PR #2774 Compile fewer trampolines with module...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 25 2021 at 20:48):

alexcrichton opened PR #2774 from compile-fewer-trampolines to main:

Previously each module in a module-linking-using-module would compile
all the trampolines for all signatures for all modules. In forest-like
situations with lots of modules this would cause quite a few trampolines
to get compiled. The original intention was to have one global list of
trampolines for all modules in the module-linking graph that they could
all share. With the current design of module linking, however, the
intention is for modules to be relatively isolated from one another
which would make achieving this difficult.

In lieu of total sharing (which would be good for the global scope
anyway but we also don't do that right now) this commit implements an
alternative strategy where each module simply compiles its own
trampolines that it itself can reach. This should mean that
module-linking modules behave more similarly to standalone modules in
terms of trampoline duplication. If we ever do global trampoline
deduplication we can likely batch this all together into one, but for
now this should fix the performance issues seen in fuzzing.

Closes #2525

view this post on Zulip Wasmtime GitHub notifications bot (Mar 25 2021 at 21:16):

peterhuene submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 26 2021 at 00:11):

alexcrichton merged PR #2774.


Last updated: Dec 23 2024 at 12:05 UTC