RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds

2021-10-22 Thread Jaikiran Pai
Can I please get a review for this change which fixes the issue reported in https://bugs.openjdk.java.net/browse/JDK-8275509? The `ModuleDescriptor.hashCode()` method uses the hash code of its various components to compute the final hash code. While doing so it ends up calling hashCode() on (co

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds

2021-10-22 Thread Alan Bateman
On Fri, 22 Oct 2021 09:33:35 GMT, Jaikiran Pai wrote: > Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the fin

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds

2021-11-03 Thread Alan Bateman
On Wed, 3 Nov 2021 03:22:40 GMT, Jaikiran Pai wrote: > So I decided to stick with using the ordinal modifiers in the hashCode() > computation. However, I'm not an expert on the performance aspects of the > Collections and how much using the modifiers for hashCode() will improve the > performan

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds

2021-11-03 Thread Jaikiran Pai
Hello Alan, On 04/11/21 1:21 am, Alan Bateman wrote: On Wed, 3 Nov 2021 03:22:40 GMT, Jaikiran Pai wrote: So I decided to stick with using the ordinal modifiers in the hashCode() computation. However, I'm not an expert on the performance aspects of the Collections and how much using the mod

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds

2021-11-03 Thread Jaikiran Pai
On Thu, 4 Nov 2021 03:18:40 GMT, Jaikiran Pai wrote: > > So I decided to stick with using the ordinal modifiers in the hashCode() > > computation. However, I'm not an expert on the performance aspects of the > > Collections and how much using the modifiers for hashCode() will improve > > the p

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds

2021-11-04 Thread Alan Bateman
On Thu, 4 Nov 2021 05:21:25 GMT, Jaikiran Pai wrote: > That's a good point and thank you for explaining that part. So to address > that, how about not leaving them out, but instead of using `Enum#ordinal()` > for the hashCode generation, we use `Enum#name()` which would translate to a > `Strin

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v2]

2021-10-22 Thread Jaikiran Pai
On Fri, 22 Oct 2021 10:17:13 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - drop final >> - no need to check for null values > > src/java.base/share/classes/java/lang/module/ModuleDescriptor.j

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v2]

2021-10-22 Thread Jaikiran Pai
> Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the final hash code. While doing so it ends up calling > hashC

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v3]

2021-10-22 Thread Jaikiran Pai
> Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the final hash code. While doing so it ends up calling > hashC

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v3]

2021-10-25 Thread Magnus Ihse Bursie
On Fri, 22 Oct 2021 10:44:31 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which fixes the issue reported in >> https://bugs.openjdk.java.net/browse/JDK-8275509? >> >> The `ModuleDescriptor.hashCode()` method uses the hash code of its various >> components to compute th

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v4]

2021-10-25 Thread Jaikiran Pai
> Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the final hash code. While doing so it ends up calling > hashC

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v3]

2021-10-25 Thread Jaikiran Pai
On Mon, 25 Oct 2021 08:04:43 GMT, Magnus Ihse Bursie wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> drop another final to make it consistent with rest of the code > > test/jdk/java/lang/module/ModuleDescriptorHash

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v4]

2021-10-27 Thread Jaikiran Pai
On Fri, 22 Oct 2021 10:33:42 GMT, Jaikiran Pai wrote: >> src/java.base/share/classes/java/lang/module/ModuleDescriptor.java line 2559: >> >>> 2557: continue; >>> 2558: } >>> 2559: h += e.ordinal(); >> >> This e == null check suggests there is an issue els

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v4]

2021-10-28 Thread Alan Bateman
On 28/10/2021 05:43, Jaikiran Pai wrote: : Hello Alan, Looking at the CDS issue that's being tracked at https://bugs.openjdk.java.net/browse/JDK-8275731, it's looking like a much bigger change and might take a while. In the meantime do you think this test case (and the fix to the hashCode() p

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v5]

2021-10-28 Thread Jaikiran Pai
> Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the final hash code. While doing so it ends up calling > hashC

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v4]

2021-10-28 Thread Jaikiran Pai
On Mon, 25 Oct 2021 09:21:28 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which fixes the issue reported in >> https://bugs.openjdk.java.net/browse/JDK-8275509? >> >> The `ModuleDescriptor.hashCode()` method uses the hash code of its various >> components to compute th

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v4]

2021-10-31 Thread Alan Bateman
On Fri, 29 Oct 2021 04:19:21 GMT, Jaikiran Pai wrote: > Do you mean the jtreg `driver` style this test is using? I used it because it > was necessary to compare output (the hashCode value) between multiple JVM > runs. I use the `driver` along with the `ProcessBuilder` to capture the > output b

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v4]

2021-10-31 Thread Jaikiran Pai
Hello Alan, On 01/11/21 1:03 am, Alan Bateman wrote: On Fri, 29 Oct 2021 04:19:21 GMT, Jaikiran Pai wrote: Do you mean the jtreg `driver` style this test is using? I used it because it was necessary to compare output (the hashCode value) between multiple JVM runs. I use the `driver` along w

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v6]

2021-10-31 Thread Jaikiran Pai
> Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the final hash code. While doing so it ends up calling > hashC

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v4]

2021-10-31 Thread Jaikiran Pai
On 01/11/21 7:26 am, Jaikiran Pai wrote: Hello Alan, On 01/11/21 1:03 am, Alan Bateman wrote: On Fri, 29 Oct 2021 04:19:21 GMT, Jaikiran Pai wrote: Do you mean the jtreg `driver` style this test is using? I used it because it was necessary to compare output (the hashCode value) between mu

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v7]

2021-10-31 Thread Jaikiran Pai
> Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the final hash code. While doing so it ends up calling > hashC

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v8]

2021-10-31 Thread Jaikiran Pai
> Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the final hash code. While doing so it ends up calling > hashC

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v9]

2021-10-31 Thread Jaikiran Pai
> Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the final hash code. While doing so it ends up calling > hashC

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v9]

2021-11-01 Thread Alan Bateman
On Mon, 1 Nov 2021 03:10:45 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which fixes the issue reported in >> https://bugs.openjdk.java.net/browse/JDK-8275509? >> >> The `ModuleDescriptor.hashCode()` method uses the hash code of its various >> components to compute the

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v10]

2021-11-01 Thread Jaikiran Pai
> Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the final hash code. While doing so it ends up calling > hashC

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v9]

2021-11-01 Thread Jaikiran Pai
Hello Alan, On 01/11/21 9:22 pm, Alan Bateman wrote: On Mon, 1 Nov 2021 03:10:45 GMT, Jaikiran Pai wrote: Can I please get a review for this change which fixes the issue reported in https://bugs.openjdk.java.net/browse/JDK-8275509? The `ModuleDescriptor.hashCode()` method uses the hash code

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v9]

2021-11-01 Thread Jaikiran Pai
On 02/11/21 10:29 am, Jaikiran Pai wrote: Hello Alan, On 01/11/21 9:22 pm, Alan Bateman wrote: On Mon, 1 Nov 2021 03:10:45 GMT, Jaikiran Pai wrote: Can I please get a review for this change which fixes the issue reported in https://bugs.openjdk.java.net/browse/JDK-8275509? The `ModuleDes

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v9]

2021-11-02 Thread Alan Bateman
On 02/11/2021 06:38, Jaikiran Pai wrote: : Perhaps run 1 writing the hash code of each of the boot modules' descriptor into a file and then run 2 reading that same file to compare the hash codes would be one way to do it. But I think that would just make this test more complex, which I think

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v11]

2021-11-02 Thread Jaikiran Pai
> Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the final hash code. While doing so it ends up calling > hashC

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v9]

2021-11-02 Thread Jaikiran Pai
Hello Alan, On 02/11/21 5:30 pm, Alan Bateman wrote: On 02/11/2021 06:38, Jaikiran Pai wrote: : Perhaps run 1 writing the hash code of each of the boot modules' descriptor into a file and then run 2 reading that same file to compare the hash codes would be one way to do it. But I think that

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v9]

2021-11-02 Thread Jaikiran Pai
On 03/11/21 8:50 am, Jaikiran Pai wrote: Hello Alan, On 02/11/21 5:30 pm, Alan Bateman wrote: On 02/11/2021 06:38, Jaikiran Pai wrote: : Perhaps run 1 writing the hash code of each of the boot modules' descriptor into a file and then run 2 reading that same file to compare the hash codes

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v12]

2021-11-03 Thread Jaikiran Pai
> Can I please get a review for this change which fixes the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8275509? > > The `ModuleDescriptor.hashCode()` method uses the hash code of its various > components to compute the final hash code. While doing so it ends up calling > hashC

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v12]

2021-11-04 Thread Alan Bateman
On Thu, 4 Nov 2021 05:16:42 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which fixes the issue reported in >> https://bugs.openjdk.java.net/browse/JDK-8275509? >> >> The `ModuleDescriptor.hashCode()` method uses the hash code of its various >> components to compute the

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v12]

2021-11-04 Thread Magnus Ihse Bursie
On Thu, 4 Nov 2021 05:16:42 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which fixes the issue reported in >> https://bugs.openjdk.java.net/browse/JDK-8275509? >> >> The `ModuleDescriptor.hashCode()` method uses the hash code of its various >> components to compute the

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v12]

2021-11-04 Thread Jaikiran Pai
On Thu, 4 Nov 2021 14:08:50 GMT, Alan Bateman wrote: > One final thought on this is whether we should remove the > tools/jlink/JLinkReproducibleXXX tests from the exclude list. Yes, I'm working on it in a separate PR. - PR: https://git.openjdk.java.net/jdk/pull/6078

Re: RFR: 8275509: ModuleDescriptor.hashCode isn't reproducible across builds [v12]

2021-11-04 Thread Jaikiran Pai
On Thu, 4 Nov 2021 05:16:42 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which fixes the issue reported in >> https://bugs.openjdk.java.net/browse/JDK-8275509? >> >> The `ModuleDescriptor.hashCode()` method uses the hash code of its various >> components to compute the