-
Notifications
You must be signed in to change notification settings - Fork 907
Fix malloc_utils features (sysmalloc) #7770
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
Conversation
[target.'cfg(not(target_os = "windows"))'.dependencies] | ||
malloc_utils = { workspace = true, features = ["jemalloc"] } | ||
|
||
[target.'cfg(target_os = "windows")'.dependencies] | ||
malloc_utils = { workspace = true, features = [] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes ensure that lcli
actually uses jemalloc on Linux, which is potentially relevant for the benchmarking subcommands.
Some required checks have failed. Could you please take a look @michaelsproul? 🙏 |
Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conditional compilation logic looks quite complex, but I think you've correctly covered the scenarios I can think of.
Looks good to me!
Proposed Changes
Follow-up to:
The
heaptrack
feature added in my previous PR was ineffective, because the jemalloc feature was turned on by the Linux target-specific dependency.This PR tweaks the features such that:
lighthouse/Cargo.toml
), and completely disabled on Windows.sysmalloc
feature is set on Linux then it overrides jemalloc when selecting an allocator, even if the jemalloc feature is enabled (and the jemalloc dep was compiled).