-
Notifications
You must be signed in to change notification settings - Fork 3
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
Refactor "merged callstacks profiler" with new stack traces datastructure #57
base: master
Are you sure you want to change the base?
Conversation
We don't have to merge this PR, I pushed it in case you wanted to have a look at how MergedCallStacksProfiler could look like with TreeNode... but something tells me you already have a more generic approach to print TreeNode and maybe already refactored both MergedCallStacksProfiler and CpuHotpathProfiler XD |
Nooo haha I just did this, so I was really happy to see your PR. Didn't had time to check it yet however |
Ah yesss didn't thought of that. I think you put it in the best place. Maybe the code to rebuild all sequences but reverted can be compacted a bit, will see if I can get something
Yeah true.... Made some changes so that it is a little more flexible: #58
Ok ! |
b2f68cf
to
5e9c54e
Compare
…o reuse tree renderers
b88c6ba
to
526f281
Compare
merged call stacks profiler has been replaced by pstacks profiler that make use of the new tree structure. The output is exactly the same than before. Unfortunately I haven't yet been able to refactor the rendering of the tree and make it available to other profiler... it's a bit tricky |
ab0f5b8
to
4a8a696
Compare
I have created
ParallelStacksProfiler
, a quick clone ofMergedCallStacksProfiler
to test the new stack trace datastructure. Instead of refactoringMergedCallStacksProfiler
I wanted to compare both implementation and output side by side.TreeNode
code is very easy to understand, it will certainly be simpler to maintain and to adapt. I really like the idea of usingHashMap
property to aggregate call stacks, so much cleaner! Overall I think we could simply trash the old implementation. Good job!!A few remarks though:
do_stack_snapshot
method gives usmethods_ids
as a stack (to read from bottom to top)... if you think the prefered way to read stacks are the other way around maybe we should do the revert in thebuild_from_sequences
tree methodthread_ids
... i know we don't make any use of them right now, so not a big deal at the moment, but I wanted to point it outdepth
in TreeNode can be discarded I think