< prev index next >
src/hotspot/share/gc/shared/taskqueue.inline.hpp
Print this page
rev 49680 : imported patch 6672778-partial-queue-trimming
@@ -150,19 +150,19 @@
assert(dirty_size(localBot, _age.top()) != N - 1, "sanity");
return false;
}
template<class E, MEMFLAGS F, unsigned int N> inline bool
-GenericTaskQueue<E, F, N>::pop_local(volatile E& t) {
+GenericTaskQueue<E, F, N>::pop_local(volatile E& t, uint threshold) {
uint localBot = _bottom;
// This value cannot be N-1. That can only occur as a result of
// the assignment to bottom in this method. If it does, this method
// resets the size to 0 before the next call (which is sequential,
// since this is pop_local.)
uint dirty_n_elems = dirty_size(localBot, _age.top());
assert(dirty_n_elems != N - 1, "Shouldn't be possible...");
- if (dirty_n_elems == 0) return false;
+ if (dirty_n_elems <= threshold) return false;
localBot = decrement_index(localBot);
_bottom = localBot;
// This is necessary to prevent any read below from being reordered
// before the store just above.
OrderAccess::fence();
< prev index next >