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

Thomas Schatzl tschatzl at openjdk.org
Tue Oct 18 08:13:23 UTC 2022


On Tue, 18 Oct 2022 01:59:54 GMT, Xin Liu <xliu at openjdk.org> wrote:

> 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.

Lgtm.

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

Marked as reviewed by tschatzl (Reviewer).

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



More information about the hotspot-gc-dev mailing list