-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[GR-47109] Support JFR event ObjectAllocationSample. #8316
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
Conversation
…test of distribution
… fields by lock access. Restrict access in JfrThrottler.
minor clean up
clean up JFR random
style
return false; | ||
} | ||
|
||
return activeWindow.sample(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @christianhaeubl this reverts the read-write lock changes. Doesn't this still have the same problems you were concerned about (#6899 (comment)).
A window may expire after a thread has checked expiry status but before it has sampled with respect to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I removed the read/write lock because I don't think that this race can cause any relevant problems (that is probably also the reason why HotSpot doesn't guard against it).
Thank you for working on integrating this. Apart from my comment above, the sampling logic and tests all seem fine to me. |
Thanks for double-checking. |
2784ab6
to
cf93204
Compare
cf93204
to
103af23
Compare
103af23
to
d721c1b
Compare
Based on #6899. This PR contains larger cleanups and changes the code so that it is a lot closer to the original C++ sources (makes maintenance easier).
@roberttoyonaga : please double-check this PR and let me know if I removed anything relevant.