Re: RFR: 8339810: Cleanup the code in sun.tools.jar.Main to properly close resources and use ZipFile during extract [v2]

2024-09-09 Thread Jaikiran Pai
> Can I please get a review of this change which proposes to address > https://bugs.openjdk.org/browse/JDK-8339810? > > As noted in the issue we have a few places in the jar's tool `Main` class > where we currently don't close the resources in a try/finally block. The > commit in this PR update

Re: RFR: 8339810: Cleanup the code in sun.tools.jar.Main to properly close resources and use ZipFile during extract [v2]

2024-09-09 Thread Jaikiran Pai
On Tue, 10 Sep 2024 06:08:45 GMT, Christian Stein wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Christian's review - array declaration style > > src/jdk.jartool/share/classes/sun/tools/jar/Main.java line 1508: >

Re: RFR: 8339677: [vectorapi] YYYXXXVector::withLaneHelper and laneHelper should use Double::doubleToRawLongBits/Float::floatToRawIntBits

2024-09-09 Thread Jaikiran Pai
On Sat, 7 Sep 2024 05:15:56 GMT, Quan Anh Mai wrote: >> Looks good! > > @PaulSandoz Thanks for your reviews, I think this patch is trivial so I will > merge it. > > @jaikiran All the `YYYXXXVector.java` files are generated from > `X-VectorBits.java.template`, so if I change some of them all th

Re: RFR: 8339810: Cleanup the code in sun.tools.jar.Main to properly close resources and use ZipFile during extract

2024-09-09 Thread Christian Stein
On Tue, 10 Sep 2024 05:31:29 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to address > https://bugs.openjdk.org/browse/JDK-8339810? > > As noted in the issue we have a few places in the jar's tool `Main` class > where we currently don't close the resources

Re: RFR: 8334048: -Xbootclasspath can not read some ZIP64 zip files [v4]

2024-09-09 Thread Jaikiran Pai
On Mon, 9 Sep 2024 23:42:59 GMT, fitzsim wrote: >> fitzsim has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - BootClassPathZipFileTest: Use test.classes directory for test ZIPs >> - BootClassPathZipFileTest, BootClassPathZipFileCreator:

Re: RFR: 8173970: jar tool should have a way to extract to a directory [v10]

2024-09-09 Thread Christian Stein
On Tue, 10 Sep 2024 04:36:42 GMT, Jaikiran Pai wrote: >> Can I please get a review for this patch which proposes to implement the >> enhancement request noted in >> https://bugs.openjdk.java.net/browse/JDK-8173970? >> >> The commit in this PR introduces the `-o` and `--output-dir` option to th

RFR: 8339810: Cleanup the code in sun.tools.jar.Main to properly close resources and use ZipFile during extract

2024-09-09 Thread Jaikiran Pai
Can I please get a review of this change which proposes to address https://bugs.openjdk.org/browse/JDK-8339810? As noted in the issue we have a few places in the jar's tool `Main` class where we currently don't close the resources in a try/finally block. The commit in this PR updates the releva

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-09 Thread Kim Barrett
On Mon, 9 Sep 2024 16:25:15 GMT, Stuart Marks wrote: >> @dholmes-ora Is this really possible? The `obj` ref is passed to the >> PhantomReference constructor, which stores it in a field, the constructed >> PhantomReference is returned, and it's then used in a reachabilityFence call >> below. So

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-09 Thread Kim Barrett
On Fri, 6 Sep 2024 19:57:41 GMT, Brent Christian wrote: > From the bug description: > ForceGC would be improved by moving the Reference.reachabilityFence() calls > for 'obj' and 'ref'. > > Reference.reachabilityFence(obj) is currently placed after 'obj' has been set > to null, so effectively d

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-09 Thread Kim Barrett
On Mon, 9 Sep 2024 14:40:12 GMT, Daniel Fuchs wrote: >> test/lib/jdk/test/lib/util/ForceGC.java line 102: >> >>> 100: } >>> 101: } >>> 102: Reference.reachabilityFence(ref); >> >> I think everything from the creation of ref to the line above needs to >> enclosed in

Re: RFR: 8173970: jar tool should have a way to extract to a directory [v10]

2024-09-09 Thread Jaikiran Pai
> Can I please get a review for this patch which proposes to implement the > enhancement request noted in https://bugs.openjdk.java.net/browse/JDK-8173970? > > The commit in this PR introduces the `-o` and `--output-dir` option to the > `jar` command. The option takes a path to a destination dir

Re: RFR: 8339704: Refactor StringConcatHelper simpleConcat [v6]

2024-09-09 Thread Shaojin Wen
On Sun, 8 Sep 2024 16:37:08 GMT, Claes Redestad wrote: >> String concatenation is required in many places in java.lang. These static >> concat methods will be used instead of "+", so null value processing is >> added. This is also the motivation for using static concat methods instead >> of Co

Re: RFR: 8339799: Reduce work done in j.l.invoke bytecode generators

2024-09-09 Thread Claes Redestad
On Mon, 9 Sep 2024 23:27:14 GMT, Chen Liang wrote: >> Misc improvements to InnerClassLambdaMetafactory and >> InvokerBytecodeGenerator: >> - Define `ClassEntry` early, use it when profitable (there are some warts in >> the API where using `ce.name(), ce.type()` in a few places means we drop the

Re: RFR: 8339800: Prefer invokeBasic in BootstrapMethodInvokers

2024-09-09 Thread Jorn Vernee
On Mon, 9 Sep 2024 23:52:41 GMT, Claes Redestad wrote: > Switching to `invokeBasic` for type-check invokes in > `BootstrapMethodInvokers` instead of `invokeExact` avoids some > `MethodHandleNatives.linkMethod` calls during bootstrap. This brings a tiny > but measurable once-per-bootstrap metho

RFR: 8339800: Prefer invokeBasic in BootstrapMethodInvokers

2024-09-09 Thread Claes Redestad
Switching to `invokeBasic` for type-check invokes in `BootstrapMethodInvokers` instead of `invokeExact` avoids some `MethodHandleNatives.linkMethod` calls during bootstrap. This brings a tiny but measurable once-per-bootstrap method win. Both before and after we lean on the static casts in Boot

Re: RFR: 8334048: -Xbootclasspath can not read some ZIP64 zip files [v4]

2024-09-09 Thread fitzsim
On Mon, 9 Sep 2024 20:27:47 GMT, fitzsim wrote: >> 8334048: -Xbootclasspath can not read some ZIP64 zip files > > fitzsim has updated the pull request incrementally with two additional > commits since the last revision: > > - BootClassPathZipFileTest: Use test.classes directory for test ZIPs >

Re: RFR: 8339799: Reduce work done in j.l.invoke bytecode generators

2024-09-09 Thread Chen Liang
On Mon, 9 Sep 2024 22:53:28 GMT, Claes Redestad wrote: > Misc improvements to InnerClassLambdaMetafactory and InvokerBytecodeGenerator: > - Define `ClassEntry` early, use it when profitable (there are some warts in > the API where using `ce.name(), ce.type()` in a few places means we drop the >

RFR: 8339799: Reduce work done in j.l.invoke bytecode generators

2024-09-09 Thread Claes Redestad
Misc improvements to InnerClassLambdaMetafactory and InvokerBytecodeGenerator: - Define `ClassEntry` early, use it when profitable (there are some warts in the API where using `ce.name(), ce.type()` in a few places means we drop the link to the `ClassDesc` which will then be re-spun in later - sh

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

2024-09-09 Thread Aleksei Efimov
On Mon, 9 Sep 2024 17:15:43 GMT, Aleksei Efimov wrote: >> I have been wondering why the timeout was measured in this way. My >> explanation was that the original author of the API (duke? ;-) ) wanted to >> measure "actual timeout" (time actually spent waiting for a packet) as >> opposed to per

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

2024-09-09 Thread Aleksei Efimov
> 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 has also been updated to use the nano > clock to measure obser

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-09 Thread David Holmes
On Mon, 9 Sep 2024 16:25:15 GMT, Stuart Marks wrote: >> @dholmes-ora Is this really possible? The `obj` ref is passed to the >> PhantomReference constructor, which stores it in a field, the constructed >> PhantomReference is returned, and it's then used in a reachabilityFence call >> below. So

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v5]

2024-09-09 Thread Brian Burkhalter
On Fri, 9 Aug 2024 17:59:12 GMT, Brian Burkhalter wrote: >> This proposed change would move the native objects required for NIO file >> interaction from the libnio native library to the libjava native library on >> Linux, macOS, and Windows. > > Brian Burkhalter has updated the pull request inc

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v3]

2024-09-09 Thread Maurizio Cimadamore
> The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the > middle of a scoped context. > > To address this, I created a

Re: RFR: 8334048: -Xbootclasspath can not read some ZIP64 zip files [v4]

2024-09-09 Thread fitzsim
> 8334048: -Xbootclasspath can not read some ZIP64 zip files fitzsim has updated the pull request incrementally with two additional commits since the last revision: - BootClassPathZipFileTest: Use test.classes directory for test ZIPs - BootClassPathZipFileTest, BootClassPathZipFileCreator: Mov

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v4]

2024-09-09 Thread Brian Burkhalter
On Fri, 6 Sep 2024 17:47:35 GMT, Brian Burkhalter wrote: >> Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and >> `isHidden` behave when the `File` represents a symbolic link. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit sin

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v5]

2024-09-09 Thread Brian Burkhalter
> Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and > `isHidden` behave when the `File` represents a symbolic link. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8339574: Replace "transparent" with more

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v4]

2024-09-09 Thread Brian Burkhalter
On Mon, 9 Sep 2024 17:10:13 GMT, Daniel Jeliński wrote: > Does `File.exists` check the existence of the link target? Yes. Verified on both Unix (macOS) and Windows 11. - PR Comment: https://git.openjdk.org/jdk/pull/20878#issuecomment-2338863163

Re: RFR: 8339789: Use index and definition tags in AnnotatedElement

2024-09-09 Thread Jonathan Gibbons
On Mon, 9 Sep 2024 18:37:47 GMT, Joe Darcy wrote: > Use index and definition tags in AnnotatedElement. OK. As a subsidiary follow-up, one might ask whether `{@index...}` should implicitly include `` tags in its output. - Marked as reviewed by jjg (Reviewer). PR Review: https://g

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v2]

2024-09-09 Thread Alan Bateman
On Mon, 9 Sep 2024 12:59:15 GMT, Maurizio Cimadamore wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Drop spurious change > > src/java.base/share/classes/jdk/internal/access/foreign/MappedMemoryUtilsProxy.j

RFR: 8339789: Use index and definition tags in AnnotatedElement

2024-09-09 Thread Joe Darcy
Use index and definition tags in AnnotatedElement. - Commit messages: - JDK-8339789: Use index and definition tags in AnnotatedElement Changes: https://git.openjdk.org/jdk/pull/20919/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20919&range=00 Issue: https://bugs.openjd

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

2024-09-09 Thread Zdenek Zambersky
On Thu, 5 Sep 2024 13:25:17 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, o

Re: RFR: 8333446: Add tests for hierarchical container support [v9]

2024-09-09 Thread Zdenek Zambersky
On Wed, 4 Sep 2024 17:46:00 GMT, Severin Gehwolf wrote: >> Please review this PR which adds test support for systemd slices so that >> bugs like [JDK-8217338](https://bugs.openjdk.org/browse/JDK-8217338) can be >> verified. The added test, `SystemdMemoryAwarenessTest` currently passes on >> cg

Re: RFR: 8339704: Refactor StringConcatHelper simpleConcat [v6]

2024-09-09 Thread Shaojin Wen
> The string concatenation of the java.base module is implemented using > StringBuilder. By providing a series of concat methods in StringConcatHelper, > it is used in the java.lang package to replace string concatenation. > > These concat methods can also be exposed through JLA for use by other

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

2024-09-09 Thread Aleksei Efimov
On Mon, 9 Sep 2024 15:03:46 GMT, Daniel Fuchs wrote: >> Sounds like a right thing to do: measuring time in the loop should give us >> better estimation on time DNS client spends waiting on the response after >> submiting a query (that's how environment property value is defined in >> [javadoc

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v4]

2024-09-09 Thread Daniel Jeliński
On Fri, 6 Sep 2024 17:47:35 GMT, Brian Burkhalter wrote: >> Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and >> `isHidden` behave when the `File` represents a symbolic link. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit sin

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

2024-09-09 Thread Aleksei Efimov
> 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 has also been updated to use the nano > clock to measure obser

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-09 Thread Stuart Marks
On Mon, 9 Sep 2024 16:12:02 GMT, Stuart Marks wrote: >> The reason for the explicit reference and RF, as I recall, is to guard >> against the allocation of the new object being elided entirely, with the >> `PhantomReference` constructor being passed null (or itself being elided) >> and no refe

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

2024-09-09 Thread Aleksei Efimov
> 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 has also been updated to use the nano > clock to measure obser

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-09 Thread Stuart Marks
On Mon, 9 Sep 2024 05:01:26 GMT, David Holmes wrote: >> test/lib/jdk/test/lib/util/ForceGC.java line 82: >> >>> 80: PhantomReference ref = new PhantomReference<>(obj, >>> queue); >>> 81: Reference.reachabilityFence(obj); >>> 82: obj = null; >> >> You're right to questio

Integrated: 8339644: Improve parsing of Day/Month in tzdata rules

2024-09-09 Thread Naoto Sato
On Fri, 6 Sep 2024 17:40:50 GMT, Naoto Sato wrote: > Fixing TZDB build tool to accommodate full month/day names. Recently released > tzdb2024b included (inadvertently) full month name "April", which is allowed > by the spec (zic.8), but never used. This will cause build failure of the > JDK. T

Re: RFR: 8339644: Improve parsing of Day/Month in tzdata rules [v3]

2024-09-09 Thread Naoto Sato
On Fri, 6 Sep 2024 21:49:30 GMT, Naoto Sato wrote: >> Fixing TZDB build tool to accommodate full month/day names. Recently >> released tzdb2024b included (inadvertently) full month name "April", which >> is allowed by the spec (zic.8), but never used. This will cause build >> failure of the JD

Withdrawn: 8225763: Inflater and Deflater should implement AutoCloseable

2024-09-09 Thread duke
On Wed, 12 Jun 2024 10:45:30 GMT, Jaikiran Pai wrote: > Can I please get a review of this enhancement which proposes to enhance > `java.util.zip.Deflater/Inflater` classes to now implement `AutoCloseable`? > > The actual work for this was done a few years back when we discussed the > proposed

Re: RFR: 8339677: [vectorapi] YYYXXXVector::withLaneHelper and laneHelper should use Double::doubleToRawLongBits/Float::floatToRawIntBits

2024-09-09 Thread Paul Sandoz
On Sat, 7 Sep 2024 04:47:36 GMT, Jaikiran Pai wrote: >> Hi, >> >> This patch fixes an issue where we mistakenly use `Double::doubleToLongBits` >> in `DoubleXXXVector::withLaneHelper` and `DoubleXXXVector::laneHelper`. We >> should use the raw bit version instead. >> >> Please kindly review, t

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v2]

2024-09-09 Thread Martin Doerr
On Mon, 9 Sep 2024 15:30:47 GMT, Maurizio Cimadamore wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Drop spurious change > > src/java.base/share/classes/java/nio/MappedMemoryUtils.java line 128: > >> 126:

Re: RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy [v11]

2024-09-09 Thread Chen Liang
On Mon, 9 Sep 2024 01:53:01 GMT, Shaojin Wen wrote: >> This is a follow-up to PR #20273, which improves performance when the number >> of parameters exceeds 20. >> >> When the number of parameters is large, the possibility of reuse will be >> lower, so we can use the static concat method and w

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v2]

2024-09-09 Thread Maurizio Cimadamore
On Mon, 9 Sep 2024 15:30:47 GMT, Maurizio Cimadamore wrote: >> The new test added by https://github.com/openjdk/jdk/pull/20854 fails >> spuriously. >> While JNI lookup is now moved into the static initializer of the >> `MappedMemoryUtils` class, this class might only get initialized while in

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v2]

2024-09-09 Thread Maurizio Cimadamore
> The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the > middle of a scoped context. > > To address this, I created a

Re: RFR: 8339683: Simplify class data generation in InvokerBytecodeGenerator [v2]

2024-09-09 Thread Chen Liang
On Fri, 6 Sep 2024 19:55:38 GMT, Chen Liang wrote: >> Elide duplicate field CP entry creation, and reuse elements in the field CP >> entry for field generation. > > Chen Liang has updated the pull request incrementally with one additional > commit since the last revision: > > Do not try to c

Integrated: 8339683: Simplify class data generation in InvokerBytecodeGenerator

2024-09-09 Thread Chen Liang
On Fri, 6 Sep 2024 18:56:30 GMT, Chen Liang wrote: > Elide duplicate field CP entry creation, and reuse elements in the field CP > entry for field generation. This pull request has now been integrated. Changeset: a9bb0433 Author:Chen Liang URL: https://git.openjdk.org/jdk/commit/a9

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

2024-09-09 Thread Daniel Fuchs
On Mon, 9 Sep 2024 11:42:25 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 ha

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

2024-09-09 Thread Daniel Fuchs
On Mon, 9 Sep 2024 14:42:41 GMT, Aleksei Efimov wrote: >> src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsClient.java line 477: >> >>> 475: long elapsedMillis = >>> TimeUnit.NANOSECONDS.toMillis(end - start); >>> 476: // Setting the Math.clamp min to

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

2024-09-09 Thread Aleksei Efimov
On Mon, 9 Sep 2024 13:58:51 GMT, Daniel Jeliński wrote: >> Aleksei Efimov has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - guard against possible integer value overflows >> - make startTime a local variable > > src/jdk.naming.dns/share

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-09 Thread Daniel Fuchs
On Sat, 7 Sep 2024 00:40:24 GMT, Stuart Marks wrote: >> From the bug description: >> ForceGC would be improved by moving the Reference.reachabilityFence() calls >> for 'obj' and 'ref'. >> >> Reference.reachabilityFence(obj) is currently placed after 'obj' has been >> set to null, so effectivel

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-09 Thread Daniel Fuchs
On Mon, 9 Sep 2024 05:01:26 GMT, David Holmes wrote: >> test/lib/jdk/test/lib/util/ForceGC.java line 82: >> >>> 80: PhantomReference ref = new PhantomReference<>(obj, >>> queue); >>> 81: Reference.reachabilityFence(obj); >>> 82: obj = null; >> >> You're right to questio

Re: RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy [v11]

2024-09-09 Thread Claes Redestad
On Mon, 9 Sep 2024 01:53:01 GMT, Shaojin Wen wrote: >> This is a follow-up to PR #20273, which improves performance when the number >> of parameters exceeds 20. >> >> When the number of parameters is large, the possibility of reuse will be >> lower, so we can use the static concat method and w

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames

2024-09-09 Thread Martin Doerr
On Mon, 9 Sep 2024 12:57:17 GMT, Maurizio Cimadamore wrote: > The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the

Re: RFR: 8339683: Simplify class data generation in InvokerBytecodeGenerator [v2]

2024-09-09 Thread Claes Redestad
On Fri, 6 Sep 2024 19:55:38 GMT, Chen Liang wrote: >> Elide duplicate field CP entry creation, and reuse elements in the field CP >> entry for field generation. > > Chen Liang has updated the pull request incrementally with one additional > commit since the last revision: > > Do not try to c

Integrated: 8339742: Refactor ClassFileImpl to allow loading Option classes lazily

2024-09-09 Thread Claes Redestad
On Mon, 9 Sep 2024 11:16:32 GMT, Claes Redestad wrote: > Refactor ClassFileImpl so that Option classes are not eagerly loaded. > > - Reduces number of classes loaded on various startup tests (typically 15 > classes less) > - Reduces size of the default CDS archive by ~30Kb This pull request ha

Re: RFR: 8339742: Refactor ClassFileImpl to allow loading Option classes lazily

2024-09-09 Thread Claes Redestad
On Mon, 9 Sep 2024 11:16:32 GMT, Claes Redestad wrote: > Refactor ClassFileImpl so that Option classes are not eagerly loaded. > > - Reduces number of classes loaded on various startup tests (typically 15 > classes less) > - Reduces size of the default CDS archive by ~30Kb Thanks for the revie

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

2024-09-09 Thread Daniel Jeliński
On Mon, 9 Sep 2024 11:42:25 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 ha

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames

2024-09-09 Thread Jorn Vernee
On Mon, 9 Sep 2024 12:57:17 GMT, Maurizio Cimadamore wrote: > The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames

2024-09-09 Thread Maurizio Cimadamore
On Mon, 9 Sep 2024 12:57:17 GMT, Maurizio Cimadamore wrote: > The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the

Re: RFR: 8339714: Delete tedious bool type define

2024-09-09 Thread SendaoYan
On Mon, 9 Sep 2024 13:03:49 GMT, Julian Waters wrote: >> I have verified this change locally, include build hsdis.so and check the >> functional with command java -XX:+UnlockDiagnosticVMOptions >> -XX:+PrintAssembly -version. The verified show this change for hsdis.so work >> normally. > > Ok,

Re: RFR: 8339714: Delete tedious bool type define

2024-09-09 Thread Julian Waters
On Mon, 9 Sep 2024 09:50:59 GMT, SendaoYan wrote: > Hi all, > This PR delete tedious bool type define in > `src/java.base/unix/native/libjsig/jsig.c` and > `src/utils/hsdis/binutils/hsdis-binutils.c`. After JEP > 347([JDK-8246032](https://bugs.openjdk.org/browse/JDK-8246032)), I think we >

Re: RFR: 8339714: Delete tedious bool type define

2024-09-09 Thread Julian Waters
On Mon, 9 Sep 2024 12:56:56 GMT, SendaoYan wrote: >> src/utils/hsdis/binutils/hsdis-binutils.c line 67: >> >>> 65: #include "hsdis.h" >>> 66: >>> 67: #ifndef bool >> >> I'm a little worried about this change. hsdis may really need an int here. >> If that turns out to not be the case then I'll

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames

2024-09-09 Thread Maurizio Cimadamore
On Mon, 9 Sep 2024 12:57:17 GMT, Maurizio Cimadamore wrote: > The new test added by https://github.com/openjdk/jdk/pull/20854 fails > spuriously. > While JNI lookup is now moved into the static initializer of the > `MappedMemoryUtils` class, this class might only get initialized while in the

RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames

2024-09-09 Thread Maurizio Cimadamore
The new test added by https://github.com/openjdk/jdk/pull/20854 fails spuriously. While JNI lookup is now moved into the static initializer of the `MappedMemoryUtils` class, this class might only get initialized while in the middle of a scoped context. To address this, I created a new proxy int

Re: RFR: 8339714: Delete tedious bool type define

2024-09-09 Thread SendaoYan
On Mon, 9 Sep 2024 12:07:54 GMT, Julian Waters wrote: >> Hi all, >> This PR delete tedious bool type define in >> `src/java.base/unix/native/libjsig/jsig.c` and >> `src/utils/hsdis/binutils/hsdis-binutils.c`. After JEP >> 347([JDK-8246032](https://bugs.openjdk.org/browse/JDK-8246032)), I thi

Re: RFR: 8339714: Delete tedious bool type define

2024-09-09 Thread SendaoYan
On Mon, 9 Sep 2024 12:06:25 GMT, Julian Waters wrote: >> Hi all, >> This PR delete tedious bool type define in >> `src/java.base/unix/native/libjsig/jsig.c` and >> `src/utils/hsdis/binutils/hsdis-binutils.c`. After JEP >> 347([JDK-8246032](https://bugs.openjdk.org/browse/JDK-8246032)), I thi

Re: RFR: 8337753: Target class of upcall stub may be unloaded [v5]

2024-09-09 Thread Jorn Vernee
On Fri, 6 Sep 2024 17:51:15 GMT, Jorn Vernee wrote: >> As discussed in the JBS issue: >> >> FFM upcall stubs embed a `Method*` of the target method in the stub. This >> `Method*` is read from the `LambdaForm::vmentry` field associated with the >> target method handle at the time when the upcal

Re: RFR: 8339714: Delete tedious bool type define

2024-09-09 Thread Julian Waters
On Mon, 9 Sep 2024 09:50:59 GMT, SendaoYan wrote: > Hi all, > This PR delete tedious bool type define in > `src/java.base/unix/native/libjsig/jsig.c` and > `src/utils/hsdis/binutils/hsdis-binutils.c`. After JEP > 347([JDK-8246032](https://bugs.openjdk.org/browse/JDK-8246032)), I think we >

Integrated: 8339631: Fix block @jls and @jvms tags

2024-09-09 Thread Pavel Rappo
On Thu, 5 Sep 2024 21:46:34 GMT, Pavel Rappo wrote: > This fixes some of the recently discovered [issues] with the block variants > of the specification tags. While reviewing, please check the proposed changes > against the actual specifications. Since the specifications for JDK 23 are > not y

Re: RFR: 8339631: Fix block @jls and @jvms tags [v3]

2024-09-09 Thread Chen Liang
On Mon, 9 Sep 2024 09:19:38 GMT, Pavel Rappo wrote: >> This fixes some of the recently discovered [issues] with the block variants >> of the specification tags. While reviewing, please check the proposed >> changes against the actual specifications. Since the specifications for JDK >> 23 are n

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

2024-09-09 Thread Aleksei Efimov
On Fri, 6 Sep 2024 16:58:20 GMT, Daniel Fuchs wrote: >> Aleksei Efimov has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - guard against possible integer value overflows >> - make startTime a local variable > > test/jdk/com/sun/jndi/dns/C

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

2024-09-09 Thread Aleksei Efimov
On Sat, 7 Sep 2024 13:12:23 GMT, Jaikiran Pai wrote: >> Aleksei Efimov has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - guard against possible integer value overflows >> - make startTime a local variable > > src/jdk.naming.dns/share/cl

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

2024-09-09 Thread Aleksei Efimov
> 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 has also been updated to use the nano > clock to measure obser

Re: RFR: 8339742: Refactor ClassFileImpl to allow loading Option classes lazily

2024-09-09 Thread Adam Sotona
On Mon, 9 Sep 2024 11:16:32 GMT, Claes Redestad wrote: > Refactor ClassFileImpl so that Option classes are not eagerly loaded. > > - Reduces number of classes loaded on various startup tests (typically 15 > classes less) > - Reduces size of the default CDS archive by ~30Kb It looks good to me

RFR: 8339742: Refactor ClassFileImpl to allow loading Option classes lazily

2024-09-09 Thread Claes Redestad
Refactor ClassFileImpl so that Option classes are not eagerly loaded. - Reduces number of classes loaded on various startup tests (typically 15 classes less) - Reduces size of the default CDS archive by ~30Kb - Commit messages: - Cleanup, fix failing test - Refactor ClassFileImpl

Withdrawn: 8307818: Convert Indify tool to Classfile API

2024-09-09 Thread duke
On Thu, 18 Apr 2024 13:53:34 GMT, Oussama Louati wrote: > An indify tool in j.l.i tests (also in vmTestBase) convert some source-code > private static methods with MT_ MH_, and INDY_ prefixes into MethodHandle, > MethodType, and CallSite constants. > ### Purpose of Indify > > - **Transformati

RFR: 8339714: Delete tedious bool type define

2024-09-09 Thread SendaoYan
Hi all, This PR delete tedious bool type define in `src/java.base/unix/native/libjsig/jsig.c` and `src/utils/hsdis/binutils/hsdis-binutils.c`. After JEP 347([JDK-8246032](https://bugs.openjdk.org/browse/JDK-8246032)), I think we can "#include " to use bool type directly, like [string.h](http

Re: RFR: 8338890: Add monitoring/management interface for the virtual thread scheduler [v4]

2024-09-09 Thread Kevin Walls
On Mon, 9 Sep 2024 06:28:45 GMT, Alan Bateman wrote: >> This PR proposes to add a JDK-specific monitoring and management interface >> for the virtual thread scheduler. The interface is named >> [VirtualThreadSchedulerMXBean](https://download.java.net/java/early_access/loom/docs/api/jdk.manageme

Re: RFR: 8339631: Fix block @jls and @jvms tags [v3]

2024-09-09 Thread Pavel Rappo
> This fixes some of the recently discovered [issues] with the block variants > of the specification tags. While reviewing, please check the proposed changes > against the actual specifications. Since the specifications for JDK 23 are > not yet available in the HTML format, you can use the speci

Re: RFR: 8339631: Fix block @jls and @jvms tags [v2]

2024-09-09 Thread Pavel Rappo
On Fri, 6 Sep 2024 09:16:28 GMT, Pavel Rappo wrote: >> This fixes some of the recently discovered [issues] with the block variants >> of the specification tags. While reviewing, please check the proposed >> changes against the actual specifications. Since the specifications for JDK >> 23 are n

Re: RFR: 8337422: spelling error in jlink documentation

2024-09-09 Thread Athijegannathan Sundararajan
On Fri, 6 Sep 2024 08:45:53 GMT, Alan Bateman wrote: >> fixed spelling to be consistent with the rest of the man page. > > I checked the OED and it does seem to be uncountable, which makes me wonder > about other places, e.g. JLS 7.7.1. @AlanBateman @pavelrappo I did double check. "dependence"

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

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

Re: RFR: 8339487: ProcessHandleImpl os_getChildren sysctl call - retry in case of ENOMEM and enhance exception message [v4]

2024-09-09 Thread Lutz Schmidt
On Mon, 9 Sep 2024 07:06:22 GMT, Matthias Baesken wrote: >> When running jtreg test java/lang/ProcessHandle/PermissionTest.java on >> macOS, a few times this error occurs : >> >> java.lang.RuntimeException: Cannot allocate memory >>at java.base/java.lang.ProcessHandleImpl.getProcessPids

Integrated: 8339487: ProcessHandleImpl os_getChildren sysctl call - retry in case of ENOMEM and enhance exception message

2024-09-09 Thread Matthias Baesken
On Tue, 3 Sep 2024 14:09:23 GMT, Matthias Baesken wrote: > When running jtreg test java/lang/ProcessHandle/PermissionTest.java on macOS, > a few times this error occurs : > > java.lang.RuntimeException: Cannot allocate memory >at java.base/java.lang.ProcessHandleImpl.getProcessPids0(Nat

Re: RFR: 8339487: ProcessHandleImpl os_getChildren sysctl call - retry in case of ENOMEM and enhance exception message [v4]

2024-09-09 Thread Alan Bateman
On Mon, 9 Sep 2024 07:06:22 GMT, Matthias Baesken wrote: >> When running jtreg test java/lang/ProcessHandle/PermissionTest.java on >> macOS, a few times this error occurs : >> >> java.lang.RuntimeException: Cannot allocate memory >>at java.base/java.lang.ProcessHandleImpl.getProcessPids

Re: RFR: 8339487: ProcessHandleImpl os_getChildren sysctl call - retry in case of ENOMEM and enhance exception message [v3]

2024-09-09 Thread Matthias Baesken
On Fri, 6 Sep 2024 07:05:22 GMT, Matthias Baesken wrote: >> When running jtreg test java/lang/ProcessHandle/PermissionTest.java on >> macOS, a few times this error occurs : >> >> java.lang.RuntimeException: Cannot allocate memory >>at java.base/java.lang.ProcessHandleImpl.getProcessPids

Re: RFR: 8339487: ProcessHandleImpl os_getChildren sysctl call - retry in case of ENOMEM and enhance exception message [v4]

2024-09-09 Thread Matthias Baesken
> When running jtreg test java/lang/ProcessHandle/PermissionTest.java on macOS, > a few times this error occurs : > > java.lang.RuntimeException: Cannot allocate memory >at java.base/java.lang.ProcessHandleImpl.getProcessPids0(Native Method) >at > java.base/java.lang.ProcessHandl