JDK-8202633 : Metachunk headers have grown too large
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2018-05-04
  • Updated: 2019-06-20
  • Resolved: 2018-05-26
Related Reports
Relates :  
Description
8198423 added some fields to the Metachunk header. So it has gotten a bit fat, measuring 64byte on 64bit platforms (up from former 16 byte). Worst case, it amounts to ca 6% of the total chunksize of specialized chunks. Since having a large number of specialized chunks usually means we are already in a pathological situation (e.g. reflection inflation), it makes sense to shave off some space off the headers, in order to ease the pain.

When reviewing 8198423 we decided that the additional information is useful and should be kept for release builds too. However, the header can be shrunk significantly just by packing the information better. All the additional information could fit into a single 64bit word, so in total the header could be compacted to 24 bytes. The information are accessed rarely enough that packing should not have significant performance impact.
Comments
Not worth fixing: Metachunk header size is 64 bytes but most of it stems from Metabase parent class (24 bytes) and non-negotiable members in Metachunk (top and associated node pointer, 16 bytes). That means the additional members bring in 24 bytes. By careful packing with bit fields I was able to reduce that to 8 bytes, however that makes the code unreadable and would amount to 16 bytes per chunk saved - from 64 to 48 bytes. Not worth the fix.
26-05-2018