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

2023-06-02 Thread Chen Liang
On Sat, 3 Jun 2023 02:25:59 GMT, ExE Boss wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove lazy init of MH, for all invocation of the Lazy VH needs this MH > > src/java.base/share/classes/java/lang/invoke/LazyI

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

2023-06-02 Thread ExE Boss
On Sat, 3 Jun 2023 00:16:23 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 >> `Indirec

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

2023-06-02 Thread Joe Darcy
On Fri, 2 Jun 2023 22:10:44 GMT, Jim Laskey wrote: >> 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: > > Update the specification for TypeElement#getQual

Re: RFR: 8309334: ProcessTools.main() does not properly set thread names when using the virtual thread wrapper

2023-06-02 Thread Leonid Mesnik
On Fri, 2 Jun 2023 21:30:46 GMT, Chris Plummer wrote: > Normally when a virtual thread wrapper is used to run a test, the main thread > is renamed to "old-m-a-i-n" and the new virtual thread that will act as the > main thread is named "main". Neither is being done by `ProcessTools.main()`. > T

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

2023-06-02 Thread Chen Liang
On Sat, 3 Jun 2023 00:16:23 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 >> `Indirec

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

2023-06-02 Thread Joe Darcy
On Fri, 2 Jun 2023 23:46:57 GMT, Chen Liang wrote: > Will this accidentally return `true` for classes from other JVM programming > languages? That is a potential concern. Future iteration of this work will likely use a different idiom to determine is-unnamed that would be more robust against f

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

2023-06-02 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 la

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

2023-06-02 Thread Mandy Chung
On Fri, 2 Jun 2023 02:37:13 GMT, Chen Liang wrote: > I've also updated the benchmark for the latest patch. Unfortunately the > regular invocations and lazy var handle initial call performance saw a > decrease. Maybe I misunderstood what you meant about "a decrease in performance". > The indir

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

2023-06-02 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 la

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

2023-06-02 Thread Chen Liang
On Fri, 2 Jun 2023 18:41:57 GMT, Mandy Chung wrote: >> As mentioned in https://bugs.openjdk.org/browse/JDK-8308916 the expression >> should be `PreviewFeatures.isEnabled() && isSynthetic() && >> isTopLevelClass()` as `PreviewFeatures.isEnabled()` is a private static >> final test that will ef

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

2023-06-02 Thread Chen Liang
On Fri, 2 Jun 2023 22:50:21 GMT, Mandy Chung wrote: > what performance results do you see with this change? The indirect VH invocation already has a performance similar to the direct invocation in JMH. Do you mean that I should add `asDirect` to the direct paths in VH and check the benchmark r

Re: RFR: 8309334: ProcessTools.main() does not properly set thread names when using the virtual thread wrapper

2023-06-02 Thread Alex Menkov
On Fri, 2 Jun 2023 21:30:46 GMT, Chris Plummer wrote: > Normally when a virtual thread wrapper is used to run a test, the main thread > is renamed to "old-m-a-i-n" and the new virtual thread that will act as the > main thread is named "main". Neither is being done by `ProcessTools.main()`. > T

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

2023-06-02 Thread Mandy Chung
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 >> `Indirec

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

2023-06-02 Thread Chen Liang
On Fri, 2 Jun 2023 16:29:13 GMT, Paul Sandoz wrote: > I wonder if it is possible to transition from an lazy (indirect) VH to a > direct VH once initialized i.e., `checkAccessModeThenIsDirect` returns the > value of `initialized`. Thereby we reduce the potential footprint cost of > inflating fu

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

2023-06-02 Thread Brian Burkhalter
On Fri, 2 Jun 2023 22:23:12 GMT, Naoto Sato wrote: >> Probably not. This is only intended to cover the constrained case of this >> test. Something like the macro `WITH_PLATFORM_STRING` in `libjava/io_util.h` >> would be needed for the general case, but I thought that that might be >> overdoing

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

2023-06-02 Thread Naoto Sato
On Fri, 2 Jun 2023 22:18:45 GMT, Brian Burkhalter wrote: >> I just wonder if jchar is UTF-16 and char is platform encoding, would it >> work by simply casting the low 8bit to char? > > Probably not. This is only intended to cover the constrained case of this > test. Something like the macro `WI

Re: RFR: 8308031: Linkers should promote variadic arguments [v7]

2023-06-02 Thread Maurizio Cimadamore
On Fri, 2 Jun 2023 16:22:43 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. >> https://en.cppreference.com/w/c/language/conversion#Default_argument_prom

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

2023-06-02 Thread Naoto Sato
On Fri, 2 Jun 2023 19:23:10 GMT, Brian Burkhalter wrote: >> For Unix, copy the `jchar`s into an allocated `char` array. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8309216: Move string release into common flow (win)

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

2023-06-02 Thread Brian Burkhalter
On Fri, 2 Jun 2023 22:00:48 GMT, Naoto Sato wrote: >> I don't think so if `chars` is `char *` and `strchars` is `jchar*` as I >> think `char` is 8 bits and `jchar` is 16 bits. > > I just wonder if jchar is UTF-16 and char is platform encoding, would it work > by simply casting the low 8bit to c

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

2023-06-02 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: Update the specification for TypeElement#getQualifiedName and TypeElement#getSimpleName - Change

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

2023-06-02 Thread Naoto Sato
On Fri, 2 Jun 2023 18:36:56 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/File/libGetXSpace.c line 142: >> >>> 140: for (int i = 0; i < len; i++) { >>> 141: chars[i] = (char)strchars[i]; >>> 142: } >> >> Is this `memcpy(chars, strchars, len);` > > I don't think so if `chars`

RFR: 8309334: ProcessTools.main() does not properly set thread names when using the virtual thread wrapper

2023-06-02 Thread Chris Plummer
Normally when a virtual thread wrapper is used to run a test, the main thread is renamed to "old-m-a-i-n" and the new virtual thread that will act as the main thread is named "main". Neither is being done by `ProcessTools.main()`. This can cause problems for tests that expect the main thread tha

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

2023-06-02 Thread Roger Riggs
On Fri, 2 Jun 2023 19:23:10 GMT, Brian Burkhalter wrote: >> For Unix, copy the `jchar`s into an allocated `char` array. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8309216: Move string release into common flow (win)

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

2023-06-02 Thread Jim Laskey
> Add flexible main methods and anonymous main classes to the Java language. Jim Laskey has updated the pull request incrementally with two additional commits since the last revision: - Use getQualifiedName() to indicate unnamed class - ClassSymbol#getSimpleName() returning empty name breaks s

Integrated: 8303530: Redefine JAXP Configuration File

2023-06-02 Thread Joe Wang
On Sat, 11 Mar 2023 04:28:16 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: https://bugs.o

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

2023-06-02 Thread Joe Wang
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: https://b

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

2023-06-02 Thread Mandy Chung
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 >> `Indirec

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

2023-06-02 Thread Stuart Marks
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: https://b

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

2023-06-02 Thread Brian Burkhalter
On Fri, 2 Jun 2023 18:37:27 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/File/libGetXSpace.c line 85: >> >>> 83: // use GetDiskSpaceInformationW >>> 84: DISK_SPACE_INFORMATION diskSpaceInfo; >>> 85: BOOL hres = pfnGetDiskSpaceInformation(path, &diskSpaceInfo); >> >>

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

2023-06-02 Thread Brian Burkhalter
> For Unix, copy the `jchar`s into an allocated `char` array. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8309216: Move string release into common flow (win) - Changes: - all: https://git.openjdk.org/jdk/pull/1

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

2023-06-02 Thread Mandy Chung
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 >> `Indirec

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

2023-06-02 Thread Mandy Chung
On Fri, 2 Jun 2023 16:29:13 GMT, Paul Sandoz wrote: > I wonder if it is possible to transition from an lazy (indirect) VH to a > direct VH once initialized i.e., `checkAccessModeThenIsDirect` returns the > value of `initialized`. Sounds a good idea. Once the class is initialized, the lazy VH

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

2023-06-02 Thread Stuart Marks
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: https://b

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

2023-06-02 Thread Paul Sandoz
On Fri, 2 Jun 2023 17:16:09 GMT, Mandy Chung wrote: > > I think we only need to initialize Parent without initializing Child in > > this case. > > The bytecode behavior to access the field via > `lookup.findStaticVarHandle(Child.class, "value", int[].class)` is > `Child.value;`. The class or

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

2023-06-02 Thread Mandy Chung
On Fri, 2 Jun 2023 18:09:23 GMT, Jim Laskey wrote: >> Hmm. I think adding at least a check for ACC_FINAL should be fine as it >> should have near-zero cost on top of the existing predicate once the method >> get compiled. (In future iterations of the JEP, the idiom to identify >> isUnnamed wil

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

2023-06-02 Thread Brian Burkhalter
On Fri, 2 Jun 2023 18:26:33 GMT, Roger Riggs wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8309216: Reformat malloc size calculation > > test/jdk/java/io/File/libGetXSpace.c line 85: > >> 83: // use

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

2023-06-02 Thread Roger Riggs
On Fri, 2 Jun 2023 15:57:31 GMT, Brian Burkhalter wrote: >> For Unix, copy the `jchar`s into an allocated `char` array. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8309216: Reformat malloc size calculation test/jdk

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

2023-06-02 Thread Stuart Marks
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: https://b

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

2023-06-02 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. This pull request has now been integrated. Changeset: a23bbea9 Author:Mandy Chung URL:

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

2023-06-02 Thread Jim Laskey
On Fri, 2 Jun 2023 17:25:20 GMT, Joe Darcy wrote: >> src/java.base/share/classes/java/lang/Class.java line 1884: >> >>> 1882: reflective=true) >>> 1883: public boolean isUnnamedClass() { >>> 1884: return isSynthetic() && PreviewFeatures.isEnabled() && >>> isTopLe

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

2023-06-02 Thread Brent Christian
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. Good changes. - Marked as reviewed by bchristi (Reviewer). PR Review: https://git

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

2023-06-02 Thread Naoto Sato
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: https://b

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

2023-06-02 Thread Joe Darcy
On Fri, 2 Jun 2023 16:44:35 GMT, Mandy Chung wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update reflective support. > > src/java.base/share/classes/java/lang/Class.java line 1884: > >> 1882: r

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

2023-06-02 Thread Mandy Chung
On Fri, 2 Jun 2023 02:37:13 GMT, Chen Liang wrote: > I think we only need to initialize Parent without initializing Child in this > case. The bytecode behavior to access the field via `lookup.findStaticVarHandle(Child.class, "value", int[].class)` is `Child.value;`. The class or interface t

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

2023-06-02 Thread Mandy Chung
On Fri, 2 Jun 2023 04:48:35 GMT, Joe Darcy wrote: >> 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. src/java.base/

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

2023-06-02 Thread Jorn Vernee
On Fri, 2 Jun 2023 11:41:38 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 o

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

2023-06-02 Thread Paul Sandoz
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 >> `Indirec

Re: RFR: 8308031: Linkers should promote variadic arguments [v7]

2023-06-02 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 adds the automatic argument promoti

Re: RFR: 8308031: Linkers should promote variadic arguments [v6]

2023-06-02 Thread Jorn Vernee
On Fri, 2 Jun 2023 15:52:06 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 11 additional >> com

Re: RFR: 8308031: Linkers should promote variadic arguments [v6]

2023-06-02 Thread Jorn Vernee
On Fri, 2 Jun 2023 15:47:05 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 11 additional >> com

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

2023-06-02 Thread Brian Burkhalter
> For Unix, copy the `jchar`s into an allocated `char` array. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8309216: Reformat malloc size calculation - Changes: - all: https://git.openjdk.org/jdk/pull/14276/files

Re: RFR: 8308031: Linkers should promote variadic arguments [v6]

2023-06-02 Thread Maurizio Cimadamore
On Fri, 2 Jun 2023 15:16:28 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. >> https://en.cppreference.com/w/c/language/conversion#Default_argument_prom

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

2023-06-02 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 u

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

2023-06-02 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. >> https://en.cppreference.com/w/c/language/conversion#Default_argument_prom

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v17]

2023-06-02 Thread Roger Riggs
On Wed, 29 Mar 2023 01:40:36 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated imag

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

2023-06-02 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 u

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-02 Thread Erik Joelsson
On Thu, 1 Jun 2023 23:38:03 GMT, Jiangli Zhou wrote: > Sounds good for solving the macosx `ar` limitation differently. I'll change > that. We can also exclude the partial linking part for gcc (due the older > tool issue that you've found). Any concerns with including partial linking > step for

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

2023-06-02 Thread Julian Waters
On Thu, 1 Jun 2023 17:43:02 GMT, Phil Race wrote: > I'm not sure I understand the logic here. I would not want to move to using > Java typedefs in places where the windows APIs specify the types they are > expecting. If something comes in from a JNI down-call we should convert it to > the type

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

2023-06-02 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 47 commits: - Merge branch 'master' into 8306112 - Update reflection to follow spec - Merge bra

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

2023-06-02 Thread Jorn Vernee
On Fri, 2 Jun 2023 11:07:42 GMT, Maurizio Cimadamore wrote: >> Yeah - I meant what you said - but now that you said it, I also saw how what >> I've written can be prone to an alternate (and wrong) interpretation. I'll >> clarify. > > Actually, looking back at this I'm not sure it's correct? We

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

2023-06-02 Thread Maurizio Cimadamore
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: 8308645: Javadoc of FFM API needs to be refreshed [v5]

2023-06-02 Thread Maurizio Cimadamore
> 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 of the changes in this PR are stylistic, I'd like to call out few >

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

2023-06-02 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: 8308645: Javadoc of FFM API needs to be refreshed [v4]

2023-06-02 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 21:02:13 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/MemoryLayout.java line 418: >> >>> 416: * >>> 417: * @param elements the layout path elements. >>> 418: * @return a var handle that accesses a memory segment at the >>> o

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

2023-06-02 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 19:58:49 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/ValueLayout.java li

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

2023-06-02 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 21:09:12 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/java/lang/foreign/Linker.java line 201: >> >>> 199: * >>> 200: * All native linker implementations operate on a subset of memory >>> layouts. More formally, a layout {@code L} >>> 201: * is supported

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

2023-06-02 Thread Adam Sotona
On Thu, 1 Jun 2023 19:23:05 GMT, Adam Sotona wrote: >> src/java.base/share/classes/java/lang/Module.java line 1593: >> >>> 1591: private Class loadModuleInfoClass(InputStream in) throws >>> IOException { >>> 1592: final String MODULE_INFO = "module-info"; >>> 1593: var cc =

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

2023-06-02 Thread Maurizio Cimadamore
On Thu, 1 Jun 2023 13:04:22 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/FunctionDescriptor

RFR: JDK-8309219: Fix xlc17 clang 15 warnings in java.base

2023-06-02 Thread JoKern65
Compiling on AIX with xlc17 which contains the new clang 15 frontend shows the following warnings. built by make/modules/java.base/Lib.gmk src/java.base/unix/native/libnet/DefaultProxySelector.c:378:41:22: error: passing arguments to a function without a prototype is deprecated in all versions

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

2023-06-02 Thread Maurizio Cimadamore
On Fri, 2 Jun 2023 09:58:54 GMT, Maurizio Cimadamore wrote: >>> I think SegmentAllocator should be agnostic re. thread safety. Allocation >>> is a world of compromises, where if you give up (thread) safety you can >>> gain more performance (and viceversa). So I think having a "one size fits >

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

2023-06-02 Thread Maurizio Cimadamore
On Fri, 2 Jun 2023 08:38:36 GMT, Alan Bateman wrote: >> I think SegmentAllocator should be agnostic re. thread safety. Allocation is >> a world of compromises, where if you give up (thread) safety you can gain >> more performance (and viceversa). So I think having a "one size fits all" >> thre

Integrated: 8308090: Add container tests for on-the-fly resource quota updates

2023-06-02 Thread Severin Gehwolf
On Mon, 22 May 2023 16:40:40 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 > for the

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

2023-06-02 Thread Severin Gehwolf
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 >> for

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

2023-06-02 Thread Alan Bateman
On Thu, 1 Jun 2023 21:12:08 GMT, Maurizio Cimadamore wrote: > I think SegmentAllocator should be agnostic re. thread safety. Allocation is > a world of compromises, where if you give up (thread) safety you can gain > more performance (and viceversa). So I think having a "one size fits all" >

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

2023-06-02 Thread Per Minborg
On Fri, 2 Jun 2023 08:08:17 GMT, Per Minborg wrote: >> Right, I guess I'm asking: can/should we do better? ;) It might be nice to >> define the term once and for all for the entire JDK, similar to how >> 'reachability' also has a central definition. (and then add a link from >> here). >> >> B

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

2023-06-02 Thread Per Minborg
On Thu, 1 Jun 2023 21:47:23 GMT, Jorn Vernee wrote: >> I think the term is used pretty much all over the javadoc (not just FFM's) - >> e.g. look for this preamble: >> >> * > href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based, >> * immutable and thread-safe >> ``` > >