JEP 147: Reduce Class Metadata Footprint

OwnerJiangli Zhou
TypeFeature
ScopeImplementation
StatusClosed / Delivered
Release8
Componenthotspot / runtime
Discussionhotspot dash runtime dash dev at openjdk dot java dot net
EffortL
DurationL
Reviewed byBob Vandette
Endorsed byMikael Vidstedt
Created2011/10/17 20:00
Updated2014/08/08 20:54
Issue8046137

Summary

Reduce HotSpot's class metadata memory footprint in order to improve performance on small devices.

Success Metrics

Reduce class, method, and field metadata memory footprint by 25% as measured by calculating the space used by the relevant data structures (but excluding the space used for bytecodes and interned strings).

The startup and runtime performance of typical applications must not regress by more than 1%.

Description

Many of the memory-reduction techniques used in CVM, an embedded JVM for Java ME CDC, can be applied to HotSpot. For example:

As an example, the following four boolean fields in instanceKlass.hpp can be combined into a single u1 field:

bool _is_marked_dependent;   // used for marking during flushing & deopt
bool _rewritten;             // methods rewritten
bool _has_nonstatic_fields;  // for sizing with UseCompressedOops
bool _should_verify_class;   // allow caching of preverification

Impact