RFR: 8263361: Incorrect arraycopy stub selected by C2 for SATB collectors [v2]

Nils Eliasson neliasso at openjdk.java.net
Mon Mar 15 15:51:21 UTC 2021


> This bug has only been reproduced with -XX:+StressReflectiveCode and -XX:-ReduceInitialCardMarks. If StressReflectiveCode is necessary isn't obvious.
> 
> I am fixing three things:
> 
> 1) When running with ReduceInitialCardMarks enabled the stubroutines for int- or long-arraycopy will be used for arraycopies to tightly allocated arrays (like when cloning). With ReduceInitialCardMarks disabled the oop-version will be used with barriers.
> 
> The generate_arraycopy method in PhaseMacroExpand have a bool dest_uninitialized field - but that field denotes that we have proven that no zeroing is necessary (since all fields will be written anyway). 
> 
> To fix this bug generate_unchecked_arraycopy with the param dest_uninitialized will need to be appended with a check for tighly coupled object-copies when ReduceInitialCardMarks is disabled.
> 
> 2) I also fix a bug in library_call kit where arraycopy for clones doesn't get marked as tightly coupled - The call to tightly_coupled_allocation can't be used when the IR isn't constructed yet.
> 
> 3) In stubroutines.cpp I fix so that the name of the arraycopy stubroutines gets appended with _uninit when appropriate. This shows up in ir-dumps and IGV.
> 
> Please review,
> Nils Eliasson

Nils Eliasson has updated the pull request incrementally with one additional commit since the last revision:

  Rename and restructure

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/3008/files
  - new: https://git.openjdk.java.net/jdk/pull/3008/files/52281229..fbfa0f92

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3008&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3008&range=00-01

  Stats: 42 lines in 1 file changed: 10 ins; 4 del; 28 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3008.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3008/head:pull/3008

PR: https://git.openjdk.java.net/jdk/pull/3008


More information about the hotspot-compiler-dev mailing list