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

Optimize freeblocks storage in MetaspaceArena after JEP387



    • Enhancement
    • Resolution: Won't Fix
    • P4
    • tbd
    • 16
    • hotspot


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


      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.



        Issue Links



              stuefe Thomas Stuefe
              stuefe Thomas Stuefe
              0 Vote for this issue
              1 Start watching this issue