RFR: 8295433: EpsilonHeap doesn't need to override post_initialize()

Xin Liu xliu at openjdk.org
Tue Oct 18 02:06:56 UTC 2022


post_initialize() is a virtual function of CollectedHeap. EpsilonGC doesn't have a particular reason to override it.
Its implementation just calls the base's post_initialize(). 


void EpsilonHeap::post_initialize() {
  CollectedHeap::post_initialize();
  }
``` 

In universe_post_init(), HotSpot invokes post_initialize() via vtable.
Universe::heap()->post_initialize(); 

By deleting it, HotSpot still needs a call via vtable, but it will jump to CollectedHeap::post_initialize() directly.

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

Commit messages:
 - 8295433: EpsilonHeap doesn't need to override post_initialize()

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

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



More information about the hotspot-gc-dev mailing list