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

Optimize freeblocks storage in MetaspaceArena after JEP387

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 16
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:

      Description

      Optimization after JEP387 hits mainline (we do not want it right now since we want to stabilize the patch):

      <quote>

      blocktree.hpp/cpp should be blockTree.hpp/cpp

      Since for class metaspace, the reclaimed InstanceKlass are generally
      bigger than the largest BinList size, maybe class type MetaspaceArenas
      should only have a blockTree and not a SmallBlocks, so not the whole
      freeList.hpp structure. I think we could do some footprint analysis
      with NMT and see if this might help. It's fairly rare unless you have a
      lot of redefinition. I don't think this should be changed in this
      change though.


      Oh good point.

      I would not like to hard-code the assumption that class space only contains Klass though; I dimly remember an RFR with Ioi where he tried storing other things there as well. IIRC he found some other solution. But my point is that this assumption is fragile.

      But a "soft assumption" would be fine. E.g. creating the BinList on the fly, only when needed, and separately from the blocktree. Easy to implement too.

      We don't need NMT to analyze. BinList currently has 32 slots, + counter + mask. We pay 272 bytes per structure, or 34 words. Which we would save per CLD.

      </quote>

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stuefe Thomas Stuefe
              Reporter:
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: