Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v3]

2024-09-30 Thread Daniel Jeliński
On Mon, 30 Sep 2024 16:11:14 GMT, sbgoog wrote: >> FIleSystemPreferences.lockFile() catches an InterruptedException and just >> returns false, forgetting to re-interrupt the current thread. This leaves >> the caller with no way to observe that the thread was interrupted. This >> change restore

Re: RFR: 8340812: LambdaForm customization via MethodHandle::updateForm is not thread safe

2024-09-30 Thread David Holmes
On Mon, 30 Sep 2024 17:03:59 GMT, Jorn Vernee wrote: > In this case there is no classic release/acquire. Instead, we rely on other > properties: Relying on data-dependency is making assumptions about what the underlying hardware memory models actually do, and is something we should generally a

Re: RFR: 8341243: Use ArraySupport.SOFT_MAX_ARRAY_LENGTH for max array size in java.base

2024-09-30 Thread Eirik Bjørsnøs
On Tue, 1 Oct 2024 04:01:09 GMT, Stuart Marks wrote: > As this stands (modulo my other comments) this change is mostly OK. Using the > SOFT_MAX value within java.base is fine. Using SOFT_MAX within > java.base-related tests is a little suspicious, because it requires the > addition of directiv

Re: RFR: 8341243: Use ArraySupport.SOFT_MAX_ARRAY_LENGTH for max array size in java.base [v2]

2024-09-30 Thread Eirik Bjørsnøs
On Tue, 1 Oct 2024 03:38:26 GMT, Stuart Marks wrote: > The comment is a bit misleading. I'm not sure any comment is warranted, as > you had observed, there's a big description next to SOFT_MAX_ARRAY_LENGTH. > I'm also not sure a new local variable maxArrayLength adds anything. Thanks, I have r

Re: RFR: 8341243: Use ArraySupport.SOFT_MAX_ARRAY_LENGTH for max array size in java.base [v2]

2024-09-30 Thread Eirik Bjørsnøs
> Please review this cleanup PR which updates code and tests in `java.base` to > consistently use `jdk.internal.util.ArraySupport.SOFT_MAX_ARRAY_LENGTH` when > referring to the JVM's maximum array size implementation limit. Currently, > instances of `Integer.MAX_VALUE - 8` are found across the

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v19]

2024-09-30 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new vector operators. > > > . SUADD : Saturating unsigned addition. > . SADD: Saturating signed addition. > . SUSUB : Saturating unsigned subtraction. > . SSUB

Re: RFR: 8341243: Use ArraySupport.SOFT_MAX_ARRAY_LENGTH for max array size in java.base

2024-09-30 Thread Stuart Marks
On Mon, 30 Sep 2024 15:14:31 GMT, Eirik Bjørsnøs wrote: > Please review this cleanup PR which updates code and tests in `java.base` to > consistently use `jdk.internal.util.ArraySupport.SOFT_MAX_ARRAY_LENGTH` when > referring to the JVM's maximum array size implementation limit. Currently, >

Re: RFR: 8341243: Use ArraySupport.SOFT_MAX_ARRAY_LENGTH for max array size in java.base

2024-09-30 Thread Stuart Marks
On Mon, 30 Sep 2024 15:14:31 GMT, Eirik Bjørsnøs wrote: > Please review this cleanup PR which updates code and tests in `java.base` to > consistently use `jdk.internal.util.ArraySupport.SOFT_MAX_ARRAY_LENGTH` when > referring to the JVM's maximum array size implementation limit. Currently, >

Re: RFR: 8340572: ConcurrentModificationException when sorting ArrayList sublists

2024-09-30 Thread Stuart Marks
On Mon, 30 Sep 2024 19:44:05 GMT, Attila Szegedi wrote: >> Just an observation, but sorting is not defined as a "structural >> modification" but obviously would interfere with an active iterator. So the >> docs may need updating to include this aspect. > > @dholmes-ora and @dfuch both your obse

Re: RFR: 8340572: ConcurrentModificationException when sorting ArrayList sublists

2024-09-30 Thread David Holmes
On Sun, 29 Sep 2024 17:44:30 GMT, Attila Szegedi wrote: > Fixes a regression with #17818 where `ArrayList.subList(…).sort()` started > incrementing `ArrayList.modCount` resulting in some cases throwing a > `ConcurrentModificationException` where none was thrown before. > > This change keeps th

Re: RFR: 8340572: ConcurrentModificationException when sorting ArrayList sublists

2024-09-30 Thread Stuart Marks
On Tue, 1 Oct 2024 03:18:57 GMT, David Holmes wrote: >> Fixes a regression with #17818 where `ArrayList.subList(…).sort()` started >> incrementing `ArrayList.modCount` resulting in some cases throwing a >> `ConcurrentModificationException` where none was thrown before. >> >> This change keeps

Re: RFR: 8339329: ConstantPoolBuilder#constantValueEntry method doc typo and clarifications [v3]

2024-09-30 Thread Chen Liang
On Mon, 30 Sep 2024 14:59:12 GMT, David M. Lloyd wrote: >> Please review this small documentation change to ConstantPoolBuilder to fix >> a typo and clarify the usage of the `constantValueEntry` method. > > David M. Lloyd has updated the pull request incrementally with one additional > commit s

Re: RFR: 8329597: C2: Intrinsify Reference.clear [v6]

2024-09-30 Thread Kim Barrett
On Mon, 30 Sep 2024 16:59:16 GMT, Aleksey Shipilev wrote: >> [JDK-8240696](https://bugs.openjdk.org/browse/JDK-8240696) added the native >> method for `Reference.clear`. The original patch skipped intrinsification of >> this method, because we thought `Reference.clear` is not on a performance

Re: RFR: 8329597: C2: Intrinsify Reference.clear [v3]

2024-09-30 Thread Kim Barrett
On Mon, 30 Sep 2024 16:45:12 GMT, Aleksey Shipilev wrote: >> src/java.base/share/classes/java/lang/ref/Reference.java line 420: >> >>> 418: /* Implementation of clear(), also used by enqueue(). A simple >>> 419: * assignment of the referent field won't do for some garbage >>> 420:

RFR: 8341277: Validate slot argument for instruction factories

2024-09-30 Thread Chen Liang
Perform validation of local variable slots, multinewarray dimension, iinc value and specify these validations are performed. Specify these exception behaviors for sipush and bipush as well. This validation avoids using invalid values that will be lost once class files are written, and avoids in

Re: RFR: 8340229: Improve opening sentence of FileInputStream constructor specification

2024-09-30 Thread Brian Burkhalter
On Sun, 29 Sep 2024 07:00:49 GMT, Alan Bateman wrote: >> Improve the first sentences of the three `FileInputStream` constructors, in >> particular removing the term "connection." > > src/java.base/share/classes/java/io/FileInputStream.java line 166: > >> 164: /** >> 165: * Creates a {@

Re: RFR: 8340229: Improve opening sentence of FileInputStream constructor specification

2024-09-30 Thread Brian Burkhalter
On Sat, 28 Sep 2024 06:51:19 GMT, Jaikiran Pai wrote: > Do you think, as part of this PR, we should also revisit some of the javadoc > in the `java.io.FileOutputStream` class which too has several mentions of > "connection"? Are you thinking of this sentence ```A new FileDescriptor object is

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Mon, 30 Sep 2024 22:51:57 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Handling NPOT vector length for AArch64 SVE with vector sizes varying b/w >> 128 and 2048 bits at 128 bit inc

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Tue, 24 Sep 2024 07:10:24 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8340229: Improve opening sentence of FileInputStream constructor specification

2024-09-30 Thread Brian Burkhalter
On Sat, 28 Sep 2024 06:49:44 GMT, Jaikiran Pai wrote: >> Improve the first sentences of the three `FileInputStream` constructors, in >> particular removing the term "connection." > > src/java.base/share/classes/java/io/FileInputStream.java line 118: > >> 116: /** >> 117: * Creates a {@

Re: RFR: 8341141: Optimize DirectCodeBuilder [v14]

2024-09-30 Thread Chen Liang
On Mon, 30 Sep 2024 21:14:50 GMT, Shaojin Wen wrote: >> Some DirectCodeBuilder related optimizations to improve startup and running >> performance: >> 1. Merge calls, merge writeU1 and writeU2 into writeU3 >> 2. Merge calls, merge writeU1 and writeIndex operations >> 3. Directly use writeU1 inst

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Mon, 30 Sep 2024 21:28:22 GMT, Paul Sandoz wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/ByteVector.java >> line 551: >> >>> 549: return ((ByteVector)src1).vectorFactory(res); >>> 550: } >>> 551: >> >> This could instead be: >>src1.rearrange(this.lan

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Tue, 24 Sep 2024 07:10:24 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Paul Sandoz
On Sat, 28 Sep 2024 17:37:10 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Handling NPOT vector length for AArch64 SVE with vector sizes varying b/w >> 128 and 2048 bits at 128 bit inc

Re: RFR: 8341141: Optimize DirectCodeBuilder [v14]

2024-09-30 Thread Shaojin Wen
> Some DirectCodeBuilder related optimizations to improve startup and running > performance: > 1. Merge calls, merge writeU1 and writeU2 into writeU3 > 2. Merge calls, merge writeU1 and writeIndex operations > 3. Directly use writeU1 instead of writeBytecode > 4. Rewrite the implementation of load

Re: RFR: 8338023: Support two vector selectFrom API [v13]

2024-09-30 Thread Sandhya Viswanathan
On Tue, 24 Sep 2024 07:10:24 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v8]

2024-09-30 Thread Mark Sheppard
On Thu, 19 Sep 2024 17:55:13 GMT, Aleksei Efimov wrote: >> This PR proposes the following changes to address wrong timeout computations >> in the `com.sun.jndi.dns.DnsClient`: >> - The `DnsClient` has been updated to use a monotonic high-resolution (nano) >> clock. The existing `Timeout` test h

Re: RFR: 8340572: ConcurrentModificationException when sorting ArrayList sublists

2024-09-30 Thread Attila Szegedi
On Sun, 29 Sep 2024 21:50:21 GMT, David Holmes wrote: >> Fixes a regression with #17818 where `ArrayList.subList(…).sort()` started >> incrementing `ArrayList.modCount` resulting in some cases throwing a >> `ConcurrentModificationException` where none was thrown before. >> >> This change keeps

RFR: 8341243: Use ArraySupport.SOFT_MAX_ARRAY_LENGTH for max array size in java.base

2024-09-30 Thread Eirik Bjørsnøs
Please review this cleanup PR which updates code and tests in `java.base` to consistently use `jdk.internal.util.ArraySupport.SOFT_MAX_ARRAY_LENGTH` when referring to the JVM's maximum array size implementation limit. Currently, instances of `Integer.MAX_VALUE - 8` are found across the code bas

Re: RFR: 8340812: LambdaForm customization via MethodHandle::updateForm is not thread safe

2024-09-30 Thread Jorn Vernee
On Sun, 29 Sep 2024 23:52:29 GMT, David Holmes wrote: >> The `form` field is a final field; thus, all reads to that field is a >> load-acquire. This load-load barrier is critical to ensure observing the >> correct, non-null `vmentry` field value if the updated form is observed. >> >> Note that

Re: RFR: 8329597: C2: Intrinsify Reference.clear [v6]

2024-09-30 Thread Aleksey Shipilev
> [JDK-8240696](https://bugs.openjdk.org/browse/JDK-8240696) added the native > method for `Reference.clear`. The original patch skipped intrinsification of > this method, because we thought `Reference.clear` is not on a performance > sensitive path. However, it shows up prominently on simple be

Re: RFR: 8329597: C2: Intrinsify Reference.clear [v3]

2024-09-30 Thread Aleksey Shipilev
On Fri, 27 Sep 2024 23:51:13 GMT, Kim Barrett wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Amend the test case for guaranteing it works under different compilation >> regimes > > src/java.base/share/classes

Re: RFR: 8329597: C2: Intrinsify Reference.clear [v5]

2024-09-30 Thread Aleksey Shipilev
> [JDK-8240696](https://bugs.openjdk.org/browse/JDK-8240696) added the native > method for `Reference.clear`. The original patch skipped intrinsification of > this method, because we thought `Reference.clear` is not on a performance > sensitive path. However, it shows up prominently on simple be

Re: RFR: 8329597: C2: Intrinsify Reference.clear [v3]

2024-09-30 Thread Aleksey Shipilev
On Mon, 30 Sep 2024 15:08:53 GMT, Erik Österlund wrote: > I think we need a new > ZBarrierSetRuntime::no_keepalive_store_barrier_on_oop_field_without_healing(oop* > p) and to make that the selected slow path function when ZBarrierNoKeepalive > is set on a StorePNode. Its implementation would c

Re: RFR: 8329597: C2: Intrinsify Reference.clear [v4]

2024-09-30 Thread Aleksey Shipilev
> [JDK-8240696](https://bugs.openjdk.org/browse/JDK-8240696) added the native > method for `Reference.clear`. The original patch skipped intrinsification of > this method, because we thought `Reference.clear` is not on a performance > sensitive path. However, it shows up prominently on simple be

RFR: 8341246: Test com/sun/tools/attach/PermissionTest.java fails access denied

2024-09-30 Thread SendaoYan
Hi all, Test `com/sun/tools/attach/PermissionTest.java` fails access denied after [JDK-8327114](https://bugs.openjdk.org/browse/JDK-8327114). This testcase need the `readlink` permission of file `/proc/self/ns/mnt` after [JDK-8327114](https://bugs.openjdk.org/browse/JDK-8327114). So this PR add

Re: RFR: 8341064: Define anchor point and index term for "wrapper classes" [v3]

2024-09-30 Thread Joe Darcy
On Mon, 30 Sep 2024 12:53:26 GMT, Hannes Wallnöfer wrote: >> Fair enough, @hns. Initially, I thought to reply to you that we don't seem >> to specify the form of id generated by `@index` and that, in fact, it would >> be more error-prone for an author to guess/compute it in their head. For >>

Integrated: 8341064: Define anchor point and index term for "wrapper classes"

2024-09-30 Thread Joe Darcy
On Thu, 26 Sep 2024 23:46:04 GMT, Joe Darcy wrote: > The is the initial version of a PR to defined an anchor point and index term > of "wrapper classes." This pull request has now been integrated. Changeset: 5586f83e Author:Joe Darcy URL: https://git.openjdk.org/jdk/commit/5586f83e

Integrated: 8341100: Add index entries for terms used in java.lang.Class

2024-09-30 Thread Joe Darcy
On Sat, 28 Sep 2024 14:56:37 GMT, Joe Darcy wrote: > Small update to java.lang.Class docs. > > I didn't add an index item for "hidden classes" since the indexing mechanism > picks up the section titles. This pull request has now been integrated. Changeset: 4168faf5 Author:Joe Darcy URL:

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v2]

2024-09-30 Thread sbgoog
On Mon, 30 Sep 2024 15:58:53 GMT, Daniel Jeliński wrote: > For future reference, as the bot says, don't force push. The bot will squash > all commits before merging. I didn't realize before pushing, but now I know. Thanks! > The change looks good to me. Please update the copyright year. I've

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v3]

2024-09-30 Thread sbgoog
> FIleSystemPreferences.lockFile() catches an InterruptedException and just > returns false, forgetting to re-interrupt the current thread. This leaves the > caller with no way to observe that the thread was interrupted. This change > restores the interrupted status on the current thread before

Re: RFR: 8341100: Add index entries for terms used in java.lang.Class [v2]

2024-09-30 Thread Chen Liang
On Mon, 30 Sep 2024 02:18:17 GMT, Joe Darcy wrote: >> Small update to java.lang.Class docs. >> >> I didn't add an index item for "hidden classes" since the indexing mechanism >> picks up the section titles. > > Joe Darcy has updated the pull request incrementally with one additional > commit s

Re: RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v5]

2024-09-30 Thread Maurizio Cimadamore
On Mon, 30 Sep 2024 14:34:49 GMT, Vladimir Kozelkov wrote: > > I don't think anything else is needed here. > > Besides the fact that it shouldn't run, but it does (all 4 examples run > without any exception!) I meant - no other layout is needed - as we don't have any "alignment gap" here - th

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v2]

2024-09-30 Thread Daniel Jeliński
On Mon, 30 Sep 2024 14:31:51 GMT, sbgoog wrote: >> FIleSystemPreferences.lockFile() catches an InterruptedException and just >> returns false, forgetting to re-interrupt the current thread. This leaves >> the caller with no way to observe that the thread was interrupted. This >> change restore

Re: RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v4]

2024-09-30 Thread Lance Andersen
On Mon, 30 Sep 2024 15:09:21 GMT, Henry Jen wrote: > I considered that, but didn't implement it after confirmed other similar > options didn't display any warning. I do think it make sense to show a > warning when using an option not valid in specific mode. We do display a warning/error is som

Re: RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v3]

2024-09-30 Thread Henry Jen
On Sat, 28 Sep 2024 13:53:03 GMT, Jaikiran Pai wrote: >> Updated. > > Hello Henry, I think this `-k` option help text would need a slight > modification. Right now it states that if a file appears more than once in an > archive, then this setting this flag will not overwrite the earlier copies.

Re: RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v4]

2024-09-30 Thread Henry Jen
On Sat, 28 Sep 2024 14:32:31 GMT, Jaikiran Pai wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address review feedbacks > > test/jdk/tools/jar/ExtractFilesTest.java line 241: > >> 239: if (rc != 0) { >> 240:

Re: RFR: 8341141: Optimize DirectCodeBuilder [v13]

2024-09-30 Thread Shaojin Wen
> Some DirectCodeBuilder related optimizations to improve startup and running > performance: > 1. Merge calls, merge writeU1 and writeU2 into writeU3 > 2. Merge calls, merge writeU1 and writeIndex operations > 3. Directly use writeU1 instead of writeBytecode > 4. Rewrite the implementation of load

Re: RFR: 8329597: C2: Intrinsify Reference.clear [v3]

2024-09-30 Thread Erik Österlund
On Fri, 27 Sep 2024 18:57:51 GMT, Aleksey Shipilev wrote: > > Is ZGC affected by this? I see only G1 and Shenandoah changes. > > Good question. > > ZGC expands the GC barriers late. This is why the IR test configuration that > tests ZGC shows the same result as with other collectors: no additi

Re: RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v4]

2024-09-30 Thread Henry Jen
On Mon, 30 Sep 2024 11:23:33 GMT, Lance Andersen wrote: >> Henry Jen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address review feedbacks > > src/jdk.jartool/share/classes/sun/tools/jar/Main.java line 587: > >> 585:

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v2]

2024-09-30 Thread Daniel Fuchs
On Mon, 30 Sep 2024 14:29:03 GMT, sbgoog wrote: >> In which case the code might be simplified to just: >> >> } catch (InterruptedException e) { >> // Don't lose the interrupt >> Thread.currentThread().interrupt(); >> break; >>

Re: RFR: 8339329: ConstantPoolBuilder#constantValueEntry method doc typo and clarifications [v3]

2024-09-30 Thread David M . Lloyd
> Please review this small documentation change to ConstantPoolBuilder to fix a > typo and clarify the usage of the `constantValueEntry` method. David M. Lloyd has updated the pull request incrementally with one additional commit since the last revision: Review feedback - Change

Re: RFR: 8340572: ConcurrentModificationException when sorting ArrayList sublists

2024-09-30 Thread Daniel Fuchs
On Sun, 29 Sep 2024 17:44:30 GMT, Attila Szegedi wrote: > Fixes a regression with #17818 where `ArrayList.subList(…).sort()` started > incrementing `ArrayList.modCount` resulting in some cases throwing a > `ConcurrentModificationException` where none was thrown before. > > This change keeps th

Re: RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v5]

2024-09-30 Thread Vladimir Kozelkov
On Mon, 30 Sep 2024 14:21:56 GMT, Maurizio Cimadamore wrote: >I don't think anything else is needed here. Besides the fact that it shouldn't run, but it does (all 4 examples does) - PR Comment: https://git.openjdk.org/jdk/pull/21041#issuecomment-2383388238

Re: RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v5]

2024-09-30 Thread Maurizio Cimadamore
On Mon, 23 Sep 2024 16:35:18 GMT, Per Minborg wrote: >> This PR prevents sequence layout with padding to be used with the Linker. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Reword doce > And why doesn't the current str

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v2]

2024-09-30 Thread sbgoog
On Mon, 30 Sep 2024 14:06:35 GMT, Daniel Fuchs wrote: >> The status might not be explicitly checked, but setting the interrupted >> status will make sure that subsequent calls to sleep/await/tryLock etc. will >> not block. >> >> In general, we want to preserve the interrupted status until eith

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile() [v2]

2024-09-30 Thread sbgoog
> FIleSystemPreferences.lockFile() catches an InterruptedException and just > returns false, forgetting to re-interrupt the current thread. This leaves the > caller with no way to observe that the thread was interrupted. This change > restores the interrupted status on the current thread before

Re: RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v5]

2024-09-30 Thread Vladimir Kozelkov
On Mon, 30 Sep 2024 14:21:56 GMT, Maurizio Cimadamore wrote: > in all ABIs So... Ok, I did it for Android and it works. I don't know what should be in Windows or exotic Linux And why doesn't the current stripNames remove the targets from AddressLayout for the parameters from DowncallHandle?

Re: RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v5]

2024-09-30 Thread Maurizio Cimadamore
On Mon, 30 Sep 2024 14:05:23 GMT, Vladimir Kozelkov wrote: > > abstract "reduction" rules > > I already use a similar "reduction" in stripNames(), but for all layouts, not > just PaddingLayout. For example, nested structures and unions are unpacked to > be flatter and the MethodHandle cache is

Integrated: 8341199: Use ClassFile's new API loadConstant(int)

2024-09-30 Thread Shaojin Wen
On Mon, 30 Sep 2024 10:03:57 GMT, Shaojin Wen wrote: > The new API loadConstant(int) can shorten the calling path and can replace > ldc when the parameter is of int/Integer type. This pull request has now been integrated. Changeset: f1bf469b Author:Shaojin Wen URL: https://git.open

Re: RFR: 8341141: Optimize DirectCodeBuilder [v12]

2024-09-30 Thread Shaojin Wen
> Some DirectCodeBuilder related optimizations to improve startup and running > performance: > 1. Merge calls, merge writeU1 and writeU2 into writeU3 > 2. Merge calls, merge writeU1 and writeIndex operations > 3. Directly use writeU1 instead of writeBytecode > 4. Rewrite the implementation of load

RFR: 8339637: (tz) Update Timezone Data to 2024b

2024-09-30 Thread Johny Jose
Timezone data 2024b changes - Commit messages: - 8339637: (tz) Update Timezone Data to 2024b Changes: https://git.openjdk.org/jdk/pull/21265/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21265&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8339637 Stats: 1351 lin

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-30 Thread Daniel Fuchs
On Mon, 30 Sep 2024 13:46:55 GMT, Daniel Jeliński wrote: >> I thought that if an access error is found, then that would take precedence >> over the interrupt, especially since it occurs before the sleep. I was more >> concerned with just returning false and the caller not knowing if it's false

Re: RFR: 8341199: Use ClassFile's new API loadConstant(int)

2024-09-30 Thread Chen Liang
On Mon, 30 Sep 2024 12:38:47 GMT, Shaojin Wen wrote: >> The new API loadConstant(int) can shorten the calling path and can replace >> ldc when the parameter is of int/Integer type. > > I think loadConstant should be renamed to ldc @wenshao You can integrate this patch early even though it's muc

Re: RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v5]

2024-09-30 Thread Vladimir Kozelkov
On Mon, 30 Sep 2024 13:30:21 GMT, Maurizio Cimadamore wrote: >abstract "reduction" rules I already use similar "reduction" in stripNames(), but not only for PaddingLayout. For example, nested structures and unions are unpacked to be flatter and the MethodHandle cache is more efficient. I like

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v8]

2024-09-30 Thread Daniel Fuchs
On Thu, 19 Sep 2024 17:55:13 GMT, Aleksei Efimov wrote: >> This PR proposes the following changes to address wrong timeout computations >> in the `com.sun.jndi.dns.DnsClient`: >> - The `DnsClient` has been updated to use a monotonic high-resolution (nano) >> clock. The existing `Timeout` test h

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-30 Thread Daniel Jeliński
On Mon, 30 Sep 2024 13:07:42 GMT, sbgoog wrote: >> src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferences.java line >> 961: >> >>> 959: } catch(InterruptedException e) { >>> 960: checkLockFile0ErrorCode(errorCode); >>> 961: // Don't lose th

Re: RFR: 8341199: Use ClassFile's new API loadConstant(int)

2024-09-30 Thread Claes Redestad
On Mon, 30 Sep 2024 10:03:57 GMT, Shaojin Wen wrote: > The new API loadConstant(int) can shorten the calling path and can replace > ldc when the parameter is of int/Integer type. I'm in favor of removing `ldc(ConstantDesc)`, keeping the `ldc(LoadableConstantEntry)` for advanced uses. It's easi

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v8]

2024-09-30 Thread Daniel Fuchs
On Thu, 19 Sep 2024 17:55:13 GMT, Aleksei Efimov wrote: >> This PR proposes the following changes to address wrong timeout computations >> in the `com.sun.jndi.dns.DnsClient`: >> - The `DnsClient` has been updated to use a monotonic high-resolution (nano) >> clock. The existing `Timeout` test h

Re: RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v5]

2024-09-30 Thread Maurizio Cimadamore
On Mon, 30 Sep 2024 13:30:21 GMT, Maurizio Cimadamore wrote: > When writing this, I realize the last bullet above might be problematic for > jextract: jextract models unsupported types (e.g. `long double` in x64) as > padding. So I wonder what happens if two fields of unsupported types are >

Re: RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v5]

2024-09-30 Thread Maurizio Cimadamore
On Sat, 28 Sep 2024 06:55:11 GMT, Vladimir Kozelkov wrote: > Sorry for being late, but I came with a new batch of weird layouts Nice examples, thanks. Your examples seem to work under the assumption that e.g. a sequence of padding, or a struct that contains only padding can make sense when use

Re: RFR: 8341199: Use ClassFile's new API loadConstant(int)

2024-09-30 Thread Chen Liang
On Mon, 30 Sep 2024 10:03:57 GMT, Shaojin Wen wrote: > The new API loadConstant(int) can shorten the calling path and can replace > ldc when the parameter is of int/Integer type. I think to address these, we will leave the specification of `loadConstant` open so we can always flexibly adjust i

Re: RFR: 8340326: Remove references to Applet in core-libs/security tests [v7]

2024-09-30 Thread Daniel Fuchs
On Fri, 27 Sep 2024 18:08:54 GMT, Justin Lu wrote: >> Please review this PR which removes usages of Applet within the corelibs >> tests. >> >> Most changes are removed comments/updated var names. The JBS issue lists >> more files than the ones included in this pull request, please see the >>

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-30 Thread sbgoog
On Fri, 27 Sep 2024 18:46:54 GMT, Daniel Jeliński wrote: >> FIleSystemPreferences.lockFile() catches an InterruptedException and just >> returns false, forgetting to re-interrupt the current thread. This leaves >> the caller with no way to observe that the thread was interrupted. This >> chang

Integrated: 8339711: ZipFile.Source.initCEN needlessly reads END header

2024-09-30 Thread Eirik Bjørsnøs
On Sun, 8 Sep 2024 14:39:06 GMT, Eirik Bjørsnøs wrote: > Please review this cleanup PR which makes `ZipFile.Source.initCEN` not > include the 22-byte trailing`END` header when reading the `CEN` section of > the ZIP file. > > The reading of the END header was probably brought over from native c

Re: RFR: 8341064: Define anchor point and index term for "wrapper classes" [v3]

2024-09-30 Thread Hannes Wallnöfer
On Mon, 30 Sep 2024 11:41:19 GMT, Pavel Rappo wrote: >> Adding the `id` attribute to the `dfn` tag is an improvement over the `> name=...>` tag, but the embedded `{@index ...}` tag already generates a >> `span` tag with a very similar id derived from the tag content, in this case >> `id="wrappe

Re: RFR: 8341199: Use ClassFile's new API loadConstant(int)

2024-09-30 Thread Claes Redestad
On Mon, 30 Sep 2024 10:03:57 GMT, Shaojin Wen wrote: > The new API loadConstant(int) can shorten the calling path and can replace > ldc when the parameter is of int/Integer type. I consider this a bug in the API, too. Perhaps we could assert against usage that would have been better expressed

Re: RFR: 8341141: Optimize DirectCodeBuilder [v10]

2024-09-30 Thread Shaojin Wen
On Mon, 30 Sep 2024 06:48:07 GMT, Shaojin Wen wrote: >> Some DirectCodeBuilder related optimizations to improve startup and running >> performance: >> 1. Merge calls, merge writeU1 and writeU2 into writeU3 >> 2. Merge calls, merge writeU1 and writeIndex operations >> 3. Directly use writeU1 inst

Re: RFR: 8341141: Optimize DirectCodeBuilder [v11]

2024-09-30 Thread Shaojin Wen
> Some DirectCodeBuilder related optimizations to improve startup and running > performance: > 1. Merge calls, merge writeU1 and writeU2 into writeU3 > 2. Merge calls, merge writeU1 and writeIndex operations > 3. Directly use writeU1 instead of writeBytecode > 4. Rewrite the implementation of load

Re: RFR: 8341199: Use ClassFile's new API loadConstant(int)

2024-09-30 Thread David M . Lloyd
On Mon, 30 Sep 2024 10:03:57 GMT, Shaojin Wen wrote: > The new API loadConstant(int) can shorten the calling path and can replace > ldc when the parameter is of int/Integer type. I was also curious about a few other seemingly "obvious" small optimizations, like loading `-1L` as `iconst_m1; i2l

Re: RFR: 8341199: Use ClassFile's new API loadConstant(int)

2024-09-30 Thread Shaojin Wen
On Mon, 30 Sep 2024 10:03:57 GMT, Shaojin Wen wrote: > The new API loadConstant(int) can shorten the calling path and can replace > ldc when the parameter is of int/Integer type. I think loadConstant should be renamed to ldc - PR Comment: https://git.openjdk.org/jdk/pull/21259#iss

Re: RFR: 8341199: Use ClassFile's new API loadConstant(int)

2024-09-30 Thread Claes Redestad
On Mon, 30 Sep 2024 11:17:20 GMT, Chen Liang wrote: > This can also avoid cp entries for small values and use 2-byte bipush or > 1-byte constants, both smaller in size. Yikes, I was unaware `ldc` wouldn't optimize the emitted bytecode but reading through the code and docs it's pretty obvious.

Re: RFR: 8341199: Use ClassFile's new API loadConstant(int)

2024-09-30 Thread Claes Redestad
On Mon, 30 Sep 2024 10:03:57 GMT, Shaojin Wen wrote: > The new API loadConstant(int) can shorten the calling path and can replace > ldc when the parameter is of int/Integer type. Marked as reviewed by redestad (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/21259#pullreq

Re: RFR: 8336881: [Linux] Support for hierarchical limits for Metrics [v9]

2024-09-30 Thread Severin Gehwolf
On Mon, 30 Sep 2024 12:03:14 GMT, Severin Gehwolf wrote: >> Please review this fix for cgroups-based metrics reporting in the >> `jdk.internal.platform` package. This fix is supposed to address wrong >> reporting of certain limits if the limits aren't set at the leaf nodes. >> >> For example,

Re: RFR: 8336881: [Linux] Support for hierarchical limits for Metrics [v9]

2024-09-30 Thread Severin Gehwolf
> Please review this fix for cgroups-based metrics reporting in the > `jdk.internal.platform` package. This fix is supposed to address wrong > reporting of certain limits if the limits aren't set at the leaf nodes. > > For example, on cg v2, the memory limit interface file is `memory.max`. > Co

Re: RFR: 8341064: Define anchor point and index term for "wrapper classes" [v3]

2024-09-30 Thread Pavel Rappo
On Mon, 30 Sep 2024 10:36:55 GMT, Hannes Wallnöfer wrote: >> Thanks for the HTML tip; will add an id to the dfn tag. > > Adding the `id` attribute to the `dfn` tag is an improvement over the ` name=...>` tag, but the embedded `{@index ...}` tag already generates a > `span` tag with a very simila

Re: RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v3]

2024-09-30 Thread Lance Andersen
On Fri, 27 Sep 2024 01:42:26 GMT, Henry Jen wrote: >> src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties line >> 169: >> >>> 167: extracted: {0} >>> 168: out.kept=\ >>> 169: \ \ skipped: {0} >> >> We might want to add a bit more wording to indicate it is being

Re: RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v4]

2024-09-30 Thread Lance Andersen
On Fri, 27 Sep 2024 01:41:33 GMT, Henry Jen wrote: >> This PR support a -k, --keep options like tar that allows jar to avoid >> override existing files. > > Henry Jen has updated the pull request incrementally with one additional > commit since the last revision: > > Address review feedbacks

Re: RFR: 8341199: Use ClassFile's new API loadConstant(int)

2024-09-30 Thread Chen Liang
On Mon, 30 Sep 2024 10:03:57 GMT, Shaojin Wen wrote: > The new API loadConstant(int) can shorten the calling path and can replace > ldc when the parameter is of int/Integer type. Indeed, loadConstant was invented to be more optimized than ldc. This can also avoid cp entries for small values an

RFR: 8341199: Use ClassFile's new API loadConstant(int)

2024-09-30 Thread Shaojin Wen
The new API loadConstant(int) can shorten the calling path and can replace ldc when the parameter is of int/Integer type. - Commit messages: - use loadConstant instead of ldc Changes: https://git.openjdk.org/jdk/pull/21259/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21

Re: RFR: 8339711: ZipFile.Source.initCEN needlessly reads END header [v3]

2024-09-30 Thread Lance Andersen
On Mon, 30 Sep 2024 09:27:11 GMT, Eirik Bjørsnøs wrote: >> Please review this cleanup PR which makes `ZipFile.Source.initCEN` not >> include the 22-byte trailing`END` header when reading the `CEN` section of >> the ZIP file. >> >> The reading of the END header was probably brought over from na

Re: RFR: 8341064: Define anchor point and index term for "wrapper classes" [v3]

2024-09-30 Thread Hannes Wallnöfer
On Mon, 30 Sep 2024 02:07:08 GMT, Joe Darcy wrote: >> `` is a semantic tag to indicate the defining instance of a term. It >> may be used by search engines, to improve their results. When `` is >> used as intended, it may be reasonable and convenient to put an `id` on the >> tag, to provide

Re: RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v3]

2024-09-30 Thread Tobias Hartmann
On Fri, 27 Sep 2024 14:21:57 GMT, Galder Zamarreño wrote: >> This patch intrinsifies `Math.max(long, long)` and `Math.min(long, long)` in >> order to help improve vectorization performance. >> >> Currently vectorization does not kick in for loops containing either of >> these calls because of

Re: RFR: 8339711: ZipFile.Source.initCEN needlessly reads END header [v3]

2024-09-30 Thread Jaikiran Pai
On Mon, 30 Sep 2024 09:27:11 GMT, Eirik Bjørsnøs wrote: >> Please review this cleanup PR which makes `ZipFile.Source.initCEN` not >> include the 22-byte trailing`END` header when reading the `CEN` section of >> the ZIP file. >> >> The reading of the END header was probably brought over from na

Re: RFR: 8334714: Implement JEP 484: Class-File API [v6]

2024-09-30 Thread Adam Sotona
On Fri, 27 Sep 2024 16:29:30 GMT, ExE Boss wrote: > I wish that the concrete `PoolEntry` subtypes had `of(…)` factory methods... Please forward the proposal on clasfile-api-dev mailing list, where it can be discussed. Thank you. - PR Comment: https://git.openjdk.org/jdk/pull/19826

Re: RFR: 8339711: ZipFile.Source.initCEN needlessly reads END header [v3]

2024-09-30 Thread Claes Redestad
On Mon, 30 Sep 2024 09:24:22 GMT, Eirik Bjørsnøs wrote: >> Please review this cleanup PR which makes `ZipFile.Source.initCEN` not >> include the 22-byte trailing`END` header when reading the `CEN` section of >> the ZIP file. >> >> The reading of the END header was probably brought over from na

Re: RFR: 8339711: ZipFile.Source.initCEN needlessly reads END header [v2]

2024-09-30 Thread Eirik Bjørsnøs
On Sat, 28 Sep 2024 13:20:52 GMT, Jaikiran Pai wrote: >> Eirik Bjørsnøs has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional >> comm

Re: RFR: 8339711: ZipFile.Source.initCEN needlessly reads END header [v3]

2024-09-30 Thread Eirik Bjørsnøs
> Please review this cleanup PR which makes `ZipFile.Source.initCEN` not > include the 22-byte trailing`END` header when reading the `CEN` section of > the ZIP file. > > The reading of the END header was probably brought over from native code with > the transition to Java in JDK 9. > > In the

Re: RFR: 8341064: Define anchor point and index term for "wrapper classes" [v4]

2024-09-30 Thread Pavel Rappo
On Mon, 30 Sep 2024 02:10:09 GMT, Joe Darcy wrote: >> The is the initial version of a PR to defined an anchor point and index term >> of "wrapper classes." > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Respond to review fee

RFR: 8341184: Clean up the interaction between the launcher native code and the LauncherHelper

2024-09-30 Thread Jaikiran Pai
Can I please get a review of this change, which simplifies the interaction between the `java` launcher's native code with the `sun.launcher.LauncherHelper`? As noted in https://bugs.openjdk.org/browse/JDK-8341184, this proposed change reduces the back and forth between the launcher's native co

  1   2   >