Skip to content

Commit a22369d

Browse files
committed
Optimize: Remove interface type for lowering validation events
1 parent 85ed29c commit a22369d

3 files changed

Lines changed: 6 additions & 12 deletions

File tree

crates/wasmtime/src/runtime/rr/backend/crimp.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@ rr_event! {
162162
ComponentInstantiation(component_events::InstantiationEvent),
163163
/// Component ABI realloc call in linear wasm memory
164164
ComponentReallocEntry(component_events::ReallocEntryEvent),
165-
/// Return from a type lowering operation
166-
ComponentLowerFlatReturn(component_events::LowerFlatReturnEvent),
167-
/// Return from a store during a type lowering operation
168-
ComponentLowerMemoryReturn(component_events::LowerMemoryReturnEvent),
169165
/// An attempt to obtain a mutable slice into Wasm linear memory
170166
ComponentMemorySliceWrite(component_events::MemorySliceWriteEvent),
171167
/// Return from a component builtin
@@ -185,6 +181,10 @@ rr_event! {
185181
ComponentLowerFlatEntry(component_events::LowerFlatEntryEvent),
186182
/// Call into type lowering for memory destination
187183
ComponentLowerMemoryEntry(component_events::LowerMemoryEntryEvent),
184+
/// Return from a type lowering operation
185+
ComponentLowerFlatReturn(component_events::LowerFlatReturnEvent),
186+
/// Return from a store during a type lowering operation
187+
ComponentLowerMemoryReturn(component_events::LowerMemoryReturnEvent),
188188
/// Call into a component builtin
189189
ComponentBuiltinEntry(component_events::BuiltinEntryEvent)
190190
}

crates/wasmtime/src/runtime/rr/backend/crimp/events/component_events.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,11 @@ pub struct ReallocEntryEvent {
5858

5959
/// Entry to a type lowering invocation to flat destination.
6060
#[derive(Debug, Clone, Serialize, Deserialize)]
61-
pub struct LowerFlatEntryEvent {
62-
pub ty: InterfaceType,
63-
}
61+
pub struct LowerFlatEntryEvent;
6462

6563
/// Entry to type lowering invocation to destination in memory.
6664
#[derive(Debug, Clone, Serialize, Deserialize)]
6765
pub struct LowerMemoryEntryEvent {
68-
pub ty: InterfaceType,
6966
pub offset: u64,
7067
}
7168

crates/wasmtime/src/runtime/rr/hooks/component_hooks.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ where
181181
cx.store
182182
.0
183183
.record_event_validation(|| LowerMemoryEntryEvent {
184-
ty,
185184
offset: offset as u64,
186185
})?;
187186
let store_result = lower_store(cx, ty, offset);
@@ -203,9 +202,7 @@ where
203202
F: FnOnce(&mut LowerContext<'_, T>, InterfaceType) -> Result<()>,
204203
{
205204
#[cfg(feature = "rr")]
206-
cx.store
207-
.0
208-
.record_event_validation(|| LowerFlatEntryEvent { ty })?;
205+
cx.store.0.record_event_validation(|| LowerFlatEntryEvent)?;
209206
let lower_result = lower(cx, ty);
210207
#[cfg(feature = "rr")]
211208
cx.store.0.record_event_validation(|| {

0 commit comments

Comments
 (0)