Skip to content
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 collapser for the Visual Studio built in profiler #217

Closed
KnapSac opened this issue Sep 14, 2021 · 4 comments · Fixed by #218
Closed

Add collapser for the Visual Studio built in profiler #217

KnapSac opened this issue Sep 14, 2021 · 4 comments · Fixed by #218

Comments

@KnapSac
Copy link
Contributor

KnapSac commented Sep 14, 2021

Recently, I wanted to create a FlameGraph of the output of the Visual Studio profiler, but as it turns out, there is no stackcollapser for that yet. Since the original project does have a stackcollapser for this profiler, I was wondering if this would be a welcome contribution? I implemented my own stackcollapser before I found out there was an original, so I'd need to check that I haven't missed anything, but besides some polishing (and some tests) I think it should be pretty much good to go.

@jonhoo
Copy link
Owner

jonhoo commented Sep 14, 2021

Absolutely, that'd be great!

@KnapSac
Copy link
Contributor Author

KnapSac commented Oct 13, 2021

If a method calls a few other methods, is the callers sample count the sample counts of the called methods combined?

So if we have a method Run( ) which calls A( ) 500 times, and B( ) 500 times, the sample count of Run( ) would be 1000, even though Run( ) itself may be called only once?

@jonhoo
Copy link
Owner

jonhoo commented Oct 18, 2021

That depends on the collection format. I think in general the profilers report the number of samples in that function specifically, so if the sample count for A is 500, and the sample count for Run is 600, then that means the width of the stack frame for Run should be 1100 samples wide (and A's frame on top of that would be 500 wide).

@KnapSac
Copy link
Contributor Author

KnapSac commented Oct 19, 2021

That is what I was getting, both A and B were called 500 times, while Run was called only once, so Run had 1001 samples. Just wanted to double check that the sample count for Run was indeed correct :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants