Skip to content

rustdoc: Set tracing max_level_info when debug-logging is false - #159687

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
camelid:rustdoc-max_level_info
Jul 28, 2026
Merged

rustdoc: Set tracing max_level_info when debug-logging is false#159687
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
camelid:rustdoc-max_level_info

Conversation

@camelid

@camelid camelid commented Jul 21, 2026

Copy link
Copy Markdown
Member

This matches rustc and should improve performance for the published versions of rustdoc. We shouldn't be including all our debug! calls in builds for users.

This matches rustc and should improve performance for the published
versions of rustdoc. We shouldn't be including all our debug! calls in
builds for users.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 21, 2026
@rustbot

rustbot commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789

@camelid

camelid commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

I'm assuming/hoping that rustc-perf uses a regular dist build with debug_logging off.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 21, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 21, 2026
rustdoc: Set tracing max_level_info when debug-logging is false
@rust-bors

rust-bors Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 01aecb5 (01aecb57141ba71f5665449ee9555f5a13ce88a1)
Base parent: 79a4b00 (79a4b003dd31ab70729f19215aa13d1e68d86fb6)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (01aecb5): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary 4.0%, secondary 3.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
4.0% [2.0%, 6.0%] 2
Regressions ❌
(secondary)
3.3% [2.1%, 5.8%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.0% [2.0%, 6.0%] 2

Cycles

Results (secondary 5.6%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
5.6% [5.6%, 5.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 489.717s -> 487.185s (-0.52%)
Artifact size: 388.55 MiB -> 387.58 MiB (-0.25%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 22, 2026
@camelid

camelid commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

No effect on perf, but I think this change makes sense anyway.

@Mark-Simulacrum

Copy link
Copy Markdown
Member

Given that there isn't any effect, maybe worth keeping the information in the production binaries? It might be helpful when debugging.

But r=me if you'd like to move ahead with it.

@camelid

camelid commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

I think it makes sense to have rustdoc match rustc if only for consistency. Also, as rustdoc itself continues to get faster and we add more debug!s, it may start having an effect. It'd be nice to avoid that being an issue since normally we assume when adding debug!s that they are "free". That said, cc @rust-lang/rustdoc. Let me know if you're opposed, otherwise I'll approve it.

@lolbinarycat

Copy link
Copy Markdown
Contributor

parity with rustc is almost always good IMO.

@camelid

camelid commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

@bors r=Mark-Simulacrum

FWIW, there are very tiny wins across the board for doc benchmarks (and no regressions). They're just considered significant because they're so small.

image

@rust-bors

rust-bors Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit b7df3de has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 28, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 28, 2026
…Mark-Simulacrum

rustdoc: Set tracing max_level_info when debug-logging is false

This matches rustc and should improve performance for the published versions of rustdoc. We shouldn't be including all our `debug!` calls in builds for users.
rust-bors Bot pushed a commit that referenced this pull request Jul 28, 2026
…uwer

Rollup of 14 pull requests

Successful merges:

 - #159990 (Many "predicate"-to-"clause" renamings)
 - #159665 (Replace most `Ty::new_fn_def` calls with `type_of` queries directly)
 - #159687 (rustdoc: Set tracing max_level_info when debug-logging is false)
 - #160065 (Distinguish the dep-graph index space from the live node count)
 - #159978 (run intrinsic-test by default on x86_64-gnu)
 - #160008 (Avoid stale closure recovery state across statements)
 - #160027 (Add regression test for #132767)
 - #160030 (Update `browser-ui-test` version to `0.25.0`)
 - #160046 (Improve consistency of attribute error messages (part 2))
 - #160056 (Fix associated function suggestion for generic ADTs)
 - #160069 (Update Rust crate tracing-subscriber to v0.3.23 [SECURITY])
 - #160071 (sanitize_standard_fds: clarify macos comment)
 - #160076 (use unstable features when updating dependencies)
 - #160088 (fix 404 url in src/doc/rustdoc.md)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jul 28, 2026
…Mark-Simulacrum

rustdoc: Set tracing max_level_info when debug-logging is false

This matches rustc and should improve performance for the published versions of rustdoc. We shouldn't be including all our `debug!` calls in builds for users.
rust-bors Bot pushed a commit that referenced this pull request Jul 28, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #159990 (Many "predicate"-to-"clause" renamings)
 - #159665 (Replace most `Ty::new_fn_def` calls with `type_of` queries directly)
 - #159687 (rustdoc: Set tracing max_level_info when debug-logging is false)
 - #160057 (refactor(mir-transform): Calculate optimization status inside `run_passes_inner`)
 - #160060 (codegen: skip stores for entirely-uninit constant aggregate fields, attempt #2)
 - #160063 (Fix ICE when dumping the dep graph with the parallel frontend)
 - #160065 (Distinguish the dep-graph index space from the live node count)
 - #158038 (Split register_tool into register_attribute_tool and register_lint_tool)
 - #159776 (remove const hack in alloc)
 - #159978 (run intrinsic-test by default on x86_64-gnu)
 - #160008 (Avoid stale closure recovery state across statements)
 - #160027 (Add regression test for #132767)
 - #160030 (Update `browser-ui-test` version to `0.25.0`)
 - #160046 (Improve consistency of attribute error messages (part 2))
 - #160056 (Fix associated function suggestion for generic ADTs)
 - #160069 (Update Rust crate tracing-subscriber to v0.3.23 [SECURITY])
 - #160071 (sanitize_standard_fds: clarify macos comment)
 - #160076 (use unstable features when updating dependencies)
 - #160092 (miri ui tests: don't run native tests on stage 0)
 - #160093 (Switch cargo assignments to weihanglo)
 - #160094 (Update assignment for docs)
@rust-bors
rust-bors Bot merged commit 7d73f93 into rust-lang:main Jul 28, 2026
14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 28, 2026
rust-timer added a commit that referenced this pull request Jul 28, 2026
Rollup merge of #159687 - camelid:rustdoc-max_level_info, r=Mark-Simulacrum

rustdoc: Set tracing max_level_info when debug-logging is false

This matches rustc and should improve performance for the published versions of rustdoc. We shouldn't be including all our `debug!` calls in builds for users.
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Jul 29, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - rust-lang/rust#159990 (Many "predicate"-to-"clause" renamings)
 - rust-lang/rust#159665 (Replace most `Ty::new_fn_def` calls with `type_of` queries directly)
 - rust-lang/rust#159687 (rustdoc: Set tracing max_level_info when debug-logging is false)
 - rust-lang/rust#160057 (refactor(mir-transform): Calculate optimization status inside `run_passes_inner`)
 - rust-lang/rust#160060 (codegen: skip stores for entirely-uninit constant aggregate fields, attempt rust-lang/rust#2)
 - rust-lang/rust#160063 (Fix ICE when dumping the dep graph with the parallel frontend)
 - rust-lang/rust#160065 (Distinguish the dep-graph index space from the live node count)
 - rust-lang/rust#158038 (Split register_tool into register_attribute_tool and register_lint_tool)
 - rust-lang/rust#159776 (remove const hack in alloc)
 - rust-lang/rust#159978 (run intrinsic-test by default on x86_64-gnu)
 - rust-lang/rust#160008 (Avoid stale closure recovery state across statements)
 - rust-lang/rust#160027 (Add regression test for rust-lang/rust#132767)
 - rust-lang/rust#160030 (Update `browser-ui-test` version to `0.25.0`)
 - rust-lang/rust#160046 (Improve consistency of attribute error messages (part 2))
 - rust-lang/rust#160056 (Fix associated function suggestion for generic ADTs)
 - rust-lang/rust#160069 (Update Rust crate tracing-subscriber to v0.3.23 [SECURITY])
 - rust-lang/rust#160071 (sanitize_standard_fds: clarify macos comment)
 - rust-lang/rust#160076 (use unstable features when updating dependencies)
 - rust-lang/rust#160092 (miri ui tests: don't run native tests on stage 0)
 - rust-lang/rust#160093 (Switch cargo assignments to weihanglo)
 - rust-lang/rust#160094 (Update assignment for docs)
@camelid
camelid deleted the rustdoc-max_level_info branch July 29, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants