Generate trampolines based on signatures (#947)
* Generate trampolines based on signatures Instead of generating a trampoline-per-function generate a trampoline-per-signature. This should hopefully greatly increase the cache hit rate on trampolines within a module and avoid generating a function-per-function. * Update crates/runtime/src/traphandlers.rs Co-Authored-By: Sergei Pepyakin <s.pepyakin@gmail.com> Co-authored-by: Sergei Pepyakin <s.pepyakin@gmail.com>
This commit is contained in:
@@ -160,7 +160,7 @@ impl WrappedCallable for WasmtimeFn {
|
||||
let exec_code_buf = self
|
||||
.store
|
||||
.compiler_mut()
|
||||
.get_published_trampoline(body, &signature, value_size)
|
||||
.get_published_trampoline(&signature, value_size)
|
||||
.map_err(|e| Trap::new(format!("trampoline error: {:?}", e)))?;
|
||||
|
||||
// Call the trampoline.
|
||||
@@ -169,6 +169,7 @@ impl WrappedCallable for WasmtimeFn {
|
||||
vmctx,
|
||||
ptr::null_mut(),
|
||||
exec_code_buf,
|
||||
body,
|
||||
values_vec.as_mut_ptr() as *mut u8,
|
||||
)
|
||||
} {
|
||||
|
||||
Reference in New Issue
Block a user