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

Fix missed samples stat in object mode #109

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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