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

Use debug log level for developer oriented logs #82029

Merged
merged 1 commit into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_mir/src/transform/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl Inliner<'tcx> {
}
}

#[instrument(skip(self, caller_body))]
#[instrument(level = "debug", skip(self, caller_body))]
fn is_mir_available(&self, callee: Instance<'tcx>, caller_body: &Body<'tcx>) -> bool {
match callee.def {
InstanceDef::Item(_) => {
Expand Down Expand Up @@ -258,7 +258,7 @@ impl Inliner<'tcx> {
None
}

#[instrument(skip(self, callee_body))]
#[instrument(level = "debug", skip(self, callee_body))]
fn should_inline(&self, callsite: CallSite<'tcx>, callee_body: &Body<'tcx>) -> bool {
let tcx = self.tcx;

Expand Down
7 changes: 5 additions & 2 deletions compiler/rustc_mir/src/transform/inline/cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use rustc_middle::ty::{self, subst::SubstsRef, InstanceDef, TyCtxt};

// FIXME: check whether it is cheaper to precompute the entire call graph instead of invoking
// this query riddiculously often.
#[instrument(skip(tcx, root, target))]
#[instrument(level = "debug", skip(tcx, root, target))]
crate fn mir_callgraph_reachable(
tcx: TyCtxt<'tcx>,
(root, target): (ty::Instance<'tcx>, LocalDefId),
Expand All @@ -27,7 +27,10 @@ crate fn mir_callgraph_reachable(
!tcx.is_constructor(root.def_id()),
"you should not call `mir_callgraph_reachable` on enum/struct constructor functions"
);
#[instrument(skip(tcx, param_env, target, stack, seen, recursion_limiter, caller))]
#[instrument(
level = "debug",
skip(tcx, param_env, target, stack, seen, recursion_limiter, caller)
)]
fn process(
tcx: TyCtxt<'tcx>,
param_env: ty::ParamEnv<'tcx>,
Expand Down
5 changes: 4 additions & 1 deletion compiler/rustc_mir_build/src/thir/pattern/usefulness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,10 @@ impl<'tcx> Witness<'tcx> {
/// `is_under_guard` is used to inform if the pattern has a guard. If it
/// has one it must not be inserted into the matrix. This shouldn't be
/// relied on for soundness.
#[instrument(skip(cx, matrix, witness_preference, hir_id, is_under_guard, is_top_level))]
#[instrument(
level = "debug",
skip(cx, matrix, witness_preference, hir_id, is_under_guard, is_top_level)
)]
fn is_useful<'p, 'tcx>(
cx: &MatchCheckCtxt<'p, 'tcx>,
matrix: &Matrix<'p, 'tcx>,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_span/src/hygiene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1405,8 +1405,8 @@ fn update_disambiguator(expn_id: ExpnId) {
});

if modified {
info!("Set disambiguator for {:?} (hash {:?})", expn_id, first_hash);
info!("expn_data = {:?}", expn_id.expn_data());
debug!("Set disambiguator for {:?} (hash {:?})", expn_id, first_hash);
debug!("expn_data = {:?}", expn_id.expn_data());

// Verify that the new disambiguator makes the hash unique
#[cfg(debug_assertions)]
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_trait_selection/src/traits/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub fn codegen_fulfill_obligation<'tcx>(
});
let impl_source = drain_fulfillment_cx_or_panic(&infcx, &mut fulfill_cx, impl_source);

info!("Cache miss: {:?} => {:?}", trait_ref, impl_source);
debug!("Cache miss: {:?} => {:?}", trait_ref, impl_source);
Ok(impl_source)
})
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_trait_selection/src/traits/fulfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ impl<'a, 'b, 'tcx> FulfillProcessor<'a, 'b, 'tcx> {
ProcessResult::Unchanged
}
Err(selection_err) => {
info!("selecting trait at depth {} yielded Err", obligation.recursion_depth);
debug!("selecting trait at depth {} yielded Err", obligation.recursion_depth);

ProcessResult::Error(CodeSelectionError(selection_err))
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_traits/src/dropck_outlives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fn dropck_outlives<'tcx>(
let cause = ObligationCause::dummy();
let mut constraints = DtorckConstraint::empty();
while let Some((ty, depth)) = ty_stack.pop() {
info!(
debug!(
"{} kinds, {} overflows, {} ty_stack",
result.kinds.len(),
result.overflows.len(),
Expand Down