[10] RFR: 8178384: Reduce work in java.lang.invoke initializers
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Mon Apr 10 15:19:12 UTC 2017
Looks good.
One small suggestion [1]
Best regards,
Vladimir Ivanov
[1] diff --git
a/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java
b/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java
--- a/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java
+++ b/src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java
@@ -456,6 +456,7 @@
static final String MH = "java/lang/invoke/MethodHandle";
static final String MH_SIG = "L"+MH+";";
static final String BMH =
"java/lang/invoke/BoundMethodHandle";
+ static final String BMH_NAME =
"java.lang.invoke.BoundMethodHandle";
static final String BMH_SIG = "L"+BMH+";";
static final String SPECIES_DATA =
"java/lang/invoke/BoundMethodHandle$SpeciesData";
static final String SPECIES_DATA_SIG = "L"+SPECIES_DATA+";";
@@ -463,7 +464,7 @@
static final String SPECIES_PREFIX_NAME = "Species_";
static final String SPECIES_PREFIX_PATH = BMH + "$" +
SPECIES_PREFIX_NAME;
- static final String SPECIES_CLASS_PREFIX =
SPECIES_PREFIX_PATH.replace('/', '.');
+ static final String SPECIES_CLASS_PREFIX = BMH_NAME + "$" +
SPECIES_PREFIX_NAME;
static final String BMHSPECIES_DATA_EWI_SIG = "(B)" +
SPECIES_DATA_SIG;
static final String BMHSPECIES_DATA_GFC_SIG = "(" + JLS_SIG +
JLC_SIG + ")" + SPECIES_DATA_SIG;
On 4/10/17 5:09 PM, Claes Redestad wrote:
> Hi,
>
> profiling initializers in java.lang.invoke shows we're still doing
> various things during
> class initialization which could be done lazily or not at all. The
> proposed patch
> reduce bytecode executed, memory churn and retained heap footprint when
> initializing java.lang.invoke:
>
> Webrev: http://cr.openjdk.java.net/~redestad/8178384/jdk.01/
> Bug: https://bugs.openjdk.java.net/browse/JDK-8178384
>
> Testing: java.lang.invoke jtreg tests, sanity performance testing
>
> Thanks!
>
> /Claes
More information about the core-libs-dev
mailing list