@Dan Gohman mind if I ping you again on https://github.com/bytecodealliance/wasmtime/pull/957? If you're busy also no worries! I can tag in someone else to review
Ah, thanks for the ping! I can take a look.
https://github.com/alexcrichton/wasmtime/pull/25 is a PR for your PR ;-). I set out to just see what breaks if I removed the Arc
but then happened to find a way to make it not break.
oh nice, I'm a fan :)
/me is really dubious of as
converting from a raw pointer to a smaller integer.
Do I understand correctly that with this PR, the trampolines are part of the code that is cached? So that in the cache-hit case, we don't have to generate a trampoline on the fly?
@Dan Gohman we'd generate a trampoline per-module
and per-Func::new
so there's no caching across modules
for the per-module ones though, those are cached along with their modules, right?
@Dan Gohman correct yeah, it's all part of the same CodeMemory
allocation
the module's functions are all precisely known in their size, and the trampolines are a little more dynamic, but it's all allocated in one chunk before publishing
publishing being switching to W^X
er, executable
Ok. The PR looks good to me, other than the pointer issue we discussed above.
@Dan Gohman ok thanks! mind leaving a comment to that effect?
sure
Last updated: Nov 22 2024 at 16:03 UTC