diff -r dc1769738300 -r b56ab8e56604 src/share/vm/utilities/taskqueue.hpp --- a/src/share/vm/utilities/taskqueue.hpp Tue Jul 24 13:22:11 2018 +0800 +++ b/src/share/vm/utilities/taskqueue.hpp Tue Jul 24 14:29:09 2018 +0800 @@ -111,13 +111,13 @@ // Internal type for indexing the queue; also used for the tag. typedef NOT_LP64(uint16_t) LP64_ONLY(uint32_t) idx_t; -#ifdef MIPS64 +#ifdef MIPS private: #endif // The first free element after the last one pushed (mod N). volatile uint _bottom; -#ifdef MIPS64 +#ifdef MIPS protected: inline uint get_bottom() const { return OrderAccess::load_acquire((volatile juint*)&_bottom); @@ -136,7 +136,7 @@ Age(const Age& age) { _data = age._data; } Age(idx_t top, idx_t tag) { _fields._top = top; _fields._tag = tag; } -#ifndef MIPS64 +#ifndef MIPS Age get() const volatile { return _data; } void set(Age age) volatile { _data = age._data; } @@ -219,7 +219,7 @@ // Return true if the TaskQueue contains/does not contain any tasks. bool peek() const { -#ifdef MIPS64 +#ifdef MIPS return get_bottom() != _age.top(); #else return _bottom != _age.top(); @@ -231,7 +231,7 @@ // The "careful" version admits the possibility of pop_local/pop_global // races. uint size() const { -#ifdef MIPS64 +#ifdef MIPS return size(get_bottom(), _age.top()); #else return size(_bottom, _age.top()); @@ -239,7 +239,7 @@ } uint dirty_size() const { -#ifdef MIPS64 +#ifdef MIPS return dirty_size(get_bottom(), _age.top()); #else return dirty_size(_bottom, _age.top()); @@ -247,7 +247,7 @@ } void set_empty() { -#ifdef MIPS64 +#ifdef MIPS set_bottom(0); #else _bottom = 0; @@ -303,7 +303,7 @@ typedef typename TaskQueueSuper::Age Age; typedef typename TaskQueueSuper::idx_t idx_t; -#ifndef MIPS64 +#ifndef MIPS using TaskQueueSuper::_bottom; #endif using TaskQueueSuper::_age; @@ -369,7 +369,7 @@ void GenericTaskQueue::oops_do(OopClosure* f) { // tty->print_cr("START OopTaskQueue::oops_do"); uint iters = size(); -#ifdef MIPS64 +#ifdef MIPS uint index = this->get_bottom(); #else uint index = _bottom; @@ -390,7 +390,7 @@ bool GenericTaskQueue::push_slow(E t, uint dirty_n_elems) { if (dirty_n_elems == N - 1) { // Actually means 0, so do the push. -#ifdef MIPS64 +#ifdef MIPS uint localBot = this->get_bottom(); #else uint localBot = _bottom; @@ -401,7 +401,7 @@ // assignment. However, casting to E& means that we trigger an // unused-value warning. So, we cast the E& to void. (void)const_cast(_elems[localBot] = t); -#ifdef MIPS64 +#ifdef MIPS this->set_bottom(increment_index(localBot)); #else OrderAccess::release_store(&_bottom, increment_index(localBot)); @@ -460,7 +460,7 @@ #if !(defined SPARC || defined IA32 || defined AMD64) OrderAccess::fence(); #endif -#ifdef MIPS64 +#ifdef MIPS uint localBot = this->get_bottom(); #else uint localBot = OrderAccess::load_acquire((volatile juint*)&_bottom); @@ -719,7 +719,7 @@ template inline bool GenericTaskQueue::push(E t) { -#ifdef MIPS64 +#ifdef MIPS uint localBot = this->get_bottom(); #else uint localBot = _bottom; @@ -735,7 +735,7 @@ // assignment. However, casting to E& means that we trigger an // unused-value warning. So, we cast the E& to void. (void) const_cast(_elems[localBot] = t); -#ifdef MIPS64 +#ifdef MIPS this->set_bottom(increment_index(localBot)); #else OrderAccess::release_store(&_bottom, increment_index(localBot)); @@ -749,7 +749,7 @@ template inline bool GenericTaskQueue::pop_local(volatile E& t) { -#ifdef MIPS64 +#ifdef MIPS uint localBot = this->get_bottom(); #else uint localBot = _bottom; @@ -762,7 +762,7 @@ assert(dirty_n_elems != N - 1, "Shouldn't be possible..."); if (dirty_n_elems == 0) return false; localBot = decrement_index(localBot); -#ifdef MIPS64 +#ifdef MIPS this->set_bottom(localBot); #else _bottom = localBot;