RFR: 8258553 Limit number of fields in instance to be considered for scalar replacement

Igor Veresov iveresov at openjdk.java.net
Fri Dec 18 04:32:01 UTC 2020


I stumbled upon a test that we have (gc/TestBigObj.java) that has an object with 64k fields and that is scalar replaceable. Doing so puts a lot of strain on the compiler. I ran a few test and benchmarks and the maximum number of fields in scalar-replaced object that I've seen was 59. I think it should be reasonable to set a limit on the number of fields to 512.

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

Commit messages:
 - Limit number of fields in instance to be considered for scalar replacement

Changes: https://git.openjdk.java.net/jdk/pull/1837/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1837&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8258553
  Stats: 10 lines in 2 files changed: 10 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1837.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1837/head:pull/1837

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


More information about the hotspot-compiler-dev mailing list