EpsilonHeap doesn't need to override post_initialize()

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 20
    • Affects Version/s: 20
    • Component/s: hotspot
    • gc
    • b20

      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.

        // ("weak") refs processing infrastructure initialization
        Universe::heap()->post_initialize();

       1bf724e: 48 8b 3d 73 8a 82 00 mov 0x828a73(%rip),%rdi # 241fcc8 <_ZN8Universe14_collectedHeapE>
       1bf7255: 48 8b 07 mov (%rdi),%rax
       1bf7258: ff 50 40 callq *0x40(%rax)

      By deleting it, HotSpot still needs a call via vtable, but the target is correct. It won't need to the second jump to CollectedHeap::post_initialize().

            Assignee:
            Xin Liu
            Reporter:
            Xin Liu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: