RFR: 8189276: Make SuspendibleThreadSet and related code available to other GCs

Roman Kennke rkennke at redhat.com
Tue Oct 17 13:24:04 UTC 2017


The SuspendibleThreadSet API for synchronizing any non-Java thread with 
safepoints currently resides under gc/g1. It is very useful for other 
GCs too (in particular, Shenandoah does use it too), so I wanted to move 
it to a common location like gc/common. Then Kim Barrett commented that 
it might actually be useful for other threads outside GC land and to put 
it under runtime/. So I did:

http://cr.openjdk.java.net/~rkennke/8189276/webrev.00/ 
<http://cr.openjdk.java.net/%7Erkennke/8189276/webrev.00/>

I also added a generic hook to call the STS from safepoint sync/desync, 
which is consequently used by G1 now. In other words, the CollectedHeap 
API that Erik Ö introduced is no longer used by G1. Only CMS still uses 
that API because it has its own way to sync with safepoints. I filed 
another bug <https://bugs.openjdk.java.net/browse/JDK-8189364> for this. 
Although I have my doubt it will ever be fixed. This seems to have been 
very carefully evolved (to put it positive), and the risk of breaking it 
is relatively high, and thus doesn't seem worth the struggle to make it 
fit the STS.

Issue:
https://bugs.openjdk.java.net/browse/JDK-8189276

What do you think? Ok to go in?


Roman

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20171017/f2a985a4/attachment.htm>


More information about the hotspot-gc-dev mailing list