1.1 --- a/src/share/vm/utilities/taskqueue.hpp Tue Oct 11 04:59:44 2016 -0400 1.2 +++ b/src/share/vm/utilities/taskqueue.hpp Wed Oct 12 02:29:05 2016 -0400 1.3 @@ -382,6 +382,9 @@ 1.4 (void)const_cast<E&>(_elems[localBot] = t); 1.5 OrderAccess::release_store(&_bottom, increment_index(localBot)); 1.6 TASKQUEUE_STATS_ONLY(stats.record_push()); 1.7 +#ifdef MIPS64 1.8 + if (Use3A2000) OrderAccess::fence(); 1.9 +#endif 1.10 return true; 1.11 } 1.12 return false; 1.13 @@ -506,6 +509,9 @@ 1.14 if (!taskqueue_t::push(t)) { 1.15 overflow_stack()->push(t); 1.16 TASKQUEUE_STATS_ONLY(stats.record_overflow(overflow_stack()->size())); 1.17 +#ifdef MIPS64 1.18 + if (Use3A2000) OrderAccess::fence(); 1.19 +#endif 1.20 } 1.21 return true; 1.22 } 1.23 @@ -578,10 +584,16 @@ 1.24 for (uint i = 0; i < 2 * _n; i++) { 1.25 if (steal_best_of_2(queue_num, seed, t)) { 1.26 TASKQUEUE_STATS_ONLY(queue(queue_num)->stats.record_steal(true)); 1.27 +#ifdef MIPS64 1.28 + if (Use3A2000) OrderAccess::fence(); 1.29 +#endif 1.30 return true; 1.31 } 1.32 } 1.33 TASKQUEUE_STATS_ONLY(queue(queue_num)->stats.record_steal(false)); 1.34 +#ifdef MIPS64 1.35 + if (Use3A2000) OrderAccess::fence(); 1.36 +#endif 1.37 return false; 1.38 } 1.39 1.40 @@ -697,6 +709,9 @@ 1.41 (void) const_cast<E&>(_elems[localBot] = t); 1.42 OrderAccess::release_store(&_bottom, increment_index(localBot)); 1.43 TASKQUEUE_STATS_ONLY(stats.record_push()); 1.44 +#ifdef MIPS64 1.45 + if (Use3A2000) OrderAccess::fence(); 1.46 +#endif 1.47 return true; 1.48 } else { 1.49 return push_slow(t, dirty_n_elems);