Re: RFR(S) 8241071 Generation of classes.jsa is not deterministic

2020-05-04 Thread David Holmes
Hi Ioi, On 5/05/2020 3:43 am, Ioi Lam wrote: On 4/27/20 7:05 PM, David Holmes wrote: On 28/04/2020 10:01 am, David Holmes wrote: On 28/04/2020 9:37 am, Ioi Lam wrote: Hi David & Jiangli, Thanks for your comments. I thought about using a system property, but the user can also specify it

Re: RFR(S) 8241071 Generation of classes.jsa is not deterministic

2020-05-04 Thread Ioi Lam
On 4/27/20 7:05 PM, David Holmes wrote: On 28/04/2020 10:01 am, David Holmes wrote: On 28/04/2020 9:37 am, Ioi Lam wrote: Hi David & Jiangli, Thanks for your comments. I thought about using a system property, but the user can also specify it like java -Djdk.xshare.dump.salt=0

Re: RFR(S) 8241071 Generation of classes.jsa is not deterministic

2020-04-27 Thread David Holmes
On 28/04/2020 10:01 am, David Holmes wrote: On 28/04/2020 9:37 am, Ioi Lam wrote: Hi David & Jiangli, Thanks for your comments. I thought about using a system property, but the user can also specify it like java -Djdk.xshare.dump.salt=0 MyProgram There's a way to pass properties

Re: RFR(S) 8241071 Generation of classes.jsa is not deterministic

2020-04-27 Thread David Holmes
On 28/04/2020 9:37 am, Ioi Lam wrote: Hi David & Jiangli, Thanks for your comments. I thought about using a system property, but the user can also specify it like     java -Djdk.xshare.dump.salt=0 MyProgram There's a way to pass properties from the VM that the user can't override. I'll

Re: RFR(S) 8241071 Generation of classes.jsa is not deterministic

2020-04-27 Thread Ioi Lam
Hi David & Jiangli, Thanks for your comments. I thought about using a system property, but the user can also specify it like     java -Djdk.xshare.dump.salt=0 MyProgram This would circumvent the calculation of ImmutableCollections.SALT32L for normal execution. I am not sure if this is

Re: RFR(S) 8241071 Generation of classes.jsa is not deterministic

2020-04-27 Thread Thomas Stüfe
Rethinking this a bit more I realize you need not addresses growing monotonously but deterministic allocation: given a sequence of Metaspace allocation operations (Metaspace::allocate(), Metaspace::deallocate(), and collection of class loaders), the pointers returned by Metaspace::allocate()

Re: RFR(S) 8241071 Generation of classes.jsa is not deterministic

2020-04-27 Thread Magnus Ihse Bursie
Hi Ioi, On 2020-04-27 07:22, Ioi Lam wrote: https://bugs.openjdk.java.net/browse/JDK-8241071 http://cr.openjdk.java.net/~iklam/jdk15/8241071-deterministic-cds-archive.v02/ I can't really comment on the code changes, but I'd like to thank you for the effort of getting a deterministic

Re: RFR(S) 8241071 Generation of classes.jsa is not deterministic

2020-04-27 Thread Thomas Stüfe
On Mon, Apr 27, 2020 at 8:23 AM David Holmes wrote: > Hi Ioi, > > On 27/04/2020 3:22 pm, Ioi Lam wrote: > > https://bugs.openjdk.java.net/browse/JDK-8241071 > > > http://cr.openjdk.java.net/~iklam/jdk15/8241071-deterministic-cds-archive.v02/ > > > > > > The goal is to for "java -Xshare:dump" to

Re: RFR(S) 8241071 Generation of classes.jsa is not deterministic

2020-04-27 Thread Thomas Stüfe
Hi Ioi, Please don't do this :) First off, how would this work when dumping with UseCompressedClassPointers off? In that case allocation would be relegated to non-class metaspace which cannot guarantee that kind of address stability. Even in class space, I do not think you can guarantee

Re: RFR(S) 8241071 Generation of classes.jsa is not deterministic

2020-04-27 Thread David Holmes
Hi Ioi, On 27/04/2020 3:22 pm, Ioi Lam wrote: https://bugs.openjdk.java.net/browse/JDK-8241071 http://cr.openjdk.java.net/~iklam/jdk15/8241071-deterministic-cds-archive.v02/ The goal is to for "java -Xshare:dump" to produce deterministic contents in the CDS archive that depend only on the

RFR(S) 8241071 Generation of classes.jsa is not deterministic

2020-04-26 Thread Ioi Lam
https://bugs.openjdk.java.net/browse/JDK-8241071 http://cr.openjdk.java.net/~iklam/jdk15/8241071-deterministic-cds-archive.v02/ The goal is to for "java -Xshare:dump" to produce deterministic contents in the CDS archive that depend only on the contents of $JAVA_HOME/lib/modules. Problems: [1]