Skip to content

Use DenseBit for drop_live_at in liveness tracing - #162488

Open
Kobzol wants to merge 1 commit into
rust-lang:mainfrom
Kobzol:borrowck-densebit
Open

Use DenseBit for drop_live_at in liveness tracing#162488
Kobzol wants to merge 1 commit into
rust-lang:mainfrom
Kobzol:borrowck-densebit

Conversation

@Kobzol

@Kobzol Kobzol commented Sep 8, 2026

Copy link
Copy Markdown
Member

I noticed that drop_live_at only ever gets point, and never range, inserts, so I switched it over to DenseBitSet. This provides some nice wins on serde.

However, the add_drop_live_facts_for function expects to receive an IntervalSet. I first tried to switch the type of LiveRegions::AtPoints from SparseIntervalMatrix to SparseBitMatrix, but that had regressions.

So in this PR, I simply reconstruct an IntervalSet from a DenseBitSet. Not super pretty, but perf. looks reasonable.

Let me know if this makes sense or not! :)

r? jackh726

@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 Sep 8, 2026
&self.drop_locations,
&self.drop_live_at,
);
let mut set: IntervalSet<PointIndex> =

@jackh726 jackh726 Sep 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This could use a comment.

View changes since the review

@jackh726

jackh726 commented Sep 8, 2026

Copy link
Copy Markdown
Member

Cool :) r=me with comment added

@jackh726

jackh726 commented Sep 8, 2026

Copy link
Copy Markdown
Member

@bors rollup=never

@Kobzol

Kobzol commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Cool, added a comment. Thank you!

@bors r=jackh726

And for good measure:
@bors try @rust-timer queue

@rust-timer

Copy link
Copy Markdown
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rust-bors

rust-bors Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 855183d has been approved by jackh726

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

Reason for tree closure: spurious failures

@rust-bors rust-bors Bot 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 Sep 8, 2026
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 8, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 8, 2026
Use `DenseBit` for `drop_live_at` in liveness tracing
@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 8, 2026
@rust-bors

rust-bors Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

⚠️ A new commit 1b1b92ed33d64bc3d722be6f13f9fc6a23faa858 was pushed.

This pull request was unapproved.

@Kobzol

Kobzol commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Impressive, I managed to make the code stop compiling by adding a comment 🤦 Enough GitHub for today. Second try:

@bors r=jackh726
@bors try

@rust-bors

rust-bors Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1b1b92e has been approved by jackh726

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 5. This pull request will be tested once the tree is reopened.

Reason for tree closure: spurious failures

@rust-bors rust-bors Bot 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 8, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 8, 2026
Use `DenseBit` for `drop_live_at` in liveness tracing
@rust-bors

rust-bors Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 57ac888 (57ac8880a9ace2c2311fd96b2b77f5fad68483b4)
Base parent: 745de6e (745de6eca673de5329ec68f2689629a5ca45ab35)

@rust-timer

Copy link
Copy Markdown
Collaborator

Queued 57ac888 with parent 745de6e, future comparison URL.
There is currently 1 preceding artifact in the queue.
It will probably take at least ~1.4 hours until the benchmark run finishes.

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. S-waiting-on-perf Status: Waiting on a perf run to be completed. 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