Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8295433

EpsilonHeap doesn't need to override post_initialize()

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • hotspot
    • gc
    • b20

    Description

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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: