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

Use StableHasher + Hash64 for dep_tracking_hash #137410

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Feb 22, 2025

This is similar to #137095. We currently have a +/- 1 byte jitter in the size of dep graphs reported on perf.rust-lang.org. I think this fixes that jitter.

When I introduced Hash64, I wired it through most of the compiler by making it an output of StableHasher::finalize then fixing the compile errors. I missed this case because the u64 hash in this function is being produced by DefaultHasher instead. That seems pretty sketchy because the code seems confident that the hash needs to be stable, and we have a mechanism for stable hashing that we weren't using here.

@rustbot
Copy link
Collaborator

rustbot commented Feb 22, 2025

r? @fee1-dead

rustbot has assigned @fee1-dead.
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 Feb 22, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 22, 2025

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.

@workingjubilee
Copy link
Member

Seems like the obvious thing to do here.
@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 22, 2025

📌 Commit fd451dc has been approved by workingjubilee

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 Feb 22, 2025
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Feb 22, 2025
… r=workingjubilee

Use StableHasher + Hash64 for dep_tracking_hash

This is similar to rust-lang#137095. We currently have a +/- 1 byte jitter in the size of dep graphs reported on perf.rust-lang.org. I think this fixes that jitter.

When I introduced `Hash64`, I wired it through most of the compiler by making it an output of `StableHasher::finalize` then fixing the compile errors. I missed this case because the `u64` hash in this function is being produced by `DefaultHasher` instead. That seems pretty sketchy because the code seems confident that the hash needs to be stable, and we have a mechanism for stable hashing that we weren't using here.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 22, 2025
…mpiler-errors

Rollup of 10 pull requests

Successful merges:

 - rust-lang#136642 (Put the alloc unit tests in a separate alloctests package)
 - rust-lang#136910 (Implement feature `isolate_most_least_significant_one` for integer types)
 - rust-lang#137183 (Prune dead regionck code)
 - rust-lang#137333 (Use `edition = "2024"` in the compiler (redux))
 - rust-lang#137356 (Ferris 🦀 Identifier naming conventions)
 - rust-lang#137362 (Add build step log for `run-make-support`)
 - rust-lang#137377 (Always allow reusing cratenum in CrateLoader::load)
 - rust-lang#137388 (Fix(lib/fs/tests): Disable rename POSIX semantics FS tests under Windows 7)
 - rust-lang#137410 (Use StableHasher + Hash64 for dep_tracking_hash)
 - rust-lang#137413 (jubilee cleared out the review queue)

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

Rollup of 9 pull requests

Successful merges:

 - rust-lang#136910 (Implement feature `isolate_most_least_significant_one` for integer types)
 - rust-lang#137183 (Prune dead regionck code)
 - rust-lang#137333 (Use `edition = "2024"` in the compiler (redux))
 - rust-lang#137356 (Ferris 🦀 Identifier naming conventions)
 - rust-lang#137362 (Add build step log for `run-make-support`)
 - rust-lang#137377 (Always allow reusing cratenum in CrateLoader::load)
 - rust-lang#137388 (Fix(lib/fs/tests): Disable rename POSIX semantics FS tests under Windows 7)
 - rust-lang#137410 (Use StableHasher + Hash64 for dep_tracking_hash)
 - rust-lang#137413 (jubilee cleared out the review queue)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 1066af5 into rust-lang:master Feb 22, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Feb 22, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 22, 2025
Rollup merge of rust-lang#137410 - saethlin:stable-dep-tracking-hash, r=workingjubilee

Use StableHasher + Hash64 for dep_tracking_hash

This is similar to rust-lang#137095. We currently have a +/- 1 byte jitter in the size of dep graphs reported on perf.rust-lang.org. I think this fixes that jitter.

When I introduced `Hash64`, I wired it through most of the compiler by making it an output of `StableHasher::finalize` then fixing the compile errors. I missed this case because the `u64` hash in this function is being produced by `DefaultHasher` instead. That seems pretty sketchy because the code seems confident that the hash needs to be stable, and we have a mechanism for stable hashing that we weren't using here.
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