Hi,

Please review following webrev that changes the instanceKlass::_implementors[] to an embedded instanceKlass field:

  http://cr.openjdk.java.net/~jiangli/7154670/webrev.00/

The embedded implementor field is only created for interfaces. Since the VM/compiler does not seem to use the implementor klassOop when there are more than one implementor and doesn't access _implementor[1], the embedded field is no longer a klassOop[2] array. It only holds one implementor klassOop now. When more than one implementor is loaded, the filed is set to the interface klassOop itself as a special indicator:

   Null: no implementor
   Implementor klassOop: one implementor
   Self: more than one implementor

The instanceKlass::_nof_implementors is removed as part of the change. For non-interface classes, this saves 12 bytes per class. For interfaces, it also saves 8 bytes per class.

Thanks,

Jiangli

Reply via email to