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

Redirect __rust_dealloc to sdallocx #122329

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Mar 11, 2024

This could use a perf run.

@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2024

r? @petrochenkov

rustbot has assigned @petrochenkov.
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 Mar 11, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Mar 11, 2024

@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 Mar 11, 2024
@bors
Copy link
Contributor

bors commented Mar 11, 2024

⌛ Trying commit 0f657ac with merge ecb3315...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 11, 2024
Redirect `__rust_dealloc` to `sdallocx`

This could use a perf run.
@bors
Copy link
Contributor

bors commented Mar 11, 2024

☀️ Try build successful - checks-actions
Build commit: ecb3315 (ecb331519998b3890fd9db9720e01106318d4103)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ecb3315): comparison URL.

Overall result: ✅ improvements - 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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.6% [-1.2%, -0.2%] 148
Improvements ✅
(secondary)
-0.6% [-3.8%, -0.3%] 80
All ❌✅ (primary) -0.6% [-1.2%, -0.2%] 148

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)
3.2% [2.2%, 4.6%] 8
Regressions ❌
(secondary)
3.5% [1.8%, 5.0%] 27
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.2% [2.2%, 4.6%] 8

Cycles

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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.8% [-1.9%, -1.7%] 2
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 645.581s -> 646.145s (0.09%)
Artifact size: 309.97 MiB -> 309.93 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 11, 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 Mar 11, 2024
@Kobzol
Copy link
Contributor

Kobzol commented Mar 11, 2024

This was previously tried here, although seemingly in a different way. CC @nnethercote

@petrochenkov
Copy link
Contributor

The PR needs a proper description - what exactly it changes and why it's different from jemalloc overrides below, why it helps, what __rust_dealloc and sdallocx are, etc.

@workingjubilee
Copy link
Contributor

sdallocx is the jemalloc function that allows passing a size when deallocating, as an optimization, allowing the allocator to skip the relevant metadata lookup it would otherwise have to do.

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 12, 2024

If #122362 works out we could probably just do this change with a #[global_allocator].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

None yet

7 participants