-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Make -Z time-passes
less noisy
#81284
Conversation
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
Before: time-passes.log (60k lines) After:
|
This comment has been minimized.
This comment has been minimized.
- Add the module name to `pre_AST_expansion_passes` and don't make it a verbose event (since it normally doesn't take very long, and it's emitted many times) - Don't make the following rustdoc events verbose; they're emitted many times. + build_extern_trait_impl + build_local_trait_impl + build_primitive_trait_impl + get_auto_trait_impls + get_blanket_trait_impls - Remove `get_auto_trait_and_blanket_synthetic_impls`; it's wholly covered by get_{auto,blanket}_trait_impls and not very useful.
I have no power here, but have a symbolic r=me. :) FWIW, I've noticed that |
Hmm, maybe the memory usage comes from collecting the AST? The lint is called on each module so that at least seems plausible. Do you know if RSS is tracked with self-profile, or just instruction count and timings? If it's tracked with self-profile I'd prefer to leave this off by default. |
I'm not very familiar, but I don't think RSS is tracked. Quick scan of rustc and measureme codebases suggests not. |
RSS is tracked at rust/compiler/rustc_data_structures/src/profiling.rs Lines 587 to 593 in 4e208f6
|
@bjorn3 that's for time-passes, not self-profile, right? The concern is that this loses info by only tracking it for self-profile. |
Yeah, that is only for time-passes. |
r? @wesleywiser Do you think making time-passes less noisy is worth losing the info about memory usage? |
While working on adding more RSS data to the time-passes output, I realized that the RSS increase I spoke of doesn't occur during So, no worries here. False alarm. :) |
Yeah, I agree this is more useful. @bors r+ |
📌 Commit 3b8f1b7 has been approved by |
Make `-Z time-passes` less noisy - Add the module name to `pre_AST_expansion_passes` and don't make it a verbose event (since it normally doesn't take very long, and it's emitted many times) - Don't make the following rustdoc events verbose; they're emitted many times. + build_extern_trait_impl + build_local_trait_impl + build_primitive_trait_impl + get_auto_trait_impls + get_blanket_trait_impls - Remove the `get_auto_trait_and_blanket_synthetic_impls` rustdoc event; it's wholly covered by get_{auto,blanket}_trait_impls and not very useful. I found this while working on rust-lang#81275 but it's independent of those changes.
Would it be worth it to add a |
We have Logging Only downside is that I think fewer people know about |
If |
Make `-Z time-passes` less noisy - Add the module name to `pre_AST_expansion_passes` and don't make it a verbose event (since it normally doesn't take very long, and it's emitted many times) - Don't make the following rustdoc events verbose; they're emitted many times. + build_extern_trait_impl + build_local_trait_impl + build_primitive_trait_impl + get_auto_trait_impls + get_blanket_trait_impls - Remove the `get_auto_trait_and_blanket_synthetic_impls` rustdoc event; it's wholly covered by get_{auto,blanket}_trait_impls and not very useful. I found this while working on rust-lang#81275 but it's independent of those changes.
I would say that it might make sense to make this configurable instead: |
Rollup of 13 pull requests Successful merges: - rust-lang#70904 (Stabilize `Seek::stream_position` (feature `seek_convenience`)) - rust-lang#79951 (Refractor a few more types to `rustc_type_ir` ) - rust-lang#80868 (Print failure message on all tests that should panic, but don't) - rust-lang#81062 (Improve diagnostics for Precise Capture) - rust-lang#81277 (Make more traits of the From/Into family diagnostic items) - rust-lang#81284 (Make `-Z time-passes` less noisy) - rust-lang#81379 (Improve URLs handling) - rust-lang#81416 (Tweak suggestion for missing field in patterns) - rust-lang#81426 (const_evaluatable: expand abstract consts in try_unify) - rust-lang#81428 (compiletest: Add two more unit tests) - rust-lang#81430 (add const_evaluatable_checked test) - rust-lang#81433 (const_evaluatable: stop looking into type aliases) - rust-lang#81445 (Update cargo) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
pre_AST_expansion_passes
and don't make it averbose event (since it normally doesn't take very long, and it's
emitted many times)
get_auto_trait_and_blanket_synthetic_impls
rustdoc event; it's whollycovered by get_{auto,blanket}_trait_impls and not very useful.
I found this while working on #81275 but it's independent of those changes.