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_codegen_ssa: write .dwp in a streaming fashion #104797

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

weihanglo
Copy link
Member

@weihanglo weihanglo commented Nov 24, 2022

When writing a .dwp file, rustc writes to a Vec first then to a BufWriter-wrapped file. It seems very likely that we can write in a streaming fashion to avoid double buffering in an intermediate Vec.

On my Linux machine, .dwp from the latest rust-lang/cargo is 113MiB. It may worth a stream writer, though I didn't do any benchmark 🙇🏾‍♂️.

@rustbot
Copy link
Collaborator

rustbot commented Nov 24, 2022

r? @jackh726

(rustbot has picked a reviewer for you, use r? to override)

@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 Nov 24, 2022
@jackh726
Copy link
Member

Let's @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 Nov 24, 2022
@bors
Copy link
Contributor

bors commented Nov 24, 2022

⌛ Trying commit 433d471 with merge 0392eb80c2a945d3f05dd5382bc1b14c22214aff...

@bors
Copy link
Contributor

bors commented Nov 24, 2022

☀️ Try build successful - checks-actions
Build commit: 0392eb80c2a945d3f05dd5382bc1b14c22214aff (0392eb80c2a945d3f05dd5382bc1b14c22214aff)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (0392eb80c2a945d3f05dd5382bc1b14c22214aff): comparison URL.

Overall result: no relevant changes - 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-review -S-waiting-on-perf -perf-regression

Instruction count

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

Max RSS (memory usage)

Results

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

Cycles

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

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 24, 2022
@jackh726
Copy link
Member

@bors r+ rollup=maybe

@bors
Copy link
Contributor

bors commented Nov 24, 2022

📌 Commit 433d471 has been approved by jackh726

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 Nov 24, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 25, 2022
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#104716 (move 2 candidates into builtin candidate)
 - rust-lang#104760 (Clarify `SyntaxExtensionKind::LegacyDerive`.)
 - rust-lang#104797 (rustc_codegen_ssa: write `.dwp` in a streaming fashion)
 - rust-lang#104835 (Use infcx.partially_normalize_associated_types_in)
 - rust-lang#104853 (Fix typo in miri sysroot)
 - rust-lang#104879 (jsondoclint: Recognise Typedef as valid kind for Type::ResolvedPath)
 - rust-lang#104887 (rustbuild: Don't build doc::SharedAssets when building JSON docs.)
 - rust-lang#104896 (rustdoc: fix broken tooltip CSS)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit aec60c6 into rust-lang:master Nov 25, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 25, 2022
@weihanglo weihanglo deleted the stream-write-dwp branch November 25, 2022 22:24
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.

5 participants