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 Hotspot Safepoint metrics #979

Closed
wants to merge 2 commits into from
Closed

Conversation

DanielThomas
Copy link
Member

@DanielThomas DanielThomas commented Jul 18, 2022

Add hotspot safepoint metrics to help identify when safepoints and safepoint sync times are a problem. Unfortunately this relies on a propriety API, but there's no other way of getting at this at runtime on JDK 8 through latest. JFR event streams are JDK 15 and later for instance, and this is so much simpler. Some background here:

https://mail.openjdk.org/pipermail/serviceability-dev/2021-June/038222.html

This came up in the context of issue with I/O bound GC pauses on JDK 17:

https://twitter.com/DannyThomas/status/1546758318492102657

While I was at it, I went looking for any other causes of safepoint I/O latency and issues with safepoint sync times, and I can think of several places where we could be affected not only by that, but time-to-safepoint effective pauses where we're in JNI, etc:

@DanielThomas
Copy link
Member Author

DanielThomas commented Jul 18, 2022

Looks like --release isn't aware of different package access between JDK versions, and you can't specify --add-exports.

https://bugs.openjdk.org/browse/JDK-8178152

@DanielThomas DanielThomas force-pushed the dannyt/hotspot-metrics branch 4 times, most recently from 261c5be to 6c4d28a Compare July 18, 2022 06:28
@brharrington brharrington added this to the 1.3.6 milestone Jul 18, 2022
@DanielThomas
Copy link
Member Author

@brharrington realized this is much simpler if I we just use toolchains. Build changes moved to a separate commit before the hotspot metrics - see what you think.

@brharrington
Copy link
Contributor

Thanks, I have started looking at it and should be able to go through it in detail later today.

@brharrington
Copy link
Contributor

I refactored it a bit to model as timers: brharrington@6eff138, doesn't look like I can push to the PR branch. Anyway let me know what you think. I'm going to build a version of the jar and run it on some test instances over the weekend.

@DanielThomas
Copy link
Member Author

That's awesome, thanks @brharrington! Really have to work on my Spectator foo, I never seem to get this right the first time :)

@brharrington
Copy link
Contributor

Closing in favor of #980

@brharrington brharrington deleted the dannyt/hotspot-metrics branch July 27, 2022 14:59
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.

2 participants