Skip to content

Conversation

@csfrancis
Copy link
Contributor

Problem

When profiling in object mode, the sample miss rate is incorrectly calculated. overall_signals is incremented every time a new object is allocated, however we only want to capture a sample every interval. This all but guarantees a miss rate of > 99% when profiling in object mode, which isn't accurate.

Solution

Add a new member to the _stackprof struct, newobj_signals, that we can use to track the number of allocations. If it's determined that we should capture a sample, then increment the overall_signals member. This should make the miss rate accurate again.

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 this pull request may close these issues.

1 participant