diff --git a/src/share/vm/utilities/taskqueue.hpp b/src/share/vm/utilities/taskqueue.hpp index 4dde2c4bcde5ec1bcd067be4655f4dc917f26ba3..dd98186bb3660198a947812e6ff5020e45929d6c 100644 --- a/src/share/vm/utilities/taskqueue.hpp +++ b/src/share/vm/utilities/taskqueue.hpp @@ -496,9 +496,7 @@ public: } } - 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); @@ -537,46 +535,6 @@ GenericTaskQueueSet::steal(uint queue_num, int* seed, E& t) { return false; } -template bool -GenericTaskQueueSet::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 bool -GenericTaskQueueSet::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 bool GenericTaskQueueSet::steal_best_of_2(uint queue_num, int* seed, E& t) { if (_n > 2) {