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

Remove the support for inline contiguous allocations

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 20
    • 20
    • hotspot
    • None
    • gc
    • b08

    Description

      (This bothered me for a while...)

      There are two major ways to allocate the object:
       1) Use the TLAB, and allocate the object there with the fastpath code;
       2) Fall back to VM and call the native GC interface for allocation;

      In some GCs, however, there is a third way to perform the allocation: the inline contiguous allocation, when TLABs are disabled. It works for Serial and Parallel (without NUMA), and it exposes the eden pointers for the platform-specific code to CAS-allocate objects there. Pretty much like it does for TLABs, but assumes there are contenders.

      TLABs are supported and enabled by default by most (all?) configurations right now. Zero was probably the only thing that made the awkward choice of disabling the TLABs, fixed by JDK-8255782. The future is likely to go with regionalized collectors (G1, Shenandoah, ZGC) which do not provide eden and inline contiguous alloc capability. Disabling the TLABs is expected to penalize allocation performance.

      All this means inline contiguous allocation code is very seldom used, and does not carry its weight. We should consider removing this from VM/GC code to simplify the allocation paths.

      Draft change:
       https://github.com/openjdk/jdk/pull/9576

      Attachments

        Issue Links

          Activity

            People

              shade Aleksey Shipilev
              shade Aleksey Shipilev
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: