Details
-
Enhancement
-
Status: Resolved
-
P4
-
Resolution: Fixed
-
17, 18
-
b05
Description
G1BarrierSet::write_ref_array_pre_work roughly looks as follows:
if marking active -> exit
for all references in array:
if array[i] != NULL
enqueue(array[i])
enqueue every time checks again whether marking is active. In reality, the generated assembly code seems to load Thread::current() and does the check for every loop iteration which is really unnecessary.
Also some other code can be hoisted out of the loop which results in more compact generated code.
if marking active -> exit
for all references in array:
if array[i] != NULL
enqueue(array[i])
enqueue every time checks again whether marking is active. In reality, the generated assembly code seems to load Thread::current() and does the check for every loop iteration which is really unnecessary.
Also some other code can be hoisted out of the loop which results in more compact generated code.
Attachments
Issue Links
- relates to
-
JDK-8028337 Checkcast-arraycopy stub for G1 is very slow
-
- Open
-