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>
<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>
- relates to
-
JDK-8251158 Implementation of JEP 387: Elastic Metaspace
- Resolved