RFR (XXS): 7006810: G1: Introduce peace-of-mind checking in the Suspendible Thread Set

Per Liden per.liden at oracle.com
Tue Apr 7 08:33:00 UTC 2015


Hi Joe,

suspendibleThreadSet.cpp:

   78 void SuspendibleThreadSet::synchronize() {
   79   assert(Thread::current()->has_joined_suspendible_thread_set(),
   80     "Must have joined");
   ...
   93 void SuspendibleThreadSet::desynchronize() {
   94   assert(Thread::current()->has_joined_suspendible_thread_set(),
   95     "Must have joined");

This does not look right to me. The VM thread is the only one calling 
synchronize/desynchronize, and that should not be part of the sts. Note 
that you need to enable G1 to test this code path. Did you run this 
through jprt?

I agree with others comments about using #ifdef ASSERT for the stuff in 
the thread class to avoid the #else part.

cheers,
/Per

On 2015-04-06 19:25, Joseph Provino wrote:
> CR:  https://bugs.openjdk.java.net/browse/JDK-7006810
>
> webrev:  http://cr.openjdk.java.net/~jprovino/7006810/webrev.00
>
> test:  jprt


More information about the hotspot-gc-dev mailing list