]> git.lizzy.rs Git - rust.git/commitdiff
make basic CTFE tracing available on release builds
authorRalf Jung <post@ralfj.de>
Wed, 19 Dec 2018 09:10:39 +0000 (10:10 +0100)
committerRalf Jung <post@ralfj.de>
Wed, 19 Dec 2018 09:10:39 +0000 (10:10 +0100)
src/librustc_mir/interpret/eval_context.rs
src/librustc_mir/interpret/step.rs

index d36d530fe78b24ecdaeeddfe23c626373545e3ec..8ae0345e07a34a5da3fae486c8b1c56b35fefcf3 100644 (file)
@@ -422,7 +422,7 @@ pub fn push_stack_frame(
         return_to_block: StackPopCleanup,
     ) -> EvalResult<'tcx> {
         if self.stack.len() > 1 { // FIXME should be "> 0", printing topmost frame crashes rustc...
-            debug!("PAUSING({}) {}", self.cur_frame(), self.frame().instance);
+            info!("PAUSING({}) {}", self.cur_frame(), self.frame().instance);
         }
         ::log_settings::settings().indentation += 1;
 
@@ -491,7 +491,7 @@ pub fn push_stack_frame(
         }
 
         if self.stack.len() > 1 { // FIXME no check should be needed, but some instances ICE
-            debug!("ENTERING({}) {}", self.cur_frame(), self.frame().instance);
+            info!("ENTERING({}) {}", self.cur_frame(), self.frame().instance);
         }
 
         if self.stack.len() > self.tcx.sess.const_eval_stack_frame_limit {
@@ -503,7 +503,7 @@ pub fn push_stack_frame(
 
     pub(super) fn pop_stack_frame(&mut self) -> EvalResult<'tcx> {
         if self.stack.len() > 1 { // FIXME no check should be needed, but some instances ICE
-            debug!("LEAVING({}) {}", self.cur_frame(), self.frame().instance);
+            info!("LEAVING({}) {}", self.cur_frame(), self.frame().instance);
         }
         ::log_settings::settings().indentation -= 1;
         let frame = self.stack.pop().expect(
@@ -557,7 +557,7 @@ pub(super) fn pop_stack_frame(&mut self) -> EvalResult<'tcx> {
         }
 
         if self.stack.len() > 1 { // FIXME should be "> 0", printing topmost frame crashes rustc...
-            debug!("CONTINUING({}) {}", self.cur_frame(), self.frame().instance);
+            info!("CONTINUING({}) {}", self.cur_frame(), self.frame().instance);
         }
 
         Ok(())
index a6835e4f167380ed0cb5c525675cfb2b768cfafc..0b3f5b2678c7f817cd098fc7ae34be5ab33ebc92 100644 (file)
@@ -81,7 +81,7 @@ pub fn step(&mut self) -> EvalResult<'tcx, bool> {
     }
 
     fn statement(&mut self, stmt: &mir::Statement<'tcx>) -> EvalResult<'tcx> {
-        debug!("{:?}", stmt);
+        info!("{:?}", stmt);
 
         use rustc::mir::StatementKind::*;
 
@@ -293,7 +293,7 @@ fn eval_rvalue_into_place(
     }
 
     fn terminator(&mut self, terminator: &mir::Terminator<'tcx>) -> EvalResult<'tcx> {
-        debug!("{:?}", terminator.kind);
+        info!("{:?}", terminator.kind);
         self.tcx.span = terminator.source_info.span;
         self.memory.tcx.span = terminator.source_info.span;
 
@@ -303,7 +303,7 @@ fn terminator(&mut self, terminator: &mir::Terminator<'tcx>) -> EvalResult<'tcx>
         if !self.stack.is_empty() {
             // This should change *something*
             debug_assert!(self.cur_frame() != old_stack || self.frame().block != old_bb);
-            debug!("// {:?}", self.frame().block);
+            info!("// {:?}", self.frame().block);
         }
         Ok(())
     }