Skip to content

Commit 5cc7355

Browse files
authored
Reduce verbosity of function and statement span (rust-lang#2028)
We should probably only use info for stats, major compilation steps, and summary of some operations. This reduces the compiler verbosity quite a bit when user runs Kani with --verbose.
1 parent 25fbe27 commit 5cc7355

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kani-compiler/src/codegen_cprover_gotoc/codegen/statement.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc_middle::ty::layout::LayoutOf;
1818
use rustc_middle::ty::{Instance, InstanceDef, Ty};
1919
use rustc_span::Span;
2020
use rustc_target::abi::{FieldsShape, Primitive, TagEncoding, Variants};
21-
use tracing::{debug, info_span, trace};
21+
use tracing::{debug, debug_span, trace};
2222

2323
impl<'tcx> GotocCtx<'tcx> {
2424
/// Generate Goto-C for MIR [Statement]s.
@@ -27,7 +27,7 @@ impl<'tcx> GotocCtx<'tcx> {
2727
///
2828
/// See [GotocCtx::codegen_terminator] for those.
2929
pub fn codegen_statement(&mut self, stmt: &Statement<'tcx>) -> Stmt {
30-
let _trace_span = info_span!("CodegenStatement", statement = ?stmt).entered();
30+
let _trace_span = debug_span!("CodegenStatement", statement = ?stmt).entered();
3131
debug!(?stmt, kind=?stmt.kind, "handling_statement");
3232
let location = self.codegen_span(&stmt.source_info.span);
3333
match &stmt.kind {
@@ -159,7 +159,7 @@ impl<'tcx> GotocCtx<'tcx> {
159159
/// See also [`GotocCtx::codegen_statement`] for ordinary [Statement]s.
160160
pub fn codegen_terminator(&mut self, term: &Terminator<'tcx>) -> Stmt {
161161
let loc = self.codegen_span(&term.source_info.span);
162-
let _trace_span = info_span!("CodegenTerminator", statement = ?term.kind).entered();
162+
let _trace_span = debug_span!("CodegenTerminator", statement = ?term.kind).entered();
163163
debug!("handling terminator {:?}", term);
164164
//TODO: Instead of doing location::none(), and updating, just putit in when we make the stmt.
165165
match &term.kind {

0 commit comments

Comments
 (0)