JEP 147: Reduce Class Metadata Footprint (original) (raw)

Owner Jiangli Zhou
Type Feature
Scope Implementation
Status Closed / Delivered
Release 8
Component hotspot / runtime
Discussion hotspot dash runtime dash dev at openjdk dot java dot net
Effort L
Duration L
Reviewed by Bob Vandette
Endorsed by Mikael Vidstedt
Created 2011/10/17 20:00
Updated 2014/08/08 20:54
Issue 8046137

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.hppcan 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