changeset 3801:ca6d147ed881

Merge
author jcoomes
date Thu, 01 Nov 2012 23:08:07 -0700
parents cae17c597196 3dfffc8b9722
children d8f9034920f6
files
diffstat 2 files changed, 2 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/memory/collectorPolicy.cpp	Thu Nov 01 11:57:53 2012 -0400
+++ b/src/share/vm/memory/collectorPolicy.cpp	Thu Nov 01 23:08:07 2012 -0700
@@ -742,6 +742,8 @@
   uint gc_count = 0;
   uint full_gc_count = 0;
 
+  assert(!Heap_lock->owned_by_self(), "Should not be holding the Heap_lock");
+
   do {
     MetaWord* result = NULL;
     if (GC_locker::is_active_and_needs_gc()) {
@@ -756,7 +758,6 @@
       }
       JavaThread* jthr = JavaThread::current();
       if (!jthr->in_critical()) {
-        MutexUnlocker mul(Heap_lock);
         // Wait for JNI critical section to be exited
         GC_locker::stall_until_clear();
         // The GC invoked by the last thread leaving the critical
--- a/src/share/vm/utilities/taskqueue.hpp	Thu Nov 01 11:57:53 2012 -0400
+++ b/src/share/vm/utilities/taskqueue.hpp	Thu Nov 01 23:08:07 2012 -0700
@@ -496,9 +496,7 @@
     }
   }
 
-  bool steal_1_random(uint queue_num, int* seed, E& t);
   bool steal_best_of_2(uint queue_num, int* seed, E& t);
-  bool steal_best_of_all(uint queue_num, int* seed, E& t);
 
   void register_queue(uint i, T* q);
 
@@ -538,46 +536,6 @@
 }
 
 template<class T, MEMFLAGS F> bool
-GenericTaskQueueSet<T, F>::steal_best_of_all(uint queue_num, int* seed, E& t) {
-  if (_n > 2) {
-    int best_k;
-    uint best_sz = 0;
-    for (uint k = 0; k < _n; k++) {
-      if (k == queue_num) continue;
-      uint sz = _queues[k]->size();
-      if (sz > best_sz) {
-        best_sz = sz;
-        best_k = k;
-      }
-    }
-    return best_sz > 0 && _queues[best_k]->pop_global(t);
-  } else if (_n == 2) {
-    // Just try the other one.
-    int k = (queue_num + 1) % 2;
-    return _queues[k]->pop_global(t);
-  } else {
-    assert(_n == 1, "can't be zero.");
-    return false;
-  }
-}
-
-template<class T, MEMFLAGS F> bool
-GenericTaskQueueSet<T, F>::steal_1_random(uint queue_num, int* seed, E& t) {
-  if (_n > 2) {
-    uint k = queue_num;
-    while (k == queue_num) k = TaskQueueSetSuper::randomParkAndMiller(seed) % _n;
-    return _queues[2]->pop_global(t);
-  } else if (_n == 2) {
-    // Just try the other one.
-    int k = (queue_num + 1) % 2;
-    return _queues[k]->pop_global(t);
-  } else {
-    assert(_n == 1, "can't be zero.");
-    return false;
-  }
-}
-
-template<class T, MEMFLAGS F> bool
 GenericTaskQueueSet<T, F>::steal_best_of_2(uint queue_num, int* seed, E& t) {
   if (_n > 2) {
     uint k1 = queue_num;