mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8152438: Threads may do significant work out of the non-shared overflow buffer
Before processing an element in the non-shared overflow buffer, try to push it into the local shared buffer to keep it full. Reviewed-by: jmasa, ehelin, sjohanss
This commit is contained in:
parent
161976b05f
commit
423717c156
3 changed files with 11 additions and 2 deletions
|
@ -137,7 +137,9 @@ void G1ParScanThreadState::trim_queue() {
|
|||
do {
|
||||
// Drain the overflow stack first, so other threads can steal.
|
||||
while (_refs->pop_overflow(ref)) {
|
||||
dispatch_reference(ref);
|
||||
if (!_refs->try_push_to_taskqueue(ref)) {
|
||||
dispatch_reference(ref);
|
||||
}
|
||||
}
|
||||
|
||||
while (_refs->pop_local(ref)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue