Sharing the markword (aka Valhalla's markword use)

Kennke, Roman rkennke at amazon.de
Wed Mar 6 18:47:09 UTC 2024


> 
> We have a plan how we can make the class-pointer much smaller. Based on the observation that most workloads only require a few 10000 classes, let’s say 15 bits is ‘enough’ and not wasteful. Workloads that require more often generate those classes, which often don’t have many instances (e.g. only 1). In order to address arbitrary many classes, we would require one more bit that indicates that the class-pointer should be loaded from a dedicated field - this could be compressed 32 bits, or uncompressed 64 bits, or somehow be combined with the 15 class-bits from the header

I shall add that this is possible because we know at class-loading time whether or not we’re going to exceed the class-addressing-limit, and reserve the extra Klass* field at class-loading time, during field layout, and allocate all affected instances with that extra field right from the start, no stunts needed like with the compact I-hash stuff.

Roman




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879




More information about the valhalla-dev mailing list