Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimize memory recording #84

Merged
merged 13 commits into from
Jun 29, 2024
4 changes: 3 additions & 1 deletion src/tracing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ impl TracingInspector {
})
.expect("is valid opcode;");

let prev_recorded_memory = trace.trace.steps.last().map(|step| step.memory.clone());
mattsse marked this conversation as resolved.
Show resolved Hide resolved

let memory = self
.config
.record_memory_snapshots
Expand All @@ -356,7 +358,7 @@ impl TracingInspector {
if is_memory_modified {
Some(RecordedMemory::new(interp.shared_memory.context_memory().to_vec()))
} else {
None
prev_recorded_memory
}
})
.unwrap_or_default();
Expand Down