RFR: 8225702(13): Safepoint counter can't be used for safepoint detection

Robbin Ehn robbin.ehn at oracle.com
Fri Jun 14 08:26:44 UTC 2019


Hi all, please review.

This bug fix introduced a new useage of the safepoint counter.
Which does not work with the later pushed faster safepoint code.
https://bugs.openjdk.java.net/browse/JDK-8215889
http://hg.openjdk.java.net/jdk/jdk12/rev/4b469f5f4bf2

In faster safepoint we must publish the new safepoint counter before arming
and publish the inactive counter after. Reading the safepoint counter without
having first looked at your local poll can causes faulty assumption about
safepoint state.

We add a new safepoint id instead which work reliable and we hide the safepoint
counter getter. (JNI fast get can still use safepoint counter, so it's not
completely hidden) And provide a simple class to track safepoint state.
Also it makes no sense for a normal user that JFR/JMC safepoint id are only odd,
we instead use this new id which is just incremented for each safepoint.

Code:
http://cr.openjdk.java.net/~rehn/8225702/v1/webrev/index.html
Issue:
https://bugs.openjdk.java.net/browse/JDK-8225702

Passes JFR test and t1-3.

Thanks, Robbin


More information about the hotspot-jfr-dev mailing list