RFR: 8152641: Plugin to generate BMH$Species classes ahead-of-time
claes.redestad at oracle.com
Thu Mar 24 13:42:03 UTC 2016
please review this patch which add an enabled-by-default plugin to
configurable list of BoundMethodHandle$Species_*-classes using jlink.
This plugin adds the --generate-bmh flag to jlink, which takes a
comma-separated list of shortened species type strings.
As an example: --generate-bmh LL,L3,L4 will generate
BoundMethodHandle$Species_LL, ...$Species_L3 and ...$Species_L4 and add
them to the java.base module.
The Species class lookup in BoundMethodHandle will first check if there
generated class, otherwise generate it as previously. Adding an exceptional
path might seem problematic, but as the code generation is magnitudes more
expensive than the exception it doesn't seem fruitful to go to lengths
More notes along with some results can be found here:
More information about the core-libs-dev