Skip to content

Fix -Z input-stats ordering #134406

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

nnethercote
Copy link
Contributor

It currently depends on the hash algorithm.

r? @Noratrieb

@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 Dec 17, 2024
@nnethercote
Copy link
Contributor Author

Details in individual commits.

@bors rollup

@nnethercote
Copy link
Contributor Author

// We will soon sort, so the initial order does not matter.

Turns out we weren't sorting hard enough.

In rust-lang#129533 the main hash function changed and the order of `-Z
input-stats` output changed, which showed that it is dependent on the
hash function, even though it is sorted. That's because entries with the
same cumulative size are ordered in a way that depends on the hash
function.

This commit fixes that by using the entry label as the secondary
ordering key.
@nnethercote nnethercote force-pushed the fix-input-stats-ordering branch from 7e44cbf to 862950b Compare December 17, 2024 04:20
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jieyouxu
Copy link
Member

r? jieyouxu @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 17, 2024

📌 Commit 862950b has been approved by jieyouxu

It is now in the queue for this repository.

@rustbot rustbot assigned jieyouxu and unassigned Noratrieb Dec 17, 2024
@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 Dec 17, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 17, 2024
Rollup of 10 pull requests

Successful merges:

 - rust-lang#134202 (Remove `rustc::existing_doc_keyword` lint)
 - rust-lang#134354 (Handle fndef rendering together with signature rendering)
 - rust-lang#134365 (Rename `rustc_mir_build::build` to `builder`)
 - rust-lang#134368 (Use links to edition guide for edition migrations)
 - rust-lang#134397 (rustc_borrowck: Suggest changing `&raw const` to `&raw mut` if applicable)
 - rust-lang#134398 (AIX: add alignment info for test)
 - rust-lang#134400 (Fix some comments related to upvars handling)
 - rust-lang#134406 (Fix `-Z input-stats` ordering)
 - rust-lang#134409 (bootstrap: fix a comment)
 - rust-lang#134412 (small borrowck cleanup)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 3d0e5e0 into rust-lang:master Dec 17, 2024
6 checks passed
@rustbot rustbot added this to the 1.85.0 milestone Dec 17, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 17, 2024
Rollup merge of rust-lang#134406 - nnethercote:fix-input-stats-ordering, r=jieyouxu

Fix `-Z input-stats` ordering

It currently depends on the hash algorithm.

r? `@Noratrieb`
@nnethercote nnethercote deleted the fix-input-stats-ordering branch December 17, 2024 21:07
# for free to join this conversation on GitHub. Already have an account? # 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