RFR: Implement value type buffering for the interpreter

Frederic Parain frederic.parain at oracle.com
Tue Jun 20 20:50:53 UTC 2017


Greetings,

Here's a webrev implementing value type buffering for the interpreter.

http://cr.openjdk.java.net/~fparain/vt-buffering/webrev.01/

Buffering allows the interpreter to allocate values in a thread local
buffer to avoid Java heap allocations. Memory recycling is performed
on method exit and sometimes on backward branches.

Format of buffered values is almost identical to the format of
Java heap allocated values, so most code won't see any difference
between a buffered value and a not buffered value. The only difference
is in the first word of the header. Because of a change in GC closures
in JDK10, the first word now stores a reference to the Java mirror
of the value class in order to keep it alive. In JDK9, this operation
was performed through the klass pointer in the header, but the GC
team has removed this closure.

Buffering can be monitored using NMT or a new diagnostic command.

All tests pass and Sergey has already tested the patch with his
benchmark (and reported several bugs that are now fixed, thank
you Sergey).

Unfortunately, the changeset also includes a number of fixes not
related to buffering, like code clean up and access to uninitialized
static value fields.

Thanks,

Fred


More information about the valhalla-dev mailing list