-
Notifications
You must be signed in to change notification settings - Fork 889
Add heaptrack support #7764
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
Add heaptrack support #7764
Conversation
Cargo.toml
Outdated
@@ -289,5 +289,9 @@ panic = "abort" | |||
codegen-units = 1 | |||
overflow-checks = true | |||
|
|||
[profile.heaptrack] |
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.
We could call this profile something else if we want to reuse it with jemalloc?
Maybe release-debug
?
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.
Is the overhead for having heaptrack high?
I think having a mode that runs release with just debug symbols without anything else, and having the option to add heaptrack + jemalloc profiling would be useful - so maybe having them as feature would be good enough?
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.
release-debug
sounds good to me!
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.
There's virtually no overhead for compiling a binary with release-debug
and features=heaptrack
, except that we lose out on the efficiencies of jemalloc for tree-states. Running under heaptrack is a separate action, which does add quite a bit of overhead in terms of CPU
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.
LGTM
Proposed Changes
Although we're working on jemalloc profiler support in #7746, heaptrack seems to be producing more sensible results.
This PR adds a heaptrack profile and a heaptrack feature so that we no longer need to patch the code in order to use heaptrack. This may prove complementary to jemalloc profiling, so I think there is no harm in having both.
Additional Info
Usage:
Then
heaptrack lighthouse ...
using thelighthouse
binary that was just built.