RFR: 8255720: Optimize bci_to_dp/-data by enabling iteration over raw DataLayouts

Claes Redestad redestad at openjdk.java.net
Sun Nov 1 23:43:00 UTC 2020


MethodData::bci_to_dp and ciMethodData::bci_to_data show up in startup/warmup profiles - much of the overhead allocating resource objects when iterating over ProfileData objects (next_data)

Providing a means to iterate over the raw DataLayout objects allow us to avoid explicitly allocating resource objects for purposes of calculating the next DataLayout address for the most common types. 

This patch reduces overhead of MethodData::bci_to_dp and ciMethodData::bci_to_data by 80% or more in profiles and has a measurable impact on simple startup tests, e.g. ~250k instruction (~0.2% of total) reduction on Hello World.

Testing: tier1-3 passed

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

Commit messages:
 - Merge branch 'master' into bci_to_dp_opt
 - Optimize bci_to_data in ciMethodData
 - Optimize bci_to_data similarly, remove dead code
 - Optimize bci_to_dp by enabling iteration over DataLayouts with as few allocations as possible

Changes: https://git.openjdk.java.net/jdk/pull/988/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=988&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8255720
  Stats: 95 lines in 4 files changed: 67 ins; 1 del; 27 mod
  Patch: https://git.openjdk.java.net/jdk/pull/988.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/988/head:pull/988

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


More information about the hotspot-compiler-dev mailing list