From cecae8050eb30f282c574867ffd84e9a2bbf8e45 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 30 May 2016 13:40:46 +0200 Subject: [PATCH] remove unnecessary printlns for benchmarks --- src/interpreter.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/interpreter.rs b/src/interpreter.rs index d83c8eb2da8f..8e8565b50c55 100644 --- a/src/interpreter.rs +++ b/src/interpreter.rs @@ -1422,12 +1422,16 @@ pub fn interpret_start_points<'a, 'tcx>( if attr.check_name("miri_run") { let item = tcx.map.expect_item(id); - println!("Interpreting: {}", item.name); + if TRACE_EXECUTION { + println!("Interpreting: {}", item.name); + } let mut gecx = GlobalEvalContext::new(tcx, mir_map); let mut fecx = FnEvalContext::new(&mut gecx); match fecx.call_nested(mir) { - Ok(Some(return_ptr)) => fecx.memory.dump(return_ptr.alloc_id), + Ok(Some(return_ptr)) => if TRACE_EXECUTION { + fecx.memory.dump(return_ptr.alloc_id); + }, Ok(None) => println!("(diverging function returned)"), Err(_e) => { // TODO(solson): Detect whether the error was already reported or not. @@ -1435,7 +1439,9 @@ pub fn interpret_start_points<'a, 'tcx>( } } - println!(""); + if TRACE_EXECUTION { + println!(""); + } } } }