Skip to content
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

rustc_span: Add conveniences for working with span formats #125829

Merged
merged 3 commits into from
Jun 15, 2024

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented May 31, 2024

This is the refactoring part of #125017.

@rustbot
Copy link
Collaborator

rustbot commented May 31, 2024

r? @michaelwoerister

rustbot has assigned @michaelwoerister.
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 May 31, 2024
@petrochenkov
Copy link
Contributor Author

This code is hot so if Fmt matches are not optimized away properly it may affect performance.
Also some additional #[inline] attributes may be needed.
@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 May 31, 2024
@bors
Copy link
Contributor

bors commented May 31, 2024

⌛ Trying commit 0d28df7 with merge 0218d5e...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 31, 2024
rustc_span: Add conveniences for working with span formats

Also
- Centralize span ctxt updates in `Span::update_ctxt`
- Stop requiring inline and interned ctxts in partially interned format to be synchronized.

This is the refactoring part of rust-lang#125017.
@petrochenkov
Copy link
Contributor Author

cc @nnethercote
IIRC, you touched this code last.

@bors
Copy link
Contributor

bors commented May 31, 2024

☀️ Try build successful - checks-actions
Build commit: 0218d5e (0218d5ec26fcf9deca0409cee85473021083ee25)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0218d5e): 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)
0.6% [0.2%, 1.3%] 139
Regressions ❌
(secondary)
0.8% [0.3%, 4.2%] 63
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.6% [0.2%, 1.3%] 139

Max RSS (memory usage)

Results (primary -1.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% [2.0%, 5.2%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.4% [-4.4%, -1.2%] 9
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.3% [-4.4%, 5.2%] 11

Cycles

Results (primary -0.1%, secondary 2.7%)

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)
1.5% [1.2%, 1.8%] 4
Regressions ❌
(secondary)
4.2% [2.2%, 9.4%] 5
Improvements ✅
(primary)
-1.1% [-1.6%, -0.8%] 7
Improvements ✅
(secondary)
-1.1% [-1.3%, -0.9%] 2
All ❌✅ (primary) -0.1% [-1.6%, 1.8%] 11

Binary size

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

Bootstrap: 672.771s -> 665.847s (-1.03%)
Artifact size: 318.83 MiB -> 318.87 MiB (0.01%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels May 31, 2024
@petrochenkov petrochenkov 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 May 31, 2024
@petrochenkov
Copy link
Contributor Author

@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 Jun 1, 2024
@bors
Copy link
Contributor

bors commented Jun 1, 2024

⌛ Trying commit 00c399e with merge 225796f...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 1, 2024
rustc_span: Add conveniences for working with span formats

Also
- Centralize span ctxt updates in `Span::update_ctxt`
- Stop requiring inline and interned ctxts in partially interned format to be synchronized.

This is the refactoring part of rust-lang#125017.
@bors
Copy link
Contributor

bors commented Jun 2, 2024

☀️ Try build successful - checks-actions
Build commit: 225796f (225796f1e24215f734685da47f2474920c19adb9)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (225796f): 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)
0.3% [0.2%, 0.6%] 54
Regressions ❌
(secondary)
0.7% [0.2%, 4.1%] 24
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.5%] 3
All ❌✅ (primary) 0.3% [0.2%, 0.6%] 54

Max RSS (memory usage)

Results (primary -2.0%, secondary 3.9%)

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% [2.1%, 2.1%] 1
Regressions ❌
(secondary)
3.9% [3.9%, 3.9%] 1
Improvements ✅
(primary)
-2.4% [-4.4%, -1.0%] 13
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.0% [-4.4%, 2.1%] 14

Cycles

Results (primary 1.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)
1.2% [1.0%, 1.3%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.2% [1.0%, 1.3%] 2

Binary size

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

Bootstrap: 667.702s -> 670.737s (0.45%)
Artifact size: 318.95 MiB -> 319.12 MiB (0.06%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 2, 2024
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
.......... (120/124)
...F       (124/124)


/checkout/tests/rustdoc-gui/help-page.goml help-page... FAILED
[ERROR] `tests/rustdoc-gui/utils.goml` line 16
    from `tests/rustdoc-gui/help-page.goml` line 23
    from `tests/rustdoc-gui/help-page.goml` line 32: Error: Evaluation failed: The following errors happened: [localStorage item "rustdoc-theme" (of value "ayu") != "null"]: for command `assert-local-storage: {"rustdoc-theme": |theme|}`
Error: ()
Build completed unsuccessfully in 0:03:30
  local time: Thu Jun 13 18:24:06 UTC 2024
  network time: Thu, 13 Jun 2024 18:24:06 GMT

@bors
Copy link
Contributor

bors commented Jun 13, 2024

☀️ Try build successful - checks-actions
Build commit: cf4be1f (cf4be1f84d4df050aecb4bd9f87182537957187c)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cf4be1f): comparison URL.

Overall result: ❌ regressions - no 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.

@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)
0.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.2%, 0.2%] 1

Max RSS (memory usage)

Results (primary -0.5%)

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)
1.6% [0.5%, 3.1%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-6.5% [-6.5%, -6.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.5% [-6.5%, 3.1%] 4

Cycles

Results (primary 2.2%, secondary 2.9%)

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.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
2.9% [2.3%, 3.5%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.2% [2.2%, 2.2%] 1

Binary size

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

Bootstrap: 671.147s -> 671.409s (0.04%)
Artifact size: 320.41 MiB -> 320.36 MiB (-0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jun 13, 2024
@petrochenkov
Copy link
Contributor Author

Hmm, the tt-muncher improvement from the previous run (#125829 (comment)) is gone, but at least it's neutral overall.

@michaelwoerister
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jun 14, 2024

📌 Commit 220f3ec has been approved by michaelwoerister

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-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 14, 2024
@petrochenkov
Copy link
Contributor Author

@bors rollup=maybe

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 14, 2024
…rister

rustc_span: Add conveniences for working with span formats

This is the refactoring part of rust-lang#125017.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 14, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#125722 (Indicate in `non_local_defs` lint that the macro needs to change)
 - rust-lang#125829 (rustc_span: Add conveniences for working with span formats)
 - rust-lang#126128 (Consistently use subtyping in method resolution)
 - rust-lang#126192 (Various Redox OS fixes and add i686 Redox OS target)
 - rust-lang#126352 (ci: Update centos:7 to use vault repos)
 - rust-lang#126354 (Use `Variance` glob imported variants everywhere)
 - rust-lang#126469 (MIR Shl/Shr: the offset can be computed with rem_euclid)
 - rust-lang#126472 (build `libcxx-version` only when it doesn't exist)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 14, 2024
…rister

rustc_span: Add conveniences for working with span formats

This is the refactoring part of rust-lang#125017.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 14, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#125722 (Indicate in `non_local_defs` lint that the macro needs to change)
 - rust-lang#125829 (rustc_span: Add conveniences for working with span formats)
 - rust-lang#126192 (Various Redox OS fixes and add i686 Redox OS target)
 - rust-lang#126352 (ci: Update centos:7 to use vault repos)
 - rust-lang#126354 (Use `Variance` glob imported variants everywhere)
 - rust-lang#126469 (MIR Shl/Shr: the offset can be computed with rem_euclid)
 - rust-lang#126472 (build `libcxx-version` only when it doesn't exist)
 - rust-lang#126476 (Fix running bootstrap tests with a local Rust toolchain as the stage0)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 14, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#125722 (Indicate in `non_local_defs` lint that the macro needs to change)
 - rust-lang#125829 (rustc_span: Add conveniences for working with span formats)
 - rust-lang#126192 (Various Redox OS fixes and add i686 Redox OS target)
 - rust-lang#126352 (ci: Update centos:7 to use vault repos)
 - rust-lang#126354 (Use `Variance` glob imported variants everywhere)
 - rust-lang#126469 (MIR Shl/Shr: the offset can be computed with rem_euclid)
 - rust-lang#126472 (build `libcxx-version` only when it doesn't exist)
 - rust-lang#126476 (Fix running bootstrap tests with a local Rust toolchain as the stage0)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 15, 2024
…rister

rustc_span: Add conveniences for working with span formats

This is the refactoring part of rust-lang#125017.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 15, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#125722 (Indicate in `non_local_defs` lint that the macro needs to change)
 - rust-lang#125829 (rustc_span: Add conveniences for working with span formats)
 - rust-lang#126192 (Various Redox OS fixes and add i686 Redox OS target)
 - rust-lang#126352 (ci: Update centos:7 to use vault repos)
 - rust-lang#126354 (Use `Variance` glob imported variants everywhere)
 - rust-lang#126469 (MIR Shl/Shr: the offset can be computed with rem_euclid)
 - rust-lang#126472 (build `libcxx-version` only when it doesn't exist)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 15, 2024
…rister

rustc_span: Add conveniences for working with span formats

This is the refactoring part of rust-lang#125017.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 15, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#125829 (rustc_span: Add conveniences for working with span formats)
 - rust-lang#126279 (Migrate `inaccessible-temp-dir`, `output-with-hyphens` and `issue-10971-temps-dir` `run-make` tests to `rmake`)
 - rust-lang#126361 (Unify intrinsics body handling in StableMIR)
 - rust-lang#126417 (Add `f16` and `f128` inline ASM support for `x86` and `x86-64`)
 - rust-lang#126424 ( Also sort `crt-static` in `--print target-features` output)
 - rust-lang#126428 (Polish `std::path::absolute` documentation.)
 - rust-lang#126429 (Add `f16` and `f128` const eval for binary and unary operationations)
 - rust-lang#126448 (End support for Python 3.8 in tidy)
 - rust-lang#126488 (Use `std::path::absolute` in bootstrap)
 - rust-lang#126511 (.mailmap: Associate both my work and my private email with me)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 15, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#125829 (rustc_span: Add conveniences for working with span formats)
 - rust-lang#126361 (Unify intrinsics body handling in StableMIR)
 - rust-lang#126417 (Add `f16` and `f128` inline ASM support for `x86` and `x86-64`)
 - rust-lang#126424 ( Also sort `crt-static` in `--print target-features` output)
 - rust-lang#126428 (Polish `std::path::absolute` documentation.)
 - rust-lang#126429 (Add `f16` and `f128` const eval for binary and unary operationations)
 - rust-lang#126448 (End support for Python 3.8 in tidy)
 - rust-lang#126488 (Use `std::path::absolute` in bootstrap)
 - rust-lang#126511 (.mailmap: Associate both my work and my private email with me)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5fac572 into rust-lang:master Jun 15, 2024
5 of 7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 15, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 15, 2024
Rollup merge of rust-lang#125829 - petrochenkov:upctxt2, r=michaelwoerister

rustc_span: Add conveniences for working with span formats

This is the refactoring part of rust-lang#125017.
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request Jun 28, 2024
rustc_span: Inline some hot functions

Found while benchmarking rust-lang/rust#125829.
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.

8 participants