diff --git a/.gitignore b/.gitignore index 38fc795e7da8..bd3e923d40dd 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ tests/all/pulley_provenance_test.cwasm /artifacts testcase*.wat testcase*.wasm +perf.data* diff --git a/crates/wasmtime/src/runtime/func.rs b/crates/wasmtime/src/runtime/func.rs index b6bf00325c63..7652eea62ea0 100644 --- a/crates/wasmtime/src/runtime/func.rs +++ b/crates/wasmtime/src/runtime/func.rs @@ -943,6 +943,7 @@ impl Func { /// `StoreOpaque` while the `FuncType` is also being used (from the /// perspective of the borrow-checker) because otherwise the signature would /// consider `StoreOpaque` borrowed mutable while `FuncType` is in use. + #[inline] fn ty_ref<'a>(&self, store: &'a mut StoreOpaque) -> (&'a FuncType, &'a StoreOpaque) { // If we haven't loaded our type into the store yet then do so lazily at // this time. @@ -1737,6 +1738,7 @@ impl EntryStoreContext { /// function through this type's `Drop` implementation. This ensures that we /// even restore the values if we unwind the stack (e.g., because we are /// panicing out of a Wasm execution). + #[inline] fn exit_wasm(&mut self) { unsafe { if let Some(limit) = self.stack_limit { @@ -1751,6 +1753,7 @@ impl EntryStoreContext { } impl Drop for EntryStoreContext { + #[inline] fn drop(&mut self) { self.exit_wasm(); } diff --git a/crates/wasmtime/src/runtime/func/typed.rs b/crates/wasmtime/src/runtime/func/typed.rs index 8936bd5fd2cd..a5fb841dec49 100644 --- a/crates/wasmtime/src/runtime/func/typed.rs +++ b/crates/wasmtime/src/runtime/func/typed.rs @@ -93,6 +93,7 @@ where /// connected to an asynchronous store. /// /// [`Trap`]: crate::Trap + #[inline] pub fn call(&self, mut store: impl AsContextMut, params: Params) -> Result { let mut store = store.as_context_mut(); assert!( diff --git a/crates/wasmtime/src/runtime/types.rs b/crates/wasmtime/src/runtime/types.rs index 8c9a5258e555..9651548c196c 100644 --- a/crates/wasmtime/src/runtime/types.rs +++ b/crates/wasmtime/src/runtime/types.rs @@ -2384,6 +2384,7 @@ impl FuncType { } #[cfg(feature = "gc")] + #[inline] pub(crate) fn as_wasm_func_type(&self) -> &WasmFuncType { self.registered_type.unwrap_func() } diff --git a/crates/wasmtime/src/runtime/vm/vmcontext.rs b/crates/wasmtime/src/runtime/vm/vmcontext.rs index a49cccf02cb7..99177d3de4ba 100644 --- a/crates/wasmtime/src/runtime/vm/vmcontext.rs +++ b/crates/wasmtime/src/runtime/vm/vmcontext.rs @@ -833,6 +833,7 @@ impl VMFuncRef { /// /// Note that the unsafety invariants to maintain here are not currently /// exhaustively documented. + #[inline] pub unsafe fn array_call( &self, pulley: Option>, @@ -867,6 +868,7 @@ impl VMFuncRef { ) } + #[inline] unsafe fn array_call_native( &self, caller: NonNull,