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

Kim Barrett kim.barrett at oracle.com
Tue Apr 14 16:39:33 UTC 2015


On Apr 10, 2015, at 11:04 AM, Joseph Provino <joseph.provino at oracle.com> wrote:
> 
> Per, your analysis seems to be right on the money.
> 
> After initializing the variable and putting in asserts in join/leave
> and removing the asserts (which did indeed get hit) in synchronize/desynchronize
> it passes jprt.
> 
> Here's the latest webrev for review:
> 
> http://cr.openjdk.java.net/~jprovino/7006810/webrev.03

A couple of minor nits in src/share/vm/gc_implementation/shared/suspendibleThreadSet.cpp

  36   assert(Thread::current()->is_suspendible_thread() == false,
  37     "Thread already joined”);

I’d prefer !Thread::current()->is_suspendible_thread() rather than comparison to false.

  43 #ifdef ASSERT
  44   Thread::current()->set_suspendible_thread();
  45 #endif
 
Hotspot Stye guidelines suggest preferring DEBUG_ONLY forms to #ifdef ASSERT for short single-line conditionalization.  Similarly for the call to clear_suspendible_thread() a few lines later.





More information about the hotspot-gc-dev mailing list