Skip to content

Conversation

klensy
Copy link
Contributor

@klensy klensy commented Jul 4, 2024

This PR removes pin from tracing-core and moves it to tracing, which regressed perf in > 0.1.37 versions.

@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2024

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 4, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2024

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@Kobzol
Copy link
Member

Kobzol commented Jul 4, 2024

@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 4, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 4, 2024
@bors
Copy link
Collaborator

bors commented Jul 4, 2024

⌛ Trying commit d58137b with merge 8836382...

@bors
Copy link
Collaborator

bors commented Jul 4, 2024

☀️ Try build successful - checks-actions
Build commit: 8836382 (88363822a28a0948a97d6b5667cfc8bc2c00c6b2)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (8836382): comparison URL.

Overall result: ❌ regressions - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
4.0% [0.4%, 8.9%] 265
Regressions ❌
(secondary)
4.8% [0.6%, 24.5%] 250
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 4.0% [0.4%, 8.9%] 265

Max RSS (memory usage)

Results (primary 2.1%, secondary 4.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.1% [0.6%, 5.2%] 49
Regressions ❌
(secondary)
4.2% [1.0%, 8.8%] 18
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.1% [0.6%, 5.2%] 49

Cycles

Results (primary 3.6%, secondary 6.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.6% [0.6%, 8.7%] 224
Regressions ❌
(secondary)
6.3% [0.4%, 33.5%] 184
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.6% [0.6%, 8.7%] 224

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 718.904s -> 758.823s (5.55%)
Artifact size: 328.18 MiB -> 347.19 MiB (5.79%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 4, 2024
@klensy
Copy link
Contributor Author

klensy commented Jul 4, 2024

Haha, nice improvements.

@Mark-Simulacrum
Copy link
Member

It looks like the costs are pretty spread out across (presumably) the tracing callsites, not any specific costs. It would be good to do a more detailed analysis and work with tracing maintainers to see if there are avoidable costs here (e.g., we should be looking to land some adjustments or revert things).

@klensy
Copy link
Contributor Author

klensy commented Jul 4, 2024

Ok, size regression appears when bumping tracing 0.1.37 to 0.1.38 https://github.com/tokio-rs/tracing/commits/tracing-0.1.38/tracing

 [[package]]
 name = "tracing"
-version = "0.1.37"
+version = "0.1.38"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8"
+checksum = "cf9cf6a813d3f40c88b0b6b6f29a5c95c6cdbf97c1f9cc53fb820200f5ad814d"
 dependencies = [
- "cfg-if",
  "pin-project-lite",
  "tracing-attributes",
  "tracing-core",

The winner is tokio-rs/tracing#2555

@klensy
Copy link
Contributor Author

klensy commented Jul 5, 2024

Weird, the same binary size regression appears if bump tracing-core 0.1.30 to 0.1.31.

@klensy
Copy link
Contributor Author

klensy commented Jul 6, 2024

on x86_64-pc-windows-msvc: stage0 rustc_driver
t - tracing, tc - tracing-core

incremental master tc-0.1.31 tc-0.1.32 t-0.1.38 t-0.1.40+tc-0.1.32
false 134966(16561) 134923(16564) 134927(16564) 142845(16562) 142145(16564)
true 127270(19239) 127242(19242) 127242(19242) 135595(19239) 134925(19242)

in cells: kbytes (exported symbols)

@Mark-Simulacrum
Copy link
Member

@rustbot author

Not sure whether the size investigation is the most warranted, but in any case, I don't think we should land this until we understand what happened and either revert those changes upstream or decide to accept them.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 20, 2024
@lolbinarycat lolbinarycat added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 1, 2024
@clubby789 clubby789 mentioned this pull request Dec 25, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 25, 2024
Bump tracing

Retry of rust-lang#127316, lets see if things have improved
required features reexported from tracing
@rustbot
Copy link
Collaborator

rustbot commented Sep 4, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@klensy
Copy link
Contributor Author

klensy commented Sep 4, 2025

I've moved pin from tracing-core to tracing, locally this didn't show binary size regression (i guess binary size regression linked with instructions regression).

Perf run please.

@Kobzol
Copy link
Member

Kobzol commented Sep 4, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 4, 2025
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 4, 2025
@rust-bors
Copy link

rust-bors bot commented Sep 4, 2025

☀️ Try build successful (CI)
Build commit: e49d3c4 (e49d3c46cea9fb36e7d5dff00d85da32f4ad1e02, parent: 79bdc627562db90599edcf16cb166a532919a0a8)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e49d3c4): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-1.0%, -0.1%] 9
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary 11.1%)

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

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

Cycles

Results (secondary -4.8%)

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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.8% [-5.7%, -3.9%] 2
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 466.814s -> 468.541s (0.37%)
Artifact size: 387.87 MiB -> 387.96 MiB (0.02%)

@rustbot rustbot removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels Sep 4, 2025
@klensy
Copy link
Contributor Author

klensy commented Sep 4, 2025

Results okay-ish? I can cleanup description and merge this part, and left digging tracing problem for next pr.

@Kobzol
Copy link
Member

Kobzol commented Sep 6, 2025

Looks fine indeed, thanks! The bigger update is being tracked in #146188.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 6, 2025

📌 Commit 267d3c8 has been approved by Kobzol

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Sep 6, 2025
@klensy klensy changed the title bump tracing move pinned version from tracing_core to tracing Sep 6, 2025
@klensy
Copy link
Contributor Author

klensy commented Sep 6, 2025

Updated description.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 6, 2025
move pinned version from tracing_core to tracing

This PR removes pin from `tracing-core` and moves it to `tracing`, which regressed perf in > 0.1.37 versions.
bors added a commit that referenced this pull request Sep 6, 2025
Rollup of 3 pull requests

Successful merges:

 - #127316 (move pinned version from tracing_core to tracing)
 - #144801 (Suggest bounds in more cases, accounting for type parameters referenced in predicate)
 - #146211 (Disallow shebang in `--cfg` and `--check-cfg` arguments)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 6, 2025
Rollup of 5 pull requests

Successful merges:

 - #127316 (move pinned version from tracing_core to tracing)
 - #144801 (Suggest bounds in more cases, accounting for type parameters referenced in predicate)
 - #146211 (Disallow shebang in `--cfg` and `--check-cfg` arguments)
 - #146263 (Fix `bump-stage0` build failure, and check-build `bump-stage0` in CI)
 - #146266 (miri std tests: skip all of sys::)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 020edbe into rust-lang:master Sep 6, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Sep 6, 2025
rust-timer added a commit that referenced this pull request Sep 6, 2025
Rollup merge of #127316 - klensy:tracing-bump, r=Kobzol

move pinned version from tracing_core to tracing

This PR removes pin from `tracing-core` and moves it to `tracing`, which regressed perf in > 0.1.37 versions.
bors added a commit that referenced this pull request Sep 9, 2025
Update tracing and fix binary regression

Previous attempts (#127316, #134770) saw binary size regressions, this was root caused to <tokio-rs/tracing#2553> which changed the behavior of the `max_level_info` feature flag to match the docs (i.e., that flag only applies for debug builds and `release_max_level_info` applies for release builds).

This change bumps the `tracing` version and sets both `max_level_info` and `release_max_level_info` when to match rustc's own `max_level_info`.
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants