RFR: JDK-8301378: CodeHeap has virtual methods that are not overridden

Justin King jcking at openjdk.org
Mon Jan 30 19:50:59 UTC 2023


Remove unused `virtual` specifiers on `CodeHeap` methods. Virtual dispatch is not free in C++ and usually incurs a vtable lookup unless the compiler can prove the type is final, which with the current setup is not feasible.

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

Commit messages:
 - CodeHeap has virtual methods that are not overriden

Changes: https://git.openjdk.org/jdk/pull/12298/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=12298&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8301378
  Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/12298.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/12298/head:pull/12298

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


More information about the hotspot-runtime-dev mailing list