hotspot/src/share/vm/gc/g1/vm_operations_g1.cpp
changeset 37129 af29e306e50b
parent 35061 be6025ebffea
child 37137 62fd3fb4b1b1
--- a/hotspot/src/share/vm/gc/g1/vm_operations_g1.cpp	Wed Mar 16 16:21:36 2016 +0000
+++ b/hotspot/src/share/vm/gc/g1/vm_operations_g1.cpp	Thu Mar 17 08:07:53 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -205,23 +205,11 @@
 }
 
 void VM_CGC_Operation::acquire_pending_list_lock() {
-  assert(_needs_pll, "don't call this otherwise");
-  // The caller may block while communicating
-  // with the SLT thread in order to acquire/release the PLL.
-  SurrogateLockerThread* slt = ConcurrentMarkThread::slt();
-  if (slt != NULL) {
-    slt->manipulatePLL(SurrogateLockerThread::acquirePLL);
-  } else {
-    SurrogateLockerThread::report_missing_slt();
-  }
+  _pending_list_locker.lock();
 }
 
 void VM_CGC_Operation::release_and_notify_pending_list_lock() {
-  assert(_needs_pll, "don't call this otherwise");
-  // The caller may block while communicating
-  // with the SLT thread in order to acquire/release the PLL.
-  ConcurrentMarkThread::slt()->
-    manipulatePLL(SurrogateLockerThread::releaseAndNotifyPLL);
+  _pending_list_locker.unlock();
 }
 
 void VM_CGC_Operation::doit() {
@@ -236,10 +224,9 @@
 bool VM_CGC_Operation::doit_prologue() {
   // Note the relative order of the locks must match that in
   // VM_GC_Operation::doit_prologue() or deadlocks can occur
-  if (_needs_pll) {
+  if (_needs_pending_list_lock) {
     acquire_pending_list_lock();
   }
-
   Heap_lock->lock();
   return true;
 }
@@ -248,7 +235,7 @@
   // Note the relative order of the unlocks must match that in
   // VM_GC_Operation::doit_epilogue()
   Heap_lock->unlock();
-  if (_needs_pll) {
+  if (_needs_pending_list_lock) {
     release_and_notify_pending_list_lock();
   }
 }