RFR: 8317677: Specialize Vtablestubs::entry_for() for VtableBlob

Thomas Schatzl tschatzl at openjdk.org
Mon Oct 9 11:09:42 UTC 2023


Hi all,

  please review this change that specializes the call to `Vtablestubs::entry_for` for vtable blob.

This kind of code blobs must always be in the `Vtablestubs` table (they are only created by the `Vtablestubs` class), so trying to find that stub there using it is unnecessary. For verification I added an assert that verifies it's found.

Given that `Vtablestubs::entry_point()` would take a lock this removal of the lock results in a large speedup (https://bugs.openjdk.org/browse/JDK-8317527) in MT situations and is an even better change than that mentioned CR - and also worth the extra code (I did not retest performance since the `Vtablestubs` table lookup should be fairly fast).

Fwiw, the first commit contains a different variant of this change, keeping the decision out of `Vtablestubs`, but I liked the current one better for it encapsulating that decision more. I am fine with reverting the second commit.

Testing: tier1-7, gha, stress testing

Thanks,
  Thomas

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

Commit messages:
 - Change to bool-returning predicate
 - inital version

Changes: https://git.openjdk.org/jdk/pull/16099/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16099&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8317677
  Stats: 15 lines in 3 files changed: 8 ins; 1 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/16099.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16099/head:pull/16099

PR: https://git.openjdk.org/jdk/pull/16099


More information about the hotspot-compiler-dev mailing list