Mercurial > hg > graal-jvmci-8
diff src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp @ 24077:8a2db0a6c499 jdk8u102-b35
8152438: Threads may do significant work out of the non-shared overflow buffer
Summary: 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
author | shshahma |
---|---|
date | Thu, 01 Sep 2016 06:16:05 -0700 |
parents | c132be0fb74d |
children |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp Thu Sep 15 09:06:56 2016 -0700 +++ b/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp Thu Sep 01 06:16:05 2016 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -148,7 +148,9 @@ 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)) {