-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
logging: add env var to control verbose scope entry/exit logging #96898
Conversation
Some changes occured to the CTFE / Miri engine cc @rust-lang/miri |
Actually it got removed in #87903 I think we should just revert that and make it configurable? |
You mean these |
Ah, yes, that is also pretty nice (though it is rather implicit). I presume it is not possible to turn this on only for the interpreter trace? |
not as far as I can tell. I do have to say I want to make them configurable anyway as I encounter the problem of not knowing what function just finished in situations other than the interpreter, too |
I don't even know how such logging would happen outside the interpreter 😂 but making those flags configurable would also work for me. Miri might do this automatically when MIRI_LOG is set. The question is... configurable how? Just an env var? RUSTC_LOG_ENTRY_EXIT=1, or something like that? |
Yea, that's what I had in mind |
9621f72
to
831bd96
Compare
All right, I implemented such an env var. |
@bors r+ rollup |
📌 Commit 831bd96 has been approved by |
when MIRI_LOG is set, set RUSTC_LOG_ENTRY_EXIT This will be useful once rust-lang/rust#96898 landed.
Rollup of 4 pull requests Successful merges: - rust-lang#91518 (Add readable rustdoc display for RISC-V target) - rust-lang#95281 (Fix inaccurate function name in `rustc_const_eval` docs) - rust-lang#96898 (logging: add env var to control verbose scope entry/exit logging) - rust-lang#96936 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This got removed in #75143, and I find this makes long traces a lot harder to read, so I propose we add this back.Example trace:
r? @oli-obk