-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Replace all uses of log::log_enabled
with Debug
printers
#74876
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
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
r? @RalfJung |
cc @hawkw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nifty!
src/librustc_middle/ty/context.rs
Outdated
} | ||
} | ||
|
||
struct DebugStats<'tcx>(TyCtxt<'tcx>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here for encapsulating the type inside debug_stats
.
What does this mean, do you have an example? |
Basically instead of
we now get
in cases where we had lots of |
@bors r+ |
📌 Commit b81d164 has been approved by |
☀️ Test successful - checks-actions, checks-azure |
#[doc(hidden)] | ||
pub struct RenderAllocation<'a, 'tcx, Tag, Extra> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the doc hidden?
Also this might be pub(crate)
if it suit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may get called from miri. I hid it from docs because the function is supposed to be the entry point for this and the only reason this is public is because impl Debug
didn't work. It can work though, and I think we should just figure out how to make it work, but it'll require some lifetime experiments with the InterpCx
@@ -56,7 +56,7 @@ impl<'mir, 'tcx> InterpCx<'mir, 'tcx, CompileTimeInterpreter<'mir, 'tcx>> { | |||
self.copy_op(place.into(), dest)?; | |||
|
|||
self.return_to_block(ret.map(|r| r.1))?; | |||
self.dump_place(*dest); | |||
trace!("{:?}", self.dump_place(*dest)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, why are these Debug
impls? They are definitely made for human consumption, so sounds more like a case of Display
to me TBH... (but changing it now is probably not worth it because Miri also needs adjusting).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk, the choice was fairly arbitrary
This was a slight performance regression on the ctfe stress test. I suspect we're optimizing more poorly or something like that? Edit: it's also possible that this was just noise, unclear -- but seems unlikely. |
Given the changes in this PR it's possible |
hmm... maybe some targetted placement of |
cc @RalfJung this touches a bunch of logging in the miri engine. There are some visual changes, mainly that in several cases we stop prepending lines with the module path and just have a newline.