Re: RFR: 8309196: Remove Thread.countStackFrames

2023-06-01 Thread Iris Clark
On Thu, 1 Jun 2023 06:40:04 GMT, Alan Bateman wrote: > Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 > for counting the stack frames of a suspended Thread. The method was > deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and >

Re: RFR: 8309196: Remove Thread.countStackFrames

2023-06-01 Thread Jaikiran Pai
On Thu, 1 Jun 2023 06:40:04 GMT, Alan Bateman wrote: > Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 > for counting the stack frames of a suspended Thread. The method was > deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and >

Re: RFR: JDK-8308913: Update core reflection for JEP 445 (preview)

2023-06-01 Thread Joe Darcy
On Fri, 26 May 2023 20:37:39 GMT, Joe Darcy wrote: > > > Looks fine. This version matches the current implementation where > > > `getCanonicalName` returns non-null. When the implementation of > > > `getCanonicalName` is updated to return null, the spec should be updated. > > > Nit: `` is

Re: RFR: JDK-8308913: Update core reflection for JEP 445 (preview) [v4]

2023-06-01 Thread Joe Darcy
> Explain in java.lang.Class how unnamed classes are modeled in core reflection. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Update reflective support. - Changes: - all: https://git.openjdk.org/jdk/pull/14165/files

Re: RFR: 8304425: ClassHierarchyResolver from Reflection [v8]

2023-06-01 Thread Chen Liang
On Fri, 2 Jun 2023 03:36:35 GMT, Chen Liang wrote: >> Add API to explore Class Hierarchy with a `ClassLoader` or a `Lookup` with >> proper privileges, with tests. >> >> This addition is useful in case classes at runtime are not loaded from the >> system class loader, such as Proxy. This is

Re: RFR: 8304425: ClassHierarchyResolver from Reflection [v8]

2023-06-01 Thread Chen Liang
> Add API to explore Class Hierarchy with a `ClassLoader` or a `Lookup` with > proper privileges, with tests. > > This addition is useful in case classes at runtime are not loaded from the > system class loader, such as Proxy. This is also useful to APIs that generate > bytecode with a

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v5]

2023-06-01 Thread Chen Liang
On Fri, 2 Jun 2023 02:12:30 GMT, Chen Liang wrote: >> Also fixed the bug with NPE in `IndirectVarHandle::isAccessModeSupported`. >> >> A few implementation-detail methods in VarHandle are now documented with the >> implied constraints to avoid subtle problems in the future. Changed >>

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v4]

2023-06-01 Thread Mandy Chung
On Fri, 2 Jun 2023 01:19:26 GMT, Chen Liang wrote: > In addition, should we initialize the ref class or the declaring class only? > I don't think we need to initialize the ref class when declaring class > initialization should be sufficient, but that is a change in behavior. Declaring class

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v5]

2023-06-01 Thread Chen Liang
> Also fixed the bug with NPE in `IndirectVarHandle::isAccessModeSupported`. > > A few implementation-detail methods in VarHandle are now documented with the > implied constraints to avoid subtle problems in the future. Changed > `IndirectVarHandle` to call `asDirect` lazily to accomodate the

Re: RFR: 8289220: Locale.forLanguageTag throws NPE due to soft ref used in locale cache being cleared [v3]

2023-06-01 Thread SUN Guoyun
On Thu, 1 Jun 2023 08:58:23 GMT, SUN Guoyun wrote: >> command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" >> TEST=gc/TestAllocHumongousFragment.java >> error info: >> >> Caused by: java.lang.NullPointerException: Cannot invoke >> "sun.util.locale.BaseLocale.getVariant()" because

Re: RFR: 8289220: Locale.forLanguageTag throws NPE due to soft ref used in locale cache being cleared [v3]

2023-06-01 Thread SUN Guoyun
On Thu, 1 Jun 2023 09:03:23 GMT, SUN Guoyun wrote: >> SUN Guoyun has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. The pull request contains one >> new commit

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v4]

2023-06-01 Thread Chen Liang
On Thu, 1 Jun 2023 21:26:25 GMT, Chen Liang wrote: >> Also fixed the bug with NPE in `IndirectVarHandle::isAccessModeSupported`. >> >> A few implementation-detail methods in VarHandle are now documented with the >> implied constraints to avoid subtle problems in the future. Changed >>

Re: RFR: 8307149: MethodHandles.arrayConstructor can be cached

2023-06-01 Thread Chen Liang
On Thu, 4 May 2023 23:29:17 GMT, Chen Liang wrote: > This patch migrates `MethodHandles::arrayConstructor`, added in Java 9 as a > hotfix to the incorrect constructor found on arrays via Lookup, to share the > array access caching features. The result is that calling >

Re: RFR: 8289220: Locale.forLanguageTag throws NPE due to soft ref used in locale cache being cleared [v3]

2023-06-01 Thread SUN Guoyun
On Thu, 1 Jun 2023 08:58:23 GMT, SUN Guoyun wrote: >> command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" >> TEST=gc/TestAllocHumongousFragment.java >> error info: >> >> Caused by: java.lang.NullPointerException: Cannot invoke >> "sun.util.locale.BaseLocale.getVariant()" because

Re: RFR: 8309196: Remove Thread.countStackFrames

2023-06-01 Thread David Holmes
On Thu, 1 Jun 2023 06:40:04 GMT, Alan Bateman wrote: > Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 > for counting the stack frames of a suspended Thread. The method was > deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and >

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v4]

2023-06-01 Thread Mandy Chung
On Thu, 1 Jun 2023 21:26:25 GMT, Chen Liang wrote: >> Also fixed the bug with NPE in `IndirectVarHandle::isAccessModeSupported`. >> >> A few implementation-detail methods in VarHandle are now documented with the >> implied constraints to avoid subtle problems in the future. Changed >>

RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java

2023-06-01 Thread Brian Burkhalter
For Unix, copy the `jchar`s into an allocated `char` array. - Commit messages: - 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java Changes: https://git.openjdk.org/jdk/pull/14276/files Webrev: https://webrevs.openjdk.org/?repo=jdk=14276=00 Issue:

Re: RFR: 8309216: Cast from jchar* to char* in test java/io/GetXSpace.java

2023-06-01 Thread Brian Burkhalter
On Fri, 2 Jun 2023 00:00:07 GMT, Brian Burkhalter wrote: > For Unix, copy the `jchar`s into an allocated `char` array. Preliminary test run passes. - PR Comment: https://git.openjdk.org/jdk/pull/14276#issuecomment-1572936688

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v4]

2023-06-01 Thread Jiangli Zhou
On Thu, 1 Jun 2023 16:18:24 GMT, Erik Joelsson wrote: > > > Another possibility might be the user provided `BUILD_LDCXX` includes > > > extra options in the testing build (?). If that's the case, we probably > > > could define a separate `BUILD_LD_PARTIAL` with no added options. In our > > >

Re: RFR: 8308090: Add container tests for on-the-fly resource quota updates [v2]

2023-06-01 Thread Mikhailo Seledtsov
On Tue, 23 May 2023 09:04:11 GMT, Severin Gehwolf wrote: >> Please review these test changes which implement automatic testing of >> container resource updates without JVM restart. Note that this merely tests >> container detection code handling this case. It doesn't do anything special >>

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Jorn Vernee
On Thu, 1 Jun 2023 20:57:25 GMT, Maurizio Cimadamore wrote: >> On a related note: should we even allow sequences of padding layouts? > > I let sequence of padding slide on the basis that groups of padding are > allowed. But it's a somewhat arbitrary line. That said, we do use stuff like >

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Jorn Vernee
On Thu, 1 Jun 2023 21:00:33 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/MemoryLayout.java line 470: >> >>> 468: * @throws IllegalArgumentException if the layout path contains >>> one or more dereference path elements. >>> 469: * @throws

Re: RFR: 8289220: [Shenandoah] TestAllocObjectArrays fails intermittently [v3]

2023-06-01 Thread Naoto Sato
On Thu, 1 Jun 2023 08:58:23 GMT, SUN Guoyun wrote: >> command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" >> TEST=gc/TestAllocHumongousFragment.java >> error info: >> >> Caused by: java.lang.NullPointerException: Cannot invoke >> "sun.util.locale.BaseLocale.getVariant()" because

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v4]

2023-06-01 Thread Chen Liang
> Also fixed the bug with NPE in `IndirectVarHandle::isAccessModeSupported`. > > A few implementation-detail methods in VarHandle are now documented with the > implied constraints to avoid subtle problems in the future. Changed > `IndirectVarHandle` to call `asDirect` lazily to accomodate the

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v3]

2023-06-01 Thread Chen Liang
On Thu, 1 Jun 2023 19:39:27 GMT, Mandy Chung wrote: > As for the implementation of `LazyStaticVarHandle`, I expect that > `makeFieldHandle` can always create the direct var handle (i.e. > `FieldStaticReadXXX` var handle) and then wrapped by `LazyStaticVarHandle` > similar to how

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Jorn Vernee
On Thu, 1 Jun 2023 21:04:42 GMT, Maurizio Cimadamore wrote: >> the idea behind this is to connect with the javadoc of `SymbolLookup` which >> defines and then uses symbol all over the place. > > Maybe a linkplan could help? Okay, but `SymbolLookup` also says this: "A symbol lookup retrieves

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 13:00:58 GMT, Alan Bateman wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix wrong link in layout well-formedness doc > > src/java.base/share/classes/java/lang/foreign/Arena.java line

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 21:04:27 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 473: >> >>> 471: >>> 472: /** >>> 473: * Creates a method handle which is used to call a foreign >>> function with the given signature and symbol. >> >> I

Re: RFR: JDK-8306584: Start of release updates for JDK 22 [v5]

2023-06-01 Thread Joe Darcy
> Time to get JDK 22 underway... Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 29 commits: - Update symbol files for JDK 21 build 25. - Merge branch 'master' into JDK-8306584 - Refactor a few more enums. - Respond to

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 18:12:28 GMT, Jorn Vernee wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix wrong link in layout well-formedness doc > > src/java.base/share/classes/java/lang/foreign/Linker.java line

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 19:25:38 GMT, Jorn Vernee wrote: >> src/java.base/share/classes/java/lang/foreign/MemoryLayout.java line 645: >> >>> 643: * is 1. As such, regardless of its size, in the absence of an >>> {@linkplain #withByteAlignment(long) explicit} >>> 644: * alignment

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 19:36:48 GMT, Jorn Vernee wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix wrong link in layout well-formedness doc > > src/java.base/share/classes/java/lang/foreign/MemorySegment.java

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 13:16:44 GMT, Alan Bateman wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix wrong link in layout well-formedness doc > >

RFR: 8307840: SequencedMap view method specification and implementation adjustments

2023-06-01 Thread Stuart Marks
Adjust the specification of the `SequencedMap` sequenced-view methods, and adjust implementations to match. - Commit messages: - Minor wording adjustment. - 8307840: SequencedMap view method specification and implementation adjustments Changes:

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Jorn Vernee
On Thu, 1 Jun 2023 19:24:35 GMT, Jorn Vernee wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix wrong link in layout well-formedness doc > > src/java.base/share/classes/java/lang/foreign/MemoryLayout.java

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Jorn Vernee
On Mon, 29 May 2023 10:53:52 GMT, Maurizio Cimadamore wrote: >> As the FFM API evolved over time, some parts of the javadoc went out of >> sync. Now that most of the API is stable, it is a good time to look again at >> the javadoc as a whole, and bring some more consistency. >> >> While most

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v29]

2023-06-01 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 45 commits: - Merge branch 'master' into 8306112 - Integrating JDK-8308913 - Integrate

Re: RFR: 8291065: Creating a VarHandle for a static field triggers class initialization [v3]

2023-06-01 Thread Mandy Chung
On Wed, 17 May 2023 17:20:37 GMT, Chen Liang wrote: >> Also fixed the bug with NPE in `IndirectVarHandle::isAccessModeSupported`. >> >> A few implementation-detail methods in VarHandle are now documented with the >> implied constraints to avoid subtle problems in the future. Changed >>

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v2]

2023-06-01 Thread Adam Sotona
On Thu, 1 Jun 2023 15:14:52 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed benchmarks > > src/java.base/share/classes/jdk/internal/classfile/impl/StackMapGenerator.java > line 840: > >>

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v2]

2023-06-01 Thread Adam Sotona
On Thu, 1 Jun 2023 15:04:00 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixed benchmarks > > src/java.base/share/classes/java/lang/Module.java line 1593: > >> 1591: private Class

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v28]

2023-06-01 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Integrating JDK-8308913 - Changes: - all: https://git.openjdk.org/jdk/pull/13689/files -

Re: RFR: 8309241: ClassForNameLeak fails intermittently as the class loader hasn't been unloaded

2023-06-01 Thread Mandy Chung
On Thu, 1 Jun 2023 18:19:14 GMT, Mandy Chung wrote: > Convert `ClassForNameLeak` test to use `jdk.test.lib.util.ForceGC` that would > be more reliable in waiting for the class loader to be unloaded. @dougxc has verified that the updated test passes on GraalVM (thanks). - PR

Re: RFR: 8309241: ClassForNameLeak fails intermittently as the class loader hasn't been unloaded

2023-06-01 Thread Doug Simon
On Thu, 1 Jun 2023 18:19:14 GMT, Mandy Chung wrote: > Convert `ClassForNameLeak` test to use `jdk.test.lib.util.ForceGC` that would > be more reliable in waiting for the class loader to be unloaded. Marked as reviewed by dnsimon (Committer). - PR Review:

RFR: 8309241: ClassForNameLeak fails intermittently as the class loader hasn't been unloaded

2023-06-01 Thread Mandy Chung
Convert `ClassForNameLeak` test to use `jdk.test.lib.util.ForceGC` that would be more reliable in waiting for the class loader to be unloaded. - Commit messages: - 8309241: ClassForNameLeak fails intermittently as the class loader hasn't been unloaded Changes:

Re: RFR: 8308780: Fix the Java Integer types on Windows [v4]

2023-06-01 Thread Phil Race
On Thu, 1 Jun 2023 11:49:24 GMT, Julian Waters wrote: >> On Windows, the basic Java Integer types are defined as long and __int64 >> respectively. In particular, the former is rather problematic since it >> breaks compilation as the Visual C++ becomes stricter and more compliant >> with every

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v7]

2023-06-01 Thread Andrei Pangin
On Thu, 1 Jun 2023 09:37:29 GMT, Aleksey Shipilev wrote: >> UUID is the very important class that is used to track identities of objects >> in large scale systems. On some of our systems, `UUID.randomUUID` takes >1% >> of total CPU time, and is frequently a scalability bottleneck due to >>

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v27]

2023-06-01 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Integrate JDK-8308916 and JDK-8308831 - javax.model - Changes: - all:

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v17]

2023-06-01 Thread Mandy Chung
On Thu, 1 Jun 2023 15:17:41 GMT, Chen Liang wrote: >> As John Rose has pointed out in this issue, the current j.l.r.Proxy based >> implementation of MethodHandleProxies.asInterface has a few issues: >> 1. Exposes too much information via Proxy supertype (and WrapperInstance >> interface) >> 2.

Re: RFR: 8289220: [Shenandoah] TestAllocObjectArrays fails intermittently [v3]

2023-06-01 Thread Naoto Sato
On Thu, 1 Jun 2023 08:58:23 GMT, SUN Guoyun wrote: >> command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" >> TEST=gc/TestAllocHumongousFragment.java >> error info: >> >> Caused by: java.lang.NullPointerException: Cannot invoke >> "sun.util.locale.BaseLocale.getVariant()" because

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v4]

2023-06-01 Thread Erik Joelsson
On Fri, 26 May 2023 20:26:02 GMT, Jiangli Zhou wrote: > > Another possibility might be the user provided `BUILD_LDCXX` includes extra > > options in the testing build (?). If that's the case, we probably could > > define a separate `BUILD_LD_PARTIAL` with no added options. In our > >

Re: RFR: 8309196: Remove Thread.countStackFrames

2023-06-01 Thread Mandy Chung
On Thu, 1 Jun 2023 06:40:04 GMT, Alan Bateman wrote: > Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 > for counting the stack frames of a suspended Thread. The method was > deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and >

Re: RFR: 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not thread safe

2023-06-01 Thread Claes Redestad
On Mon, 20 Feb 2023 17:03:33 GMT, Peter Levart wrote: >> We don't fear calling the factory twice for benign races, as the distinct >> constructor factory instances are behaviorally the same. >> >> The true issue lies in the double getfield operations: Java memory model >> doesn't require the

Integrated: 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not thread safe

2023-06-01 Thread Chen Liang
On Sun, 19 Feb 2023 18:41:18 GMT, Chen Liang wrote: > 8302822: Method/Field/Constructor/RecordComponent::getGenericInfo() is not > thread safe This pull request has now been integrated. Changeset: be36096a Author:Chen Liang Committer: Claes Redestad URL:

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v4]

2023-06-01 Thread Jorn Vernee
On Thu, 1 Jun 2023 15:28:33 GMT, Jorn Vernee wrote: >> In C, arguments smaller than `int` are promoted to (`unsigned`) `int`, and >> `float` is promoted to `double`, when being passed as variadic argument (see >> e.g. >>

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v3]

2023-06-01 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 15:16:42 GMT, Jorn Vernee wrote: >> In C, arguments smaller than `int` are promoted to (`unsigned`) `int`, and >> `float` is promoted to `double`, when being passed as variadic argument (see >> e.g. >>

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v3]

2023-06-01 Thread Jorn Vernee
On Thu, 1 Jun 2023 15:19:48 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rework javadoc > > src/java.base/share/classes/java/lang/foreign/Linker.java line 373: > >> 371: * With an

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v4]

2023-06-01 Thread Jorn Vernee
> In C, arguments smaller than `int` are promoted to (`unsigned`) `int`, and > `float` is promoted to `double`, when being passed as variadic argument (see > e.g. > https://en.cppreference.com/w/c/language/conversion#Default_argument_promotions). > This patch restricts the layouts that can be

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v2]

2023-06-01 Thread Chen Liang
On Thu, 1 Jun 2023 15:20:27 GMT, Adam Sotona wrote: >> Classfile context object and multi-state options have been discussed at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html >> This patch implements the proposed changes in Classfile API and fixes all >> affected

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s) [v2]

2023-06-01 Thread Adam Sotona
> Classfile context object and multi-state options have been discussed at > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html > This patch implements the proposed changes in Classfile API and fixes all > affected code across JDK sources and tests. > > Please review. > >

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v16]

2023-06-01 Thread Chen Liang
On Sun, 7 May 2023 13:34:54 GMT, Chen Liang wrote: >> As John Rose has pointed out in this issue, the current j.l.r.Proxy based >> implementation of MethodHandleProxies.asInterface has a few issues: >> 1. Exposes too much information via Proxy supertype (and WrapperInstance >> interface) >> 2.

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v17]

2023-06-01 Thread Chen Liang
> As John Rose has pointed out in this issue, the current j.l.r.Proxy based > implementation of MethodHandleProxies.asInterface has a few issues: > 1. Exposes too much information via Proxy supertype (and WrapperInstance > interface) > 2. Does not allow future expansion to support SAM[^1]

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v2]

2023-06-01 Thread Jorn Vernee
On Wed, 31 May 2023 23:57:01 GMT, Jorn Vernee wrote: >> Also, should we say somewhere that, for prototype-less functions, >> `firstVariadicArg` should always have an index of 0 (e.g. any other value is >> illegal, trivially). It's not super important, just one of those little >> things that

Re: RFR: 8308031: Linkers should reject unpromoted variadic parameters [v3]

2023-06-01 Thread Jorn Vernee
> In C, arguments smaller than `int` are promoted to (`unsigned`) `int`, and > `float` is promoted to `double`, when being passed as variadic argument (see > e.g. > https://en.cppreference.com/w/c/language/conversion#Default_argument_promotions). > This patch restricts the layouts that can be

Re: RFR: 8308286 Fix clang warnings in linux code [v3]

2023-06-01 Thread Artem Semenov
On Wed, 31 May 2023 13:52:39 GMT, Weijun Wang wrote: >> Artem Semenov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update > > src/java.security.jgss/share/native/libj2gss/gssapi.h line 47: > >> 45: >> 46: // Condition was copied

Re: RFR: 8308286 Fix clang warnings in linux code [v3]

2023-06-01 Thread Weijun Wang
On Thu, 1 Jun 2023 15:02:16 GMT, Artem Semenov wrote: >> src/java.security.jgss/share/native/libj2gss/gssapi.h line 47: >> >>> 45: >>> 46: // Condition was copied from >>> 47: // >>> Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/gssapi/gssapi.h

Re: RFR: 8309196: Remove Thread.countStackFrames

2023-06-01 Thread Roger Riggs
On Thu, 1 Jun 2023 06:40:04 GMT, Alan Bateman wrote: > Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 > for counting the stack frames of a suspended Thread. The method was > deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and >

Re: RFR: 8308286 Fix clang warnings in linux code [v4]

2023-06-01 Thread Artem Semenov
> When using the clang compiler to build OpenJDk on Linux, we encounter various > "warnings as errors". > They can be fixed with small changes. Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: update - Changes: -

RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s)

2023-06-01 Thread Adam Sotona
Classfile context object and multi-state options have been discussed at https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html This patch implements the proposed changes in Classfile API and fixes all affected code across JDK sources and tests. Please review. Thanks, Adam

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s)

2023-06-01 Thread Adam Sotona
On Wed, 31 May 2023 05:42:58 GMT, Chen Liang wrote: >> Classfile context object and multi-state options have been discussed at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html >> This patch implements the proposed changes in Classfile API and fixes all >> affected

Re: RFR: 8308899: Introduce Classfile.Context and improve Classfile.Option(s)

2023-06-01 Thread Chen Liang
On Fri, 26 May 2023 14:56:57 GMT, Adam Sotona wrote: > Classfile context object and multi-state options have been discussed at > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-May/000321.html > This patch implements the proposed changes in Classfile API and fixes all > affected code

Re: RFR: 8306647: Implementation of Structured Concurrency (Preview) [v4]

2023-06-01 Thread Alan Bateman
> This is the implementation of: > > - JEP 453: Structured Concurrency (Preview) > - JEP 446: Scoped Values (Preview) > > For the most part, this is just moving code and tests. StructuredTaskScope > moves to j.u.concurrent as a preview API, ScopedValue moves to j.lang as a > preview API, and

Re: RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-01 Thread Alan Bateman
On Mon, 29 May 2023 10:53:52 GMT, Maurizio Cimadamore wrote: >> As the FFM API evolved over time, some parts of the javadoc went out of >> sync. Now that most of the API is stable, it is a good time to look again at >> the javadoc as a whole, and bring some more consistency. >> >> While most

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v7]

2023-06-01 Thread Aleksey Shipilev
On Thu, 1 Jun 2023 12:59:14 GMT, Brett Okken wrote: >> Aleksey Shipilev has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains 13 commits: >> >> - Revert test changes >> - Merge branch 'master' into JDK-8308804-uuid-buffers >> -

Withdrawn: JDK-8308288: Fix xlc17 clang warnings in shared code

2023-06-01 Thread JoKern65
On Thu, 25 May 2023 09:14:14 GMT, JoKern65 wrote: > When using the new xlc17 compiler (based on a recent clang) to build OpenJDk > on AIX , we run into various "warnings as errors". > Some of those are in shared codebase and could be addressed by small > adjustments. > A lot of those changes

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v16]

2023-06-01 Thread Jim Laskey
On Thu, 1 Jun 2023 12:55:28 GMT, Alan Bateman wrote: >> Yes. There is some juggling going on to get the code to align with the >> requirement and the interpretation thereof. > >> Yes. There is some juggling going on to get the code to align with the >> requirement and the interpretation

Re: RFR: JDK-8308288: Fix xlc17 clang warnings in shared code [v2]

2023-06-01 Thread JoKern65
On Fri, 26 May 2023 08:31:46 GMT, JoKern65 wrote: >> When using the new xlc17 compiler (based on a recent clang) to build OpenJDk >> on AIX , we run into various "warnings as errors". >> Some of those are in shared codebase and could be addressed by small >> adjustments. >> A lot of those

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v7]

2023-06-01 Thread Brett Okken
On Thu, 1 Jun 2023 09:37:29 GMT, Aleksey Shipilev wrote: >> UUID is the very important class that is used to track identities of objects >> in large scale systems. On some of our systems, `UUID.randomUUID` takes >1% >> of total CPU time, and is frequently a scalability bottleneck due to >>

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v16]

2023-06-01 Thread Alan Bateman
On Tue, 23 May 2023 18:09:03 GMT, Jim Laskey wrote: > Yes. There is some juggling going on to get the code to align with the > requirement and the interpretation thereof. Is this stable now, specifically the "Selecting a main method" section and the behavior change where an instance main

Re: RFR: 8303530: Redefine JAXP Configuration File [v15]

2023-06-01 Thread Alan Bateman
On Wed, 31 May 2023 21:58:44 GMT, Joe Wang wrote: >> Add a system property, jdk.xml.config.file, to return the path to a custom >> JAXP configuration file. The current configuration file, jaxp.properties, >> that the JDK supports will become the default configuration file. >> >> CSR:

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v26]

2023-06-01 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Missing Preview feature enum - Changes: - all: https://git.openjdk.org/jdk/pull/13689/files

RFR: 8309196: Remove Thread.countStackFrames

2023-06-01 Thread Alan Bateman
Thread.countStackFrames is/was an ill-defined method that dates from JDK 1.0 for counting the stack frames of a suspended Thread. The method was deprecated in JDK 1.2 (1998), deprecated for removal in Java 9, and re-specified/degraded to throw UOE unconditionally in Java 14. Java 22 would be a

Re: RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v25]

2023-06-01 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with one additional commit since the last revision: Restrict access to unnamed class members when doing separate compilation. - Changes: - all:

Re: RFR: 8309191: Reduce JDK dependencies of cgroup support

2023-06-01 Thread Alan Bateman
On Thu, 1 Jun 2023 12:01:15 GMT, Severin Gehwolf wrote: > It's easy to introduce a new change to this code which accidentally drags in > some of those (unwanted) dependencies again. I do not like the changes proposed here, they are all crying out for several round cleanups and modernization.

Re: RFR: 8308780: Fix the Java Integer types on Windows [v4]

2023-06-01 Thread Julian Waters
On Thu, 1 Jun 2023 11:49:24 GMT, Julian Waters wrote: >> On Windows, the basic Java Integer types are defined as long and __int64 >> respectively. In particular, the former is rather problematic since it >> breaks compilation as the Visual C++ becomes stricter and more compliant >> with every

Integrated: 8308856: jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo math problem

2023-06-01 Thread Adam Sotona
On Thu, 25 May 2023 12:24:59 GMT, Adam Sotona wrote: > Fix of jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo returning correct > zero power of two. > > Please review. > > Thanks, > Adam This pull request has now been integrated. Changeset: a6109bf1 Author:Adam Sotona URL:

Re: RFR: 8308780: Fix the Java Integer types on Windows [v4]

2023-06-01 Thread Julian Waters
> On Windows, the basic Java Integer types are defined as long and __int64 > respectively. In particular, the former is rather problematic since it breaks > compilation as the Visual C++ becomes stricter and more compliant with every > release, which means the way Windows code treats long as a

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-06-01 Thread Marius Lichtblau
On Thu, 1 Jun 2023 10:55:26 GMT, Volker Simonis wrote: >>> > Sorry, but I don't understand this argument. If we do a short read we >>> > will work with corrupted ChildStuff and SpawnInfo >>> > structures. This can in the extreme case execute arbitrary code (e.g. if >>> > ChildStuff.argv is not

Integrated: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-06-01 Thread Volker Simonis
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote: > Since JDK13, executing commands in a sub-process defaults to the so called > `POSIX_SPAWN` launching mechanism (i.e. > `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by > using `posix_spawn(3)` to firstly start

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-06-01 Thread Volker Simonis
On Fri, 19 May 2023 15:43:30 GMT, Roger Riggs wrote: >>> Sorry, but I don't understand this argument. If we do a short read we will >>> work with corrupted ChildStuff and SpawnInfo >>> structures. This can in the extreme case execute arbitrary code (e.g. if >>> ChildStuff.argv is not fully

Re: RFR: 8308856: jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo math problem [v2]

2023-06-01 Thread Jan Lahoda
On Mon, 29 May 2023 08:05:23 GMT, Adam Sotona wrote: >> Fix of jdk.internal.classfile.impl.EntryMap::nextPowerOfTwo returning >> correct zero power of two. >> >> Please review. >> >> Thanks, >> Adam > > Adam Sotona has updated the pull request incrementally with one additional > commit since

Re: RFR: 8309191: Reduce JDK dependencies of cgroup support

2023-06-01 Thread Severin Gehwolf
On Tue, 30 May 2023 13:03:27 GMT, Aleksandar Pejović wrote: > The current code for cgroup support in the JDK has large and expensive > dependencies: it uses NIO, streams, and regular expressions. This leads to > unnecessary class loading and slows down startup, especially when the code is >

Re: RFR: 8308804: Improve UUID.randomUUID performance with bulk/scalable PRNG access [v7]

2023-06-01 Thread Aleksey Shipilev
> UUID is the very important class that is used to track identities of objects > in large scale systems. On some of our systems, `UUID.randomUUID` takes >1% > of total CPU time, and is frequently a scalability bottleneck due to > `SecureRandom` synchronization. > > The major issue with UUID

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it [v8]

2023-06-01 Thread Thomas Stuefe
On Tue, 30 May 2023 13:19:37 GMT, Volker Simonis wrote: >> Since JDK13, executing commands in a sub-process defaults to the so called >> `POSIX_SPAWN` launching mechanism (i.e. >> `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by >> using `posix_spawn(3)` to firstly

Re: RFR: 8308452: Extend internal Architecture enum with byte order and address size [v4]

2023-06-01 Thread Martin Doerr
On Wed, 31 May 2023 18:25:18 GMT, Roger Riggs wrote: >> The internal enum jdk.internal.util.Architecture does not provide >> information about the big or little endianness or the address size (64 or 32 >> bits). The endian-ness and address size are intrinsic to the architecture. >> >> The

Re: RFR: 8289220: [Shenandoah] TestAllocObjectArrays fails intermittently [v3]

2023-06-01 Thread SUN Guoyun
On Thu, 1 Jun 2023 08:58:23 GMT, SUN Guoyun wrote: >> command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" >> TEST=gc/TestAllocHumongousFragment.java >> error info: >> >> Caused by: java.lang.NullPointerException: Cannot invoke >> "sun.util.locale.BaseLocale.getVariant()" because

Integrated: 8308803: Improve java/util/UUID/UUIDTest.java

2023-06-01 Thread Aleksey Shipilev
On Wed, 24 May 2023 19:18:33 GMT, Aleksey Shipilev wrote: > UUID is very important class that is used to track identities of objects in > large scale systems. Yet, the coverage in JDK test is disappointing: it tests > only 100 of UUID instances per test, which is way too small to detect >

Re: RFR: 8308803: Improve java/util/UUID/UUIDTest.java [v3]

2023-06-01 Thread Aleksey Shipilev
On Wed, 31 May 2023 14:53:09 GMT, Aleksey Shipilev wrote: >> UUID is very important class that is used to track identities of objects in >> large scale systems. Yet, the coverage in JDK test is disappointing: it >> tests only 100 of UUID instances per test, which is way too small to detect >>

Re: RFR: 8289220: [Shenandoah] TestAllocObjectArrays fails intermittently [v3]

2023-06-01 Thread SUN Guoyun
> command: make test CONF=fastdebug JTREG="VM_OPTIONS=-Xcomp" > TEST=gc/TestAllocHumongousFragment.java > error info: > > Caused by: java.lang.NullPointerException: Cannot invoke > "sun.util.locale.BaseLocale.getVariant()" because "base" is null > at

Re: RFR: 8308090: Add container tests for on-the-fly resource quota updates [v2]

2023-06-01 Thread Severin Gehwolf
On Thu, 1 Jun 2023 02:16:12 GMT, David Holmes wrote: >> Anyone willing to review this? > > @jerboaa I can't really review the tests themselves but will run through our > CI to see if they cause any problems. If not then they should be okay to add. Thanks @dholmes-ora for running them through

Re: RFR: 8308780: Fix the Java Integer types on Windows [v3]

2023-06-01 Thread Julian Waters
> On Windows, the basic Java Integer types are defined as long and __int64 > respectively. In particular, the former is rather problematic since it breaks > compilation as the Visual C++ becomes stricter and more compliant with every > release, which means the way Windows code treats long as a

  1   2   >