mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 14:25:32 +00:00
Re-enable snapshotting.
This commit is contained in:
parent
be4ea764a0
commit
dbaa000e96
@ -768,7 +768,7 @@ pub mod x64 {
|
||||
let mut results: Vec<WasmFunctionStateDump> = vec![];
|
||||
let mut was_baseline = true;
|
||||
|
||||
for i in 0.. {
|
||||
for _ in 0.. {
|
||||
let ret_addr = initial_address.take().unwrap_or_else(|| {
|
||||
let x = *stack;
|
||||
stack = stack.offset(1);
|
||||
|
@ -184,7 +184,7 @@ pub fn run_tiering<F: Fn(InteractiveShellContext) -> ShellExitOperation>(
|
||||
|
||||
baseline.context_mut().local_functions = optimized.context_mut().local_functions;
|
||||
}
|
||||
// TODO: Fix this for optimized version.
|
||||
// Assuming we do not want to do breakpoint-based debugging on optimized backends.
|
||||
let breakpoints = baseline.module.runnable_module.get_breakpoints();
|
||||
let ctx = baseline.context_mut() as *mut _;
|
||||
let ret = with_ctx(ctx, || {
|
||||
@ -209,15 +209,15 @@ pub fn run_tiering<F: Fn(InteractiveShellContext) -> ShellExitOperation>(
|
||||
}
|
||||
});
|
||||
if let Err(e) = ret {
|
||||
if let Some(new_image) = e.downcast_ref::<InstanceImage>() {
|
||||
if let Ok(new_image) = e.downcast::<InstanceImage>() {
|
||||
// Tier switch event
|
||||
if !was_sigint_triggered_fault() && opt_state.outcome.lock().unwrap().is_some()
|
||||
{
|
||||
resume_image = Some(new_image.clone());
|
||||
resume_image = Some(*new_image);
|
||||
continue;
|
||||
}
|
||||
let op = interactive_shell(InteractiveShellContext {
|
||||
image: Some(new_image.clone()),
|
||||
image: Some(*new_image),
|
||||
patched: n_versions.get() > 1,
|
||||
});
|
||||
match op {
|
||||
|
@ -705,21 +705,13 @@ fn interactive_shell(mut ctx: InteractiveShellContext) -> ShellExitOperation {
|
||||
}
|
||||
}
|
||||
"continue" | "c" => {
|
||||
if ctx.patched {
|
||||
println!("Error: Continueing execution is not yet supported on patched code.");
|
||||
if let Some(image) = ctx.image.take() {
|
||||
return ShellExitOperation::ContinueWith(image);
|
||||
} else {
|
||||
if let Some(image) = ctx.image.take() {
|
||||
return ShellExitOperation::ContinueWith(image);
|
||||
} else {
|
||||
println!("Program state not available, cannot continue execution");
|
||||
}
|
||||
println!("Program state not available, cannot continue execution");
|
||||
}
|
||||
}
|
||||
"backtrace" | "bt" => {
|
||||
if ctx.patched {
|
||||
println!("Warning: Backtrace on patched code might be inaccurate.");
|
||||
}
|
||||
|
||||
if let Some(ref image) = ctx.image {
|
||||
println!("{}", image.execution_state.colored_output());
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user