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

2024-09-25 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

Integrated: 8339260: Move rarely used constants out of ClassFile

2024-09-25 Thread Chen Liang
On Thu, 29 Aug 2024 14:57:10 GMT, Chen Liang wrote: > Many constants are cluttered in `ClassFile`. However, only a few of them are > ever used by regular users, most notably `ACC_` flags and `JAVA_X_VERSION` > constants. All other constants are specific and should live in more local > location

Re: RFR: 8339260: Move rarely used constants out of ClassFile [v9]

2024-09-25 Thread Chen Liang
On Tue, 24 Sep 2024 17:23:41 GMT, Chen Liang wrote: >> Many constants are cluttered in `ClassFile`. However, only a few of them are >> ever used by regular users, most notably `ACC_` flags and `JAVA_X_VERSION` >> constants. All other constants are specific and should live in more local >> loca

Re: RFR: 8340981: Update citations to "Hacker's Delight" [v2]

2024-09-25 Thread Chen Liang
On Thu, 26 Sep 2024 05:03:01 GMT, Joe Darcy wrote: >> Add citation of the second edition of "Hacker's Delight". > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Respond to review feedback. The section number reference 7.7 to t

Re: RFR: 8340981: Update citations to "Hacker's Delight" [v2]

2024-09-25 Thread Iris Clark
On Thu, 26 Sep 2024 05:03:01 GMT, Joe Darcy wrote: >> Add citation of the second edition of "Hacker's Delight". > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Respond to review feedback. Marked as reviewed by iris (Reviewer)

Integrated: 8340812: LambdaForm customization via MethodHandle::updateForm is not thread safe

2024-09-25 Thread Tobias Hartmann
On Tue, 24 Sep 2024 14:18:58 GMT, Tobias Hartmann wrote: > When investigating an intermittent NPE with an Oracle internal test on > AArch64, I noticed that the NPE is actually a SIGSEGV in the code emitted by > `MethodHandles::jump_to_lambda_form` when trying to load the > `MemberName::method`

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

2024-09-25 Thread Tobias Hartmann
On Wed, 25 Sep 2024 17:23:21 GMT, Abdelhak Zaaim wrote: >> When investigating an intermittent NPE with an Oracle internal test on >> AArch64, I noticed that the NPE is actually a SIGSEGV in the code emitted by >> `MethodHandles::jump_to_lambda_form` when trying to load the >> `MemberName::meth

Re: RFR: 8340981: Update citations to "Hacker's Delight" [v2]

2024-09-25 Thread Brian Burkhalter
On Thu, 26 Sep 2024 05:03:01 GMT, Joe Darcy wrote: >> Add citation of the second edition of "Hacker's Delight". > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Respond to review feedback. Marked as reviewed by bpb (Reviewer).

Re: RFR: 8340981: Update citations to "Hacker's Delight" [v2]

2024-09-25 Thread Joe Darcy
> Add citation of the second edition of "Hacker's Delight". Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Respond to review feedback. - Changes: - all: https://git.openjdk.org/jdk/pull/21194/files - new: https://git.o

Re: RFR: 8337408: Use GetTempPath2 API instead of GetTempPath [v2]

2024-09-25 Thread Dhamoder Nalla
On Fri, 20 Sep 2024 20:35:34 GMT, Chris Plummer wrote: > > > Do we have any apps commonly run as a Windows SYSTEM account which expect > > > to attach to other Java apps run by a different Java version? You're > > > suggesting that will have no impact and agreed it would seem really > > > unus

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image

2024-09-25 Thread Chen Liang
On Thu, 26 Sep 2024 01:36:31 GMT, Henry Jen wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java >> line 1248: >> >>> 1246: methodName, >>> 1247: MethodTypeDesc.of(CD_EXPORTS.arrayType()), >>> 124

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image

2024-09-25 Thread Henry Jen
On Thu, 26 Sep 2024 00:05:13 GMT, Chen Liang wrote: >> This PR split out large array/set construction into separate factory methods >> to avoid oversized method trying to construct several of those. >> >> In order to do that, we will need to generate those help methods on demand >> in the clas

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image

2024-09-25 Thread Henry Jen
On Wed, 25 Sep 2024 23:49:18 GMT, Chen Liang wrote: >> This PR split out large array/set construction into separate factory methods >> to avoid oversized method trying to construct several of those. >> >> In order to do that, we will need to generate those help methods on demand >> in the clas

Re: RFR: 8328313: Archived module graph should allow identical --module-path to be specified during dump time and run time [v4]

2024-09-25 Thread Calvin Cheung
On Wed, 25 Sep 2024 00:11:32 GMT, Ioi Lam wrote: >> Calvin Cheung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix indentation > > src/hotspot/share/cds/filemap.cpp line 956: > >> 954: } >> 955: // module paths are stored in sort

Re: RFR: 8328313: Archived module graph should allow identical --module-path to be specified during dump time and run time [v5]

2024-09-25 Thread Calvin Cheung
> Prior to this patch, if `--module-path` is specified in the command line: > during CDS dump time, full module graph will not be included in the CDS > archive; > during run time, full module graph will not be used. > > With this patch, the full module graph will be included in the CDS archive >

Re: RFR: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image

2024-09-25 Thread Chen Liang
On Mon, 16 Sep 2024 17:50:52 GMT, Henry Jen wrote: > This PR split out large array/set construction into separate factory methods > to avoid oversized method trying to construct several of those. > > In order to do that, we will need to generate those help methods on demand in > the class buil

Re: RFR: 8340983: Use index and definition tags in Object and Double

2024-09-25 Thread Chen Liang
On Wed, 25 Sep 2024 23:17:49 GMT, Joe Darcy wrote: > Simple change to add a few more index tags on terms related to equality and > equivalence. Marked as reviewed by liach (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/21195#pullrequestreview-2329705401

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

2024-09-25 Thread Justin Lu
> 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 comment on > the JBS issue for the reason why they were not i

Re: RFR: 8340983: Use index and definition tags in Object and Double

2024-09-25 Thread Brian Burkhalter
On Wed, 25 Sep 2024 23:17:49 GMT, Joe Darcy wrote: > Simple change to add a few more index tags on terms related to equality and > equivalence. Marked as reviewed by bpb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/21195#pullrequestreview-2329695662

RFR: 8340983: Use index and definition tags in Object and Double

2024-09-25 Thread Joe Darcy
Simple change to add a few more index tags on terms related to equality and equivalence. - Commit messages: - JDK-8340983: Use index and definition tags in Object and Double Changes: https://git.openjdk.org/jdk/pull/21195/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=211

Re: RFR: 8340981: Update citations to "Hacker's Delight"

2024-09-25 Thread Brian Burkhalter
On Wed, 25 Sep 2024 22:58:11 GMT, Joe Darcy wrote: > Add citation of the second edition of "Hacker's Delight". Looks fine. - Marked as reviewed by bpb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/21194#pullrequestreview-2329681709

Re: RFR: 8340981: Update citations to "Hacker's Delight"

2024-09-25 Thread Chen Liang
On Wed, 25 Sep 2024 22:58:11 GMT, Joe Darcy wrote: > Add citation of the second edition of "Hacker's Delight". Can we update the references in `compress` and `expand`? They refer to this book's sections, and seems they are from different sections in different editions. - PR Comme

RFR: 8340981: Update citations to "Hacker's Delight"

2024-09-25 Thread Joe Darcy
Add citation of the second edition of "Hacker's Delight". - Commit messages: - JDK-8340981: Update citations to "Hacker's Delight" Changes: https://git.openjdk.org/jdk/pull/21194/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21194&range=00 Issue: https://bugs.openjdk.or

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

2024-09-25 Thread Naoto Sato
On Wed, 25 Sep 2024 22:06:55 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: 8340326: Remove references to Applet in core-libs/security tests [v2]

2024-09-25 Thread Phil Race
On Wed, 25 Sep 2024 22:03:59 GMT, Justin Lu wrote: > Not sure if it will be ran by anyone as it is manual, I don't know about other vendors, but for Oracle, manual tests are run at least once on every release some time after RDP1 and before RDP2. - PR Comment: https://git.openjd

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

2024-09-25 Thread Justin Lu
On Wed, 25 Sep 2024 21:36:54 GMT, Naoto Sato wrote: > Removing `test/jdk/java/util/TimeZone/DefaultTimeZoneTest.*` looks good to > me. It's a manual test that involves underlying OS settings manipulation > which cannot be automated. As we previously spoke offline, I did not think there was muc

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

2024-09-25 Thread Justin Lu
> 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 comment on > the JBS issue for the reason why they were not i

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

2024-09-25 Thread Naoto Sato
On Wed, 25 Sep 2024 18:28:02 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: 8327858: Improve spliterator and forEach for single-element immutable collections [v2]

2024-09-25 Thread Stuart Marks
On Fri, 22 Mar 2024 09:25:06 GMT, Viktor Klang wrote: >> BenchmarkMode CntScore Error Units >> ImmutableColls.forEachOverList thrpt 15 361.423 ± 8.751 ops/us >> ImmutableColls.forEachOverSet thrpt 15 79.158 ± 5.064 ops/us >> ImmutableColls.getOrDefault

Re: RFR: 8327858: Improve spliterator and forEach for single-element immutable collections [v3]

2024-09-25 Thread Stuart Marks
On Fri, 26 Apr 2024 22:27:21 GMT, Chen Liang wrote: >> Please review this patch that: >> 1. Implemented `forEach` to optimize for 1 or 2 element collections. >> 2. Implemented `spliterator` to optimize for a single element. >> >> The default implementations for multiple-element immutable collect

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

2024-09-25 Thread Eirik Bjørsnøs
On Wed, 25 Sep 2024 19:44:46 GMT, Claes Redestad wrote: > We'd be throwing an OOMError today if we soared too close to the limit > (Integer.MAX_VALUE - ENDHDR - 2 and above), then throw zerror if we go beyond > the limit. I think you might be off by one there :) The current code incorrectly

Re: RFR: 8338544: Dedicated Array class descriptor implementation

2024-09-25 Thread Chen Liang
On Wed, 25 Sep 2024 20:00:12 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java >> line 79: >> >>> 77: private static final ClassDesc CD_LambdaForm_Name = >>> ReferenceClassDescImpl.ofValidated("Ljava/lang/invoke/LambdaForm$Name;"); >>> 78:

Re: RFR: 8338544: Dedicated Array class descriptor implementation

2024-09-25 Thread Chen Liang
On Wed, 25 Sep 2024 19:53:13 GMT, Claes Redestad wrote: >> @cl4es discovered that Stack Map generation in ClassFile API uses >> `componentType` and `arrayType` for `aaload` `aastore` instructions, which >> are currently quite slow. We can split out array class descriptors from >> class or inte

Re: RFR: 8338544: Dedicated Array class descriptor implementation

2024-09-25 Thread Claes Redestad
On Wed, 21 Aug 2024 20:25:07 GMT, Chen Liang wrote: > @cl4es discovered that Stack Map generation in ClassFile API uses > `componentType` and `arrayType` for `aaload` `aastore` instructions, which > are currently quite slow. We can split out array class descriptors from class > or interfaces t

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

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 16:22:55 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: 8340571: Outline code from the loop in ZipFile.Source.initCen [v3]

2024-09-25 Thread Eirik Bjørsnøs
On Wed, 25 Sep 2024 13:43:49 GMT, Claes Redestad wrote: >> This PR suggests refactoring `ZipFile.Source.initCEN` to move as much logic >> as possible into the per-entry method processor. This inner method will be >> called often and JIT optimized earlier in the bootstrap sequence. >> >> Startu

Re: RFR: 8338544: Dedicated Array class descriptor implementation

2024-09-25 Thread Chen Liang
On Wed, 21 Aug 2024 20:25:07 GMT, Chen Liang wrote: > @cl4es discovered that Stack Map generation in ClassFile API uses > `componentType` and `arrayType` for `aaload` `aastore` instructions, which > are currently quite slow. We can split out array class descriptors from class > or interfaces t

Re: RFR: 8338544: Dedicated Array class descriptor implementation

2024-09-25 Thread ExE Boss
On Wed, 21 Aug 2024 20:25:07 GMT, Chen Liang wrote: > @cl4es discovered that Stack Map generation in ClassFile API uses > `componentType` and `arrayType` for `aaload` `aastore` instructions, which > are currently quite slow. We can split out array class descriptors from class > or interfaces t

RFR: 8338544: Dedicated Array class descriptor implementation

2024-09-25 Thread Chen Liang
@cl4es discovered that Stack Map generation in ClassFile API uses `componentType` and `arrayType` for `aaload` `aastore` instructions, which are currently quite slow. We can split out array class descriptors from class or interfaces to support faster `arrayType` and `componentType` operations.

Integrated: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Chen Liang
On Tue, 24 Sep 2024 22:07:25 GMT, Chen Liang wrote: > `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is > unnecessary and can be scalarized manually. The removal of `ClassFile` class > is also slightly helpful for bootstrap by reducing class loading. Also > improved cl

Integrated: 8340838: Clean up MutableCallSite to use explicit release fence instead of AtomicInteger

2024-09-25 Thread Chen Liang
On Tue, 24 Sep 2024 20:21:48 GMT, Chen Liang wrote: > This implementation code was written in JDK 7, before storeFence was > available in JDK 8. We should update this legacy code to make it clear. This pull request has now been integrated. Changeset: df1959fd Author:Chen Liang URL:

Re: RFR: 8340838: Clean up MutableCallSite to use explicit release fence instead of AtomicInteger

2024-09-25 Thread Chen Liang
On Tue, 24 Sep 2024 20:21:48 GMT, Chen Liang wrote: > This implementation code was written in JDK 7, before storeFence was > available in JDK 8. We should update this legacy code to make it clear. Thanks for the reviews! - PR Comment: https://git.openjdk.org/jdk/pull/21169#issueco

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup [v2]

2024-09-25 Thread Chen Liang
On Wed, 25 Sep 2024 14:50:12 GMT, Chen Liang wrote: >> `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is >> unnecessary and can be scalarized manually. The removal of `ClassFile` class >> is also slightly helpful for bootstrap by reducing class loading. Also >> improve

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

2024-09-25 Thread Justin Lu
> Please review this PR which removes usages of Applet within the corelibs > tests. This includes both code usage as well as occurrences of the word. > > There were more files found than the ones included in this PR, please see the > comment on the JBS issue for the reason why they were not incl

Re: Integrated: 8340956: ProblemList 4 java/nio/channels/DatagramChannel tests on macosx-all

2024-09-25 Thread Alan Bateman
On Wed, 25 Sep 2024 17:07:57 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList 4 java/nio/channels/DatagramChannel tests on > macosx-all. Marked as reviewed by alanb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/21188#pullrequestreview-2328952457

Re: Integrated: 8340956: ProblemList 4 java/nio/channels/DatagramChannel tests on macosx-all

2024-09-25 Thread Daniel D . Daugherty
On Wed, 25 Sep 2024 17:11:23 GMT, Chen Liang wrote: >> A trivial fix to ProblemList 4 java/nio/channels/DatagramChannel tests on >> macosx-all. > > These failures happen extremely often on macosx indeed. @liach, @AlanBateman, @jddarcy and @dfuch - Thanks for the lightning fast reviews! -

Re: Integrated: 8340956: ProblemList 4 java/nio/channels/DatagramChannel tests on macosx-all

2024-09-25 Thread Joe Darcy
On Wed, 25 Sep 2024 17:07:57 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList 4 java/nio/channels/DatagramChannel tests on > macosx-all. Marked as reviewed by darcy (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/21188#pullrequestreview-2328954749

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

2024-09-25 Thread Abdelhak Zaaim
On Tue, 24 Sep 2024 14:18:58 GMT, Tobias Hartmann wrote: > When investigating an intermittent NPE with an Oracle internal test on > AArch64, I noticed that the NPE is actually a SIGSEGV in the code emitted by > `MethodHandles::jump_to_lambda_form` when trying to load the > `MemberName::method`

Integrated: 8340956: ProblemList 4 java/nio/channels/DatagramChannel tests on macosx-all

2024-09-25 Thread Daniel D . Daugherty
On Wed, 25 Sep 2024 17:07:57 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList 4 java/nio/channels/DatagramChannel tests on > macosx-all. This pull request has now been integrated. Changeset: 1b2d40ad Author:Daniel D. Daugherty URL: https://git.openjdk.org/jdk/commit/

Re: Integrated: 8340956: ProblemList 4 java/nio/channels/DatagramChannel tests on macosx-all

2024-09-25 Thread Daniel Fuchs
On Wed, 25 Sep 2024 17:07:57 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList 4 java/nio/channels/DatagramChannel tests on > macosx-all. Marked as reviewed by dfuchs (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/21188#pullrequestreview-2328965652

Re: Integrated: 8340956: ProblemList 4 java/nio/channels/DatagramChannel tests on macosx-all

2024-09-25 Thread Chen Liang
On Wed, 25 Sep 2024 17:07:57 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList 4 java/nio/channels/DatagramChannel tests on > macosx-all. These failures happen extremely often on macosx indeed. - Marked as reviewed by liach (Reviewer). PR Review: https://git.openjdk

Integrated: 8340956: ProblemList 4 java/nio/channels/DatagramChannel tests on macosx-all

2024-09-25 Thread Daniel D . Daugherty
A trivial fix to ProblemList 4 java/nio/channels/DatagramChannel tests on macosx-all. - Commit messages: - 8340956: ProblemList 4 java/nio/channels/DatagramChannel tests on macosx-all Changes: https://git.openjdk.org/jdk/pull/21188/files Webrev: https://webrevs.openjdk.org/?repo=

Re: RFR: 8242888: Convert dynamic proxy to hidden classes

2024-09-25 Thread Chen Liang
On Thu, 23 May 2024 03:28:30 GMT, Chen Liang wrote: > Please review this change that adds a new dynamic proxies implementation as > hidden classes. > > Summary: > 1. Adds new implementation which can be `-Djdk.reflect.useHiddenProxy=true` > for early adoption. > 2. ClassLoader.defineClass0 tak

Re: RFR: 8340838: Clean up MutableCallSite to use explicit release fence instead of AtomicInteger

2024-09-25 Thread Aleksey Shipilev
On Tue, 24 Sep 2024 20:21:48 GMT, Chen Liang wrote: > This implementation code was written in JDK 7, before storeFence was > available in JDK 8. We should update this legacy code to make it clear. I have been harboring doubts `syncAll` even works (`FIXME: NYI` is fun) with a lone barrier for a

Re: RFR: 8242888: Convert dynamic proxy to hidden classes [v2]

2024-09-25 Thread Chen Liang
On Mon, 27 May 2024 00:04:07 GMT, ExE Boss wrote: >> Chen Liang has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 12 commits: >> >> - Flip flags, hidden is enabled only by choice >> - Merge branch 'master' of https://github.com/op

Re: RFR: 8242888: Convert dynamic proxy to hidden classes [v2]

2024-09-25 Thread Chen Liang
> Please review this change that adds a new dynamic proxies implementation as > hidden classes. > > Summary: > 1. Adds new implementation which can be `-Djdk.reflect.useHiddenProxy=true` > for early adoption. > 2. ClassLoader.defineClass0 takes a ClassLoader instance but discards it in > native

Integrated: 8340684: Reading from an input stream backed by a closed ZipFile has no test coverage

2024-09-25 Thread Eirik Bjørsnøs
On Mon, 23 Sep 2024 18:05:31 GMT, Eirik Bjørsnøs wrote: > Please review this PR which adds test coverage for the case of reading from > an input stream obtained using`ZipFile:getInputStream` after the backing > `ZipFile` has been closed. > > The unspecified but long-standing behavior for this

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

2024-09-25 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: 8339711: ZipFile.Source.initCEN needlessly reads END header

2024-09-25 Thread Eirik Bjørsnøs
On Wed, 25 Sep 2024 15:03:57 GMT, Claes Redestad wrote: > @eirbjo: an alternative suggested offline by @LanceAndersen is that we merge > the two PRs, since they intermingle a bit too much and have the same goal of > optimizing initCEN. OK if I merge this into #21133? My first thought was "that

Re: RFR: 8336843: Deprecate java.util.zip.ZipError for removal

2024-09-25 Thread Chen Liang
On Wed, 28 Aug 2024 15:12:13 GMT, Eirik Bjørsnøs wrote: >>> I think linking to the CSR would be fine, but there is no prerequisite for >>> API specs to link to CSRs. Need @jddarcy to double check here. I was >>> emulating `Thread.stop`: >>> >>> https://github.com/openjdk/jdk/blob/5671f836039ef

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

2024-09-25 Thread Claes Redestad
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: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 14:44:32 GMT, Chen Liang wrote: > Apparently forgot to push when I re-requested a review after the renames. I thought something was off, but on the third refresh the changes came in :-) - PR Comment: https://git.openjdk.org/jdk/pull/21170#issuecomment-2374309882

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Chen Liang
On Tue, 24 Sep 2024 22:07:25 GMT, Chen Liang wrote: > `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is > unnecessary and can be scalarized manually. The removal of `ClassFile` class > is also slightly helpful for bootstrap by reducing class loading. Also > improved cl

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup [v2]

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 14:47:10 GMT, Chen Liang wrote: >> `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is >> unnecessary and can be scalarized manually. The removal of `ClassFile` class >> is also slightly helpful for bootstrap by reducing class loading. Also >> improve

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup [v2]

2024-09-25 Thread Chen Liang
> `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is > unnecessary and can be scalarized manually. The removal of `ClassFile` class > is also slightly helpful for bootstrap by reducing class loading. Also > improved class file version checking in `VM` class. Chen Liang h

Re: RFR: 8340571: Outline code from the loop in ZipFile.Source.initCen [v3]

2024-09-25 Thread Claes Redestad
> This PR suggests refactoring `ZipFile.Source.initCEN` to move as much logic > as possible into the per-entry method processor. This inner method will be > called often and JIT optimized earlier in the bootstrap sequence. > > Startup tests using the OpenJDK benchmarks.jar show a ~1ms improvemen

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

2024-09-25 Thread Tobias Hartmann
On Tue, 24 Sep 2024 15:11:58 GMT, Chen Liang wrote: >> When investigating an intermittent NPE with an Oracle internal test on >> AArch64, I noticed that the NPE is actually a SIGSEGV in the code emitted by >> `MethodHandles::jump_to_lambda_form` when trying to load the >> `MemberName::method`

Re: RFR: 8340885: Desugar ZipCoder.Comparison [v2]

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 10:12:50 GMT, Claes Redestad wrote: >> This PR desugars the enum added by JDK-8301873 to reduce classes loaded on >> bootstrap and stored in the default CDS archive by 2. > > Claes Redestad has updated the pull request incrementally with two additional > commits since the la

Integrated: 8340885: Desugar ZipCoder.Comparison

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 09:15:04 GMT, Claes Redestad wrote: > This PR desugars the enum added by JDK-8301873 to reduce classes loaded on > bootstrap and stored in the default CDS archive by 2. This pull request has now been integrated. Changeset: d8790aa0 Author:Claes Redestad URL: htt

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 12:58:22 GMT, Chen Liang wrote: >> AFAICT they already use the record names, so we're not generating redundant >> code there. > > I mean the name variable in makeHiddenClassDefiner and makeClassDefiner that > leads up here. Ah.. Yeah, either way you like, but if it's an int

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

2024-09-25 Thread Chen Liang
On Tue, 24 Sep 2024 14:18:58 GMT, Tobias Hartmann wrote: > When investigating an intermittent NPE with an Oracle internal test on > AArch64, I noticed that the NPE is actually a SIGSEGV in the code emitted by > `MethodHandles::jump_to_lambda_form` when trying to load the > `MemberName::method`

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Chen Liang
On Wed, 25 Sep 2024 12:10:32 GMT, Claes Redestad wrote: >> Should I rename other existing name vars too? > > AFAICT they already use the record names, so we're not generating redundant > code there. I mean the name variable in makeHiddenClassDefiner and makeClassDefiner that leads up here. --

Re: RFR: 8333796: Add missing serialization functionality to sun.reflect.ReflectionFactory [v6]

2024-09-25 Thread David M . Lloyd
> Issue [JDK-8164908](https://bugs.openjdk.org/browse/JDK-8164908) added > support for functionality required to continue to support IIOP and custom > serializers in light of additional module-based restrictions on reflection. > It was expected that these libraries would use `sun.misc.Unsafe` in

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

2024-09-25 Thread Tobias Hartmann
On Tue, 24 Sep 2024 14:18:58 GMT, Tobias Hartmann wrote: > When investigating an intermittent NPE with an Oracle internal test on > AArch64, I noticed that the NPE is actually a SIGSEGV in the code emitted by > `MethodHandles::jump_to_lambda_form` when trying to load the > `MemberName::method`

Re: RFR: 8340885: Desugar ZipCoder.Comparison [v2]

2024-09-25 Thread Lance Andersen
On Wed, 25 Sep 2024 10:12:50 GMT, Claes Redestad wrote: >> This PR desugars the enum added by JDK-8301873 to reduce classes loaded on >> bootstrap and stored in the default CDS archive by 2. > > Claes Redestad has updated the pull request incrementally with two additional > commits since the la

RFR: 8340801: Disable ubsan checks in some awt/2d coding

2024-09-25 Thread Matthias Baesken
There is some old awt/2d coding where warnings occur when running with ubsan enabled binaries. However at most of these locations the coding should work (at least on our supported platform set) so the warnings can be disabled at least for now. The change adds a macro ATTRIBUTE_NO_UBSAN similar

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 12:03:58 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/invoke/MethodHandles.java line 2276: >> >>> 2274: var thisClass = cm.thisClass(); >>> 2275: name = thisClass.asInternalName(); >>> 2276: sym = thisClass.as

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Chen Liang
On Wed, 25 Sep 2024 10:02:37 GMT, Claes Redestad wrote: >> `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is >> unnecessary and can be scalarized manually. The removal of `ClassFile` class >> is also slightly helpful for bootstrap by reducing class loading. Also >> imp

RFR: 8340887: Add micro benchmark comparing input stream performance of ZipFile vs ZipInputStream

2024-09-25 Thread Eirik Bjørsnøs
Please review this test-only PR which adds a micro benchmark exploring performance differences between reading entry data sequentially from a `ZipFile` and reading the same entries using `ZipInputStream` wrapping a `BufferedInputStream`. Spoiler alert: `ZipFile` streams are ~1.8 X slower on my

Re: RFR: 8340885: Desugar ZipCoder.Comparison [v2]

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 10:10:13 GMT, Claes Redestad wrote: >> src/java.base/share/classes/java/util/zip/ZipCoder.java line 69: >> >>> 67: * to the encoded string. >>> 68: */ >>> 69: EXACT_MATCH = 1, >> >> Would there be any (positive) performance implications of starting

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

2024-09-25 Thread Claes Redestad
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: 8340885: Desugar ZipCoder.Comparison [v2]

2024-09-25 Thread Eirik Bjørsnøs
On Wed, 25 Sep 2024 10:14:47 GMT, Claes Redestad wrote: >> src/java.base/share/classes/java/util/zip/ZipFile.java line 1872: >> >>> 1870: // Compare the lookup name with the name encoded >>> in the CEN >>> 1871: switch (zc.compare(name, cen, noff, nlen,

Re: RFR: 8340885: Desugar ZipCoder.Comparison [v2]

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 09:53:39 GMT, Eirik Bjørsnøs wrote: >> Claes Redestad has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Shift constant values >> - Update src/java.base/share/classes/java/util/zip/ZipCoder.java >> >>Co-author

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

2024-09-25 Thread Jorn Vernee
On Tue, 24 Sep 2024 14:18:58 GMT, Tobias Hartmann wrote: > When investigating an intermittent NPE with an Oracle internal test on > AArch64, I noticed that the NPE is actually a SIGSEGV in the code emitted by > `MethodHandles::jump_to_lambda_form` when trying to load the > `MemberName::method`

Re: RFR: 8340885: Desugar ZipCoder.Comparison [v2]

2024-09-25 Thread Claes Redestad
On Wed, 25 Sep 2024 09:52:20 GMT, Eirik Bjørsnøs wrote: >> Claes Redestad has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Shift constant values >> - Update src/java.base/share/classes/java/util/zip/ZipCoder.java >> >>Co-author

Re: RFR: 8340885: Desugar ZipCoder.Comparison [v2]

2024-09-25 Thread Claes Redestad
> This PR desugars the enum added by JDK-8301873 to reduce classes loaded on > bootstrap and stored in the default CDS archive by 2. Claes Redestad has updated the pull request incrementally with two additional commits since the last revision: - Shift constant values - Update src/java.base/sh

Re: RFR: 8340831: Simplify simple validation for class definition in MethodHandles.Lookup

2024-09-25 Thread Claes Redestad
On Tue, 24 Sep 2024 22:07:25 GMT, Chen Liang wrote: > `MethodHandles.Lookup` defines a `ClassFile` for simple validations; it is > unnecessary and can be scalarized manually. The removal of `ClassFile` class > is also slightly helpful for bootstrap by reducing class loading. Also > improved cl

Re: RFR: 8340885: Desugar ZipCoder.Comparison

2024-09-25 Thread Eirik Bjørsnøs
On Wed, 25 Sep 2024 09:15:04 GMT, Claes Redestad wrote: > This PR desugars the enum added by JDK-8301873 to reduce classes loaded on > bootstrap and stored in the default CDS archive by 2. Looks good to me, some minor suggestions inline. src/java.base/share/classes/java/util/zip/ZipCoder.java

RFR: 8340885: Desugar ZipCoder.Comparison

2024-09-25 Thread Claes Redestad
This PR desugars the enum added by JDK-8301873 to reduce classes loaded on bootstrap and stored in the default CDS archive by 2. - Commit messages: - Fix docs - Merge branch 'master' into no-comparison - Desugar Comparison enum Changes: https://git.openjdk.org/jdk/pull/21176/file

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

2024-09-25 Thread Aleksey Shipilev
On Tue, 24 Sep 2024 14:18:58 GMT, Tobias Hartmann wrote: > When investigating an intermittent NPE with an Oracle internal test on > AArch64, I noticed that the NPE is actually a SIGSEGV in the code emitted by > `MethodHandles::jump_to_lambda_form` when trying to load the > `MemberName::method`