OpenJDK / jdk / jdk
changeset 49447:657893cb281b
8199674: Improve G1 Full GC array marking
Reviewed-by: tschatzl, shade
author | sjohanss |
---|---|
date | Thu, 15 Mar 2018 11:58:58 +0100 |
parents | 7a656b77a2d8 |
children | b91b558a9076 |
files | src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp Tue Mar 13 15:13:20 2018 -0700 +++ b/src/hotspot/share/gc/g1/g1FullGCMarker.inline.hpp Thu Mar 15 11:58:58 2018 +0100 @@ -107,6 +107,11 @@ const int stride = MIN2(len - beg_index, (int) ObjArrayMarkingStride); const int end_index = beg_index + stride; + // Push the continuation first to allow more efficient work stealing. + if (end_index < len) { + push_objarray(array, end_index); + } + array->oop_iterate_range(mark_closure(), beg_index, end_index); if (VerifyDuringGC) { @@ -117,10 +122,6 @@ assert(false, "Failed"); } } - - if (end_index < len) { - push_objarray(array, end_index); // Push the continuation. - } } inline void G1FullGCMarker::follow_object(oop obj) {