-
Notifications
You must be signed in to change notification settings - Fork 12
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
docs: add instructions for profiling with perf/DTrace #423
Conversation
|
@@ -1,5 +1,35 @@ | |||
# Profiling | |||
|
|||
## Perf/DTrace | |||
|
|||
The [cargo-flamegraph](https://github.com/flamegraph-rs/flamegraph) tool can be used to collect performance profiling data using [perf](https://en.wikipedia.org/wiki/Perf_(Linux)) on Linux and [DTrace](https://en.wikipedia.org/wiki/DTrace) on MacOS/Windows and then visualize it as a flamegraph. |
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.
Question: Why didn't this work when running from JS? If the shared library (created by N-API) is built with debug symbols, running perf
should also samples from EDR, if I'm not mistaken.
That was my hope with your approach too.
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.
I got failed to sample program
when trying to pass node
as the binary to profile. I spent some time trying to figure it out, but gave up after a while. Possibly a custom build of node
would help, but felt that was too much effort.
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. Just one question
Add instructions for profiling with perf/DTrace.