Improve flamegraph profiling instructions#12521
Merged
comphead merged 2 commits intoapache:mainfrom Sep 18, 2024
Merged
Conversation
hiltontj
approved these changes
Sep 18, 2024
Contributor
Author
|
FYI @Rachelint |
Contributor
|
Nice! I am double checking the steps in docs in my local. |
Rachelint
reviewed
Sep 18, 2024
Co-authored-by: kamille <3144148605@qq.com>
Rachelint
reviewed
Sep 18, 2024
| echo "select * from table;" >> test.sql | ||
| sudo dtrace -c './target/debug/datafusion-cli -f test.sql' -o out.stacks -n 'profile-997 /execname == "datafusion-cli"/ { @[ustack(100)] = count(); }' | ||
| /tmp/fg/FlameGraph/stackcollapse.pl out.stacks | /tmp/fg/FlameGraph/flamegraph.pl > flamegraph.svg | ||
| CARGO_PROFILE_RELEASE_DEBUG=true cargo flamegraph --root --unit-test datafusion -- dataframe::tests::test_array_agg |
Contributor
There was a problem hiding this comment.
Should we disable lto when profiling?
Seems it makes a small difference to flamegraph, and will lead to very very long building time...
Contributor
Author
There was a problem hiding this comment.
I personally don't change the build settings when profiling -- it seems to work just fine for me
Contributor
There was a problem hiding this comment.
I personally don't change the build settings when profiling -- it seems to work just fine for me
OK, the setting may be not something matters.
Rachelint
approved these changes
Sep 18, 2024
Contributor
|
Thanks @alamb |
comphead
approved these changes
Sep 18, 2024
Contributor
Author
|
Thank you @Rachelint and @comphead |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Related to #11682
Rationale for this change
While working on #12092 I found myself needing to make flamegraphs and the instructions were a bit lackign.
I also made a short (5 min) video to help this process along https://youtu.be/2z11xtYw_xs that I wanted to link as well
What changes are included in this PR?
Update the flamegraph creation cookbook. Here is how it looks rendered:
Are these changes tested?
I tested them locally
Are there any user-facing changes?
Better docs