Re: RFR: 8339166: java/lang/String/concat/HiddenClassUnloading.java fails on AIX and Linux ppc64le after JDK-8336856

2024-08-29 Thread Matthias Baesken
On Thu, 29 Aug 2024 13:55:25 GMT, Matthias Baesken wrote: > We see HiddenClassUnloading.java failing on the ppc64 based platforms. On AIX > it seems to fail always; Linux ppc64le sometimes. > Failure output : > java.lang.RuntimeException: unloadedClassCount is zero > at HiddenClassUnloading.main

Integrated: 8339154: Cleanups and JUnit conversion of test/jdk/java/util/zip/Available.java

2024-08-29 Thread Eirik Bjørsnøs
On Wed, 28 Aug 2024 11:12:42 GMT, Eirik Bjørsnøs wrote: > Please review this test-only PR which addresses several issues with the > `test/jdk/java/util/zip/Available.java` test: > > * The test is converted to JUnit 5 > * The test now creates its own test vector programmatically instead of > re

Re: RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v2]

2024-08-29 Thread Chen Liang
On Fri, 30 Aug 2024 05:21:46 GMT, Shaojin Wen wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/AbstractPoolEntry.java >> line 441: >> >>> 439: } >>> 440: else { >>> 441: int charLength = stringValue.length(); >> >> In the slo

Re: RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v2]

2024-08-29 Thread Shaojin Wen
On Fri, 30 Aug 2024 04:41:15 GMT, Chen Liang wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add comments > > src/java.base/share/classes/jdk/internal/classfile/impl/AbstractPoolEntry.java > line 441: > >> 439:

Re: RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo [v2]

2024-08-29 Thread Shaojin Wen
> Use fast path for ascii characters 1 to 127 to improve the performance of > writing Utf8Entry to BufferWriter. Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: add comments - Changes: - all: https://git.openjdk.org/jd

Re: RFR: 8328877: [JNI] The JNI Specification needs to address the limitations of integer UTF-8 String lengths [v2]

2024-08-29 Thread David Holmes
On Fri, 30 Aug 2024 05:11:30 GMT, Chris Plummer wrote: >> David Holmes has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Exclude test on 32-bit > > test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java line 27: > >> 25: * @bug

Re: RFR: 8328877: [JNI] The JNI Specification needs to address the limitations of integer UTF-8 String lengths [v2]

2024-08-29 Thread David Holmes
> This is the implementation of a new method added to the JNI specification. > > From the CSR request: > > The `GetStringUTFLength` function returns the length as a `jint` (`jsize`) > value and so is limited to returning at most `Integer.MAX_VALUE`. But a Java > string can itself consist of `In

Re: RFR: 8328877: [JNI] The JNI Specification needs to address the limitations of integer UTF-8 String lengths

2024-08-29 Thread Chris Plummer
On Fri, 30 Aug 2024 02:07:54 GMT, David Holmes wrote: > This is the implementation of a new method added to the JNI specification. > > From the CSR request: > > The `GetStringUTFLength` function returns the length as a `jint` (`jsize`) > value and so is limited to returning at most `Integer.MA

Re: RFR: 8339168: Optimize ClassFile Util slotSize [v2]

2024-08-29 Thread Shaojin Wen
> A small optimization to improve the performance of > jdk.internal.classfile.impl.Util#slotSize/isDoubleSlot Shaojin Wen has updated the pull request incrementally with one additional commit since the last revision: Suggestions from @cl4es - Changes: - all: https://git.openjd

Re: RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Kim Barrett
On Fri, 30 Aug 2024 04:37:55 GMT, Alan Bateman wrote: > I wonder if there should be JBS issues for the specific source files/warnings > so they can be looked at more closely (or maybe you've looked at them all > already). Just wondering about the maintainability of DISABLED_WARNINGS_xxx > valu

Re: RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo

2024-08-29 Thread Chen Liang
On Thu, 29 Aug 2024 14:38:20 GMT, Shaojin Wen wrote: > Use fast path for ascii characters 1 to 127 to improve the performance of > writing Utf8Entry to BufferWriter. src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 394: > 392: void inflateBytesToChars(byte[] src, in

Re: RFR: 8339168: Optimize ClassFile Util slotSize

2024-08-29 Thread Chen Liang
On Wed, 28 Aug 2024 13:12:35 GMT, Shaojin Wen wrote: > A small optimization to improve the performance of > jdk.internal.classfile.impl.Util#slotSize/isDoubleSlot @cl4es Observed that `slotSize` will only get a `CD_void` at method return type; so we can make the non-return-type (so field type

Re: RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Alan Bateman
On Thu, 29 Aug 2024 13:14:35 GMT, Magnus Ihse Bursie wrote: > Currently, we issue -Wno-unused for all files in clang, which is a rather big > sledgehammer to get rid of some warnings that proliferate in a few areas of > the build. > > We should instead leave -Wunused turned on (as done by -Wal

Re: RFR: 8333377: Migrate Generic Signature parsing to ClassFile API [v2]

2024-08-29 Thread Chen Liang
On Thu, 6 Jun 2024 18:48:58 GMT, Chen Liang wrote: >> Core reflection's generic signature parsing uses an ancient library with >> outdated visitor pattern on a tree model and contains unnecessary >> boilerplates. This is a duplication of ClassFile API's signature model. We >> should just move

RFR: 8328877: [JNI] The JNI Specification needs to address the limitations of integer UTF-8 String lengths

2024-08-29 Thread David Holmes
This is the implementation of a new method added to the JNI specification. >From the CSR request: The `GetStringUTFLength` function returns the length as a `jint` (`jsize`) value and so is limited to returning at most `Integer.MAX_VALUE`. But a Java string can itself consist of `Integer.MAX_VAL

Withdrawn: 8333377: Migrate Generic Signature parsing to ClassFile API

2024-08-29 Thread duke
On Fri, 17 May 2024 12:01:23 GMT, Chen Liang wrote: > Core reflection's generic signature parsing uses an ancient library with > outdated visitor pattern on a tree model and contains unnecessary > boilerplates. This is a duplication of ClassFile API's signature model. We > should just move to

Re: RFR: 8339241: Optimize LambdaForm#basicType(Class) [v2]

2024-08-29 Thread Shaojin Wen
> A small optimization to simplify the implementation logic of > LambdaForm$BasicType#basicType method can reduce the call stack and reduce > the overall bytecode size. > > Below is the compiler log > > * baseline > > @ 1 java.lang.invoke.LambdaForm$BasicType::basicType (8 bytes) inline >

RFR: 8339290: Optimize ClassFile Utf8EntryImpl#writeTo

2024-08-29 Thread Shaojin Wen
Use fast path for ascii characters 1 to 127 to improve the performance of writing Utf8Entry to BufferWriter. - Commit messages: - bug fix - optimize Utf8EntryImpl#writeTo Changes: https://git.openjdk.org/jdk/pull/20772/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20772

Re: RFR: 8338017: Add AOT command-line flag aliases [v3]

2024-08-29 Thread David Holmes
On Thu, 29 Aug 2024 22:11:36 GMT, Ioi Lam wrote: >> This is the 1st PR for [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://bugs.openjdk.org/browse/JDK-8315737). >> >> Add the following command-line options as specified in JEP 483: >> >> >> - `-XX:AOTMode=off/record/create/auto/on`

Re: RFR: 8338021: Support saturating vector operators in VectorAPI [v4]

2024-08-29 Thread Sandhya Viswanathan
On Mon, 19 Aug 2024 07:19:30 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> following new vector operators. >> >> >> . SUADD : Saturating unsigned addition. >> . SADD: Saturating signed addition. >>

Re: RFR: 8339115: Rename TypeKind enum constants to follow code style [v4]

2024-08-29 Thread Chen Liang
> `TypeKind` enum constants are named in wrong code style; correct them before > finalization. > > Also improved `TypeKind` specification to talk about not mentioned > `returnType`, `void`, and subword types being erased to int (and how). See > the associated CSR too. > > See the HTML output f

Re: RFR: 8338017: Add AOT command-line flag aliases [v2]

2024-08-29 Thread Ioi Lam
On Thu, 29 Aug 2024 05:10:41 GMT, David Holmes wrote: >> src/java.base/share/native/libjli/java.c line 1521: >> >>> 1519: dumpSharedSpaces = JNI_TRUE; >>> 1520: } >>> 1521: if (JLI_StrCmp(arg, "-XX:AOTMode=create") == 0) { >> >> This is inappropriate - the launcher d

Re: RFR: 8338017: Add AOT command-line flag aliases [v3]

2024-08-29 Thread Ioi Lam
> This is the 1st PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > Add the following command-line options as specified in JEP 483: > > > - `-XX:AOTMode=off/record/create/auto/on` > - `-XX:AOTConfiguration=.aotconfig` > - `-XX:AOTCache=.

Re: RFR: 8338882: Clarify matching order of MessageFormat subformat factory styles [v2]

2024-08-29 Thread Naoto Sato
On Thu, 29 Aug 2024 21:45:32 GMT, Justin Lu wrote: >> Please review this PR which clarifies that the matching order of format >> styles for MessageFormat sub formats is not guaranteed. A corresponding CSR >> has also been drafted. >> >> This is relevant when a locale provides equivalent patter

RFR: 8339131: Remove rarely-used accessor methods from Opcode

2024-08-29 Thread Chen Liang
In offline discussion, we agreed that current fields of `Opcode` violate data oriented design to a large extent. The attributes not generic to all opcode are removed. Up for preliminary review; needs to be reworked for #20737. - Commit messages: - Fix ofArgument in loadConstant pa

Re: RFR: 8338882: Clarify matching order of MessageFormat subformat factory styles [v2]

2024-08-29 Thread Justin Lu
> Please review this PR which clarifies that the matching order of format > styles for MessageFormat sub formats is not guaranteed by the JDK > implementation. A corresponding CSR has also been drafted. > > This is relevant when a locale provides equivalent patterns for multiple > format factor

Re: RFR: 8339214: Remove misleading CodeBuilder.loadConstant(Opcode, ConstantDesc) [v2]

2024-08-29 Thread Chen Liang
> `CodeBuilder::loadConstant(Opcode, ConstantDesc)` is error-prone and > confusing. Users should almost always use `loadConstant(ConstantDesc)` for > optimized instructions, or use specific factories `iconst_0` etc. or `bipush` > with arguments or `LoadConstantInstruction.of` if they want to spe

RFR: 8339260: Move rarely used constants out of ClassFile

2024-08-29 Thread Chen Liang
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 locations, such as getters that return these constants. This simplifi

Re: RFR: 8339217: Optimize ClassFile API loadConstant [v3]

2024-08-29 Thread Chen Liang
On Thu, 29 Aug 2024 21:22:34 GMT, Shaojin Wen wrote: >> This is a large method. By splitting it into multiple methods with the same >> name, the caller can automatically select based on the different types of >> parameters, avoiding this large call that cannot be inlined, which can also >> imp

Re: RFR: 8339217: Optimize ClassFile API loadConstant [v4]

2024-08-29 Thread Shaojin Wen
> This is a large method. By splitting it into multiple methods with the same > name, the caller can automatically select based on the different types of > parameters, avoiding this large call that cannot be inlined, which can also > improve startup performance. > > * current > > CodeBuilder {

Integrated: 8339196: Optimize BufWriterImpl#writeU1/U2/Int/Long

2024-08-29 Thread Shaojin Wen
On Wed, 28 Aug 2024 13:16:03 GMT, Shaojin Wen wrote: > A small optimization makes BufWriterImpl's writeU1/U2/Int/Long methods more > C2-friendly and improves performance. This pull request has now been integrated. Changeset: b711c41d Author:Shaojin Wen Committer: Chen Liang URL: h

Re: RFR: 8339217: Optimize ClassFile API loadConstant [v3]

2024-08-29 Thread Shaojin Wen
> This is a large method. By splitting it into multiple methods with the same > name, the caller can automatically select based on the different types of > parameters, avoiding this large call that cannot be inlined, which can also > improve startup performance. > > * current > > CodeBuilder {

Re: RFR: 8339196: Optimize BufWriterImpl#writeU1/U2/Int/Long

2024-08-29 Thread duke
On Wed, 28 Aug 2024 13:16:03 GMT, Shaojin Wen wrote: > A small optimization makes BufWriterImpl's writeU1/U2/Int/Long methods more > C2-friendly and improves performance. @wenshao Your change (at version cd1140c1782255a5a1fcaaac89a37d21bf32582b) is now ready to be sponsored by a Committer. -

Re: RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Magnus Ihse Bursie
On Thu, 29 Aug 2024 18:44:22 GMT, Kim Barrett wrote: >> Currently, we issue -Wno-unused for all files in clang, which is a rather >> big sledgehammer to get rid of some warnings that proliferate in a few areas >> of the build. >> >> We should instead leave -Wunused turned on (as done by -Wall)

RFR: 8339214: Remove misleading CodeBuilder.loadConstant(Opcode, ConstantDesc)

2024-08-29 Thread Chen Liang
8339214: Remove misleading CodeBuilder.loadConstant(Opcode, ConstantDesc) - Commit messages: - Improve specs for ConstantInstruction.ofArgument - 8339214: Remove misleading CodeBuilder.loadConstant(Opcode, ConstantDesc) Changes: https://git.openjdk.org/jdk/pull/20779/files Webrev

Re: RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Kim Barrett
On Thu, 29 Aug 2024 13:14:35 GMT, Magnus Ihse Bursie wrote: > Currently, we issue -Wno-unused for all files in clang, which is a rather big > sledgehammer to get rid of some warnings that proliferate in a few areas of > the build. > > We should instead leave -Wunused turned on (as done by -Wal

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Coleen Phillimore
On Thu, 29 Aug 2024 18:30:13 GMT, Markus Grönlund wrote: >> I mean its wrong from JFRs perspective not to handle 32-bit outside of the >> call to using_class_space(), because that call will always be false for >> 32-bit, although the Klass* will still fit in 4-bytes. This means trying to >> re

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Markus Grönlund
On Thu, 29 Aug 2024 17:55:53 GMT, Markus Grönlund wrote: >> narrowKlass is the result of encoding Klass* with >> CompressedKlassPointers::encode() which is relative to the compressed base, >> so if UseCompressedClassPointers is false then the encoding to narrowKlass >> from some other (CDS?) b

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Markus Grönlund
On Thu, 29 Aug 2024 17:46:11 GMT, Coleen Phillimore wrote: >> It's fine to have each Klass* report whether it can be compressed. If not, >> it will be represented using the non-compressed version, which will be a bit >> more bloated, but no problems. > > narrowKlass is the result of encoding Kl

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Coleen Phillimore
On Thu, 29 Aug 2024 17:45:17 GMT, Markus Grönlund wrote: >> I now read the JIRA issue. JFR do process loads of >> java/lang/invoke/LambdaForm$MH and derivatives. > > It's fine to have each Klass* report whether it can be compressed. If not, it > will be represented using the non-compressed ver

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Markus Grönlund
On Thu, 29 Aug 2024 17:42:20 GMT, Markus Grönlund wrote: >> Its very rare, if at all, that an abstract or an interface would be tagged >> in JFR. Tags are for concrete implementations, mostly InstanceKlass*. > > I now read the JIRA issue. JFR do process loads of > java/lang/invoke/LambdaForm$M

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Markus Grönlund
On Thu, 29 Aug 2024 17:35:07 GMT, Markus Grönlund wrote: >> In summary, we are agnostic about which space the Klass* is located in; we >> only care if a valid means exists to perform an encode() and decode() >> operation to compress the Klass* (for 64-bit to be clear). This may now >> become a

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Markus Grönlund
On Thu, 29 Aug 2024 17:30:26 GMT, Markus Grönlund wrote: >> // Return TRUE only if UseCompressedClassPointers is True. >> static bool using_class_space() { >> return NOT_LP64(false) LP64_ONLY(UseCompressedClassPointers); >> } >> >> I see now that was wrong for 32-bit. > > In summary,

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Markus Grönlund
On Thu, 29 Aug 2024 17:26:57 GMT, Markus Grönlund wrote: >> The code supports the JfrTraceID load barrier that enqueues tagged Klass*. >> It selects a more compact representation (a single word, instead of two >> words), if a Klass* can be compressed (i.e. there exists a compress class >> sche

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Markus Grönlund
On Thu, 29 Aug 2024 17:24:47 GMT, Markus Grönlund wrote: >> With UseCompressedClassPointers off, I think >> Metaspace::is_in_shared_metaspace() would still return true but I don't >> think he compression base is the bottom of the CDS archive. I asked Markus >> to have a look. > > The code sup

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Markus Grönlund
On Thu, 29 Aug 2024 15:45:17 GMT, Coleen Phillimore wrote: >> If UseCompressedClassPointers is off, we don't have a compressed class >> space. If its on, Klass from CDS and from class space are compressable. With >> your patch, interfaces will live in normal metaspace, not int class space, >>

Re: RFR: 8339154: Cleanups and JUnit conversion of test/jdk/java/util/zip/Available.java [v2]

2024-08-29 Thread Eirik Bjørsnøs
On Thu, 29 Aug 2024 16:50:56 GMT, Eirik Bjørsnøs wrote: >> Please review this test-only PR which addresses several issues with the >> `test/jdk/java/util/zip/Available.java` test: >> >> * The test is converted to JUnit 5 >> * The test now creates its own test vector programmatically instead of

Re: RFR: 8339154: Cleanups and JUnit conversion of test/jdk/java/util/zip/Available.java [v3]

2024-08-29 Thread Lance Andersen
On Thu, 29 Aug 2024 17:07:02 GMT, Eirik Bjørsnøs wrote: >> Please review this test-only PR which addresses several issues with the >> `test/jdk/java/util/zip/Available.java` test: >> >> * The test is converted to JUnit 5 >> * The test now creates its own test vector programmatically instead of

Re: RFR: 8339154: Cleanups and JUnit conversion of test/jdk/java/util/zip/Available.java [v3]

2024-08-29 Thread Eirik Bjørsnøs
> Please review this test-only PR which addresses several issues with the > `test/jdk/java/util/zip/Available.java` test: > > * The test is converted to JUnit 5 > * The test now creates its own test vector programmatically instead of > relying on a binary `input.jar` test vector > * Coverage is

Re: RFR: 8339154: Cleanups and JUnit conversion of test/jdk/java/util/zip/Available.java [v2]

2024-08-29 Thread Lance Andersen
On Thu, 29 Aug 2024 16:50:56 GMT, Eirik Bjørsnøs wrote: >> Please review this test-only PR which addresses several issues with the >> `test/jdk/java/util/zip/Available.java` test: >> >> * The test is converted to JUnit 5 >> * The test now creates its own test vector programmatically instead of

Re: RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Erik Joelsson
On Thu, 29 Aug 2024 13:14:35 GMT, Magnus Ihse Bursie wrote: > Currently, we issue -Wno-unused for all files in clang, which is a rather big > sledgehammer to get rid of some warnings that proliferate in a few areas of > the build. > > We should instead leave -Wunused turned on (as done by -Wal

Re: RFR: 8339154: Cleanups and JUnit conversion of test/jdk/java/util/zip/Available.java [v2]

2024-08-29 Thread Eirik Bjørsnøs
On Thu, 29 Aug 2024 16:21:36 GMT, Lance Andersen wrote: >> Eirik Bjørsnøs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Collapse the ZipFile-related tests into a single, parameterized method > > test/jdk/java/util/zip/Available.java li

Re: RFR: 8339154: Cleanups and JUnit conversion of test/jdk/java/util/zip/Available.java [v2]

2024-08-29 Thread Eirik Bjørsnøs
> Please review this test-only PR which addresses several issues with the > `test/jdk/java/util/zip/Available.java` test: > > * The test is converted to JUnit 5 > * The test now creates its own test vector programmatically instead of > relying on a binary `input.jar` test vector > * Coverage is

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

2024-08-29 Thread Severin Gehwolf
On Wed, 28 Aug 2024 16:13:07 GMT, Severin Gehwolf wrote: >> Please review this PR which adds test support for systemd slices so that >> bugs like [JDK-8217338](https://bugs.openjdk.org/browse/JDK-8217338) can be >> verified. The added test, `SystemdMemoryAwarenessTest` currently passes on >> c

Re: RFR: 8339154: Cleanups and JUnit conversion of test/jdk/java/util/zip/Available.java

2024-08-29 Thread Lance Andersen
On Wed, 28 Aug 2024 11:12:42 GMT, Eirik Bjørsnøs wrote: > Please review this test-only PR which addresses several issues with the > `test/jdk/java/util/zip/Available.java` test: > > * The test is converted to JUnit 5 > * The test now creates its own test vector programmatically instead of > re

Re: RFR: 8339166: java/lang/String/concat/HiddenClassUnloading.java fails on AIX and Linux ppc64le after JDK-8336856

2024-08-29 Thread Claes Redestad
On Thu, 29 Aug 2024 13:55:25 GMT, Matthias Baesken wrote: > We see HiddenClassUnloading.java failing on the ppc64 based platforms. On AIX > it seems to fail always; Linux ppc64le sometimes. > Failure output : > java.lang.RuntimeException: unloadedClassCount is zero > at HiddenClassUnloading.main

Re: RFR: 8339166: java/lang/String/concat/HiddenClassUnloading.java fails on AIX and Linux ppc64le after JDK-8336856

2024-08-29 Thread Chen Liang
On Thu, 29 Aug 2024 13:55:25 GMT, Matthias Baesken wrote: > We see HiddenClassUnloading.java failing on the ppc64 based platforms. On AIX > it seems to fail always; Linux ppc64le sometimes. > Failure output : > java.lang.RuntimeException: unloadedClassCount is zero > at HiddenClassUnloading.main

Re: RFR: 8339166: java/lang/String/concat/HiddenClassUnloading.java fails on AIX and Linux ppc64le after JDK-8336856

2024-08-29 Thread Claes Redestad
On Thu, 29 Aug 2024 13:55:25 GMT, Matthias Baesken wrote: > We see HiddenClassUnloading.java failing on the ppc64 based platforms. On AIX > it seems to fail always; Linux ppc64le sometimes. > Failure output : > java.lang.RuntimeException: unloadedClassCount is zero > at HiddenClassUnloading.main

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

2024-08-29 Thread Severin Gehwolf
On Thu, 29 Aug 2024 15:22:02 GMT, Matthias Baesken wrote: >> Severin Gehwolf 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 10 additional >> co

Integrated: 8339132: Make DirectCodeBuilder write through without allocating instruction objects

2024-08-29 Thread Chen Liang
On Wed, 28 Aug 2024 01:49:21 GMT, Chen Liang wrote: > Make `DirectCodeBuilder` write instructions actually directly without > allocating extra objects. This speed up a lot of simple Class-File building > cases that never go through intermediate transforms. This pull request has now been integr

Re: RFR: 8339132: Make DirectCodeBuilder write through without allocating instruction objects [v3]

2024-08-29 Thread Chen Liang
On Wed, 28 Aug 2024 21:14:50 GMT, Chen Liang wrote: >> Make `DirectCodeBuilder` write instructions actually directly without >> allocating extra objects. This speed up a lot of simple Class-File building >> cases that never go through intermediate transforms. > > Chen Liang has updated the pull

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Coleen Phillimore
On Thu, 29 Aug 2024 13:17:50 GMT, Thomas Stuefe wrote: >> Is this right? If UseCompressedClassPointers is off, then the shared >> metaspace isn't in compressed space? > > If UseCompressedClassPointers is off, we don't have a compressed class space. > If its on, Klass from CDS and from class sp

Re: RFR: 8339217: Optimize ClassFile API loadConstant [v2]

2024-08-29 Thread Chen Liang
On Thu, 29 Aug 2024 15:35:32 GMT, Shaojin Wen wrote: >> This is a large method. By splitting it into multiple methods with the same >> name, the caller can automatically select based on the different types of >> parameters, avoiding this large call that cannot be inlined, which can also >> imp

Re: RFR: 8339217: Optimize ClassFile API loadConstant [v2]

2024-08-29 Thread Shaojin Wen
> This is a large method. By splitting it into multiple methods with the same > name, the caller can automatically select based on the different types of > parameters, avoiding this large call that cannot be inlined, which can also > improve startup performance. > > * current > > CodeBuilder {

Withdrawn: 8322256: Define and document GZIPInputStream concatenated stream semantics

2024-08-29 Thread Archie Cobbs
On Tue, 19 Mar 2024 21:48:14 GMT, Archie Cobbs wrote: > `GZIPInputStream` supports reading data from multiple concatenated GZIP data > streams since [JDK-4691425](https://bugs.openjdk.org/browse/JDK-4691425). In > order to do this, after a GZIP trailer frame is read, it attempts to read a > GZ

Re: RFR: 8322256: Define and document GZIPInputStream concatenated stream semantics [v10]

2024-08-29 Thread Archie Cobbs
On Wed, 28 Aug 2024 21:56:50 GMT, Archie Cobbs wrote: >> `GZIPInputStream` supports reading data from multiple concatenated GZIP data >> streams since [JDK-4691425](https://bugs.openjdk.org/browse/JDK-4691425). In >> order to do this, after a GZIP trailer frame is read, it attempts to read a >

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

2024-08-29 Thread Matthias Baesken
On Wed, 28 Aug 2024 16:13:07 GMT, Severin Gehwolf wrote: >> Please review this PR which adds test support for systemd slices so that >> bugs like [JDK-8217338](https://bugs.openjdk.org/browse/JDK-8217338) can be >> verified. The added test, `SystemdMemoryAwarenessTest` currently passes on >> c

Re: RFR: 8322256: Define and document GZIPInputStream concatenated stream semantics [v10]

2024-08-29 Thread Eirik Bjørsnøs
On Wed, 28 Aug 2024 21:56:50 GMT, Archie Cobbs wrote: >> `GZIPInputStream` supports reading data from multiple concatenated GZIP data >> streams since [JDK-4691425](https://bugs.openjdk.org/browse/JDK-4691425). In >> order to do this, after a GZIP trailer frame is read, it attempts to read a >

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-29 Thread Jiangli Zhou
On Thu, 29 Aug 2024 08:26:16 GMT, Magnus Ihse Bursie wrote: > Okay. Unless I misunderstand something, there were no additional authors to > be credited for these two commits. That's correct for these. - PR Comment: https://git.openjdk.org/jdk/pull/20666#issuecomment-2317982354

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

2024-08-29 Thread David M . Lloyd
On Mon, 12 Aug 2024 18:18:04 GMT, Roger Riggs wrote: > The tests should include serializing some sample JDK classes that include a > hierarchy of 2-4 levels. It would help fles any interactions in the > sequencing of calling the default serialization for each of a concrete > class's supertypes

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

2024-08-29 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

RFR: 8339156: Use more fine-granular clang unused warnings

2024-08-29 Thread Magnus Ihse Bursie
Currently, we issue -Wno-unused for all files in clang, which is a rather big sledgehammer to get rid of some warnings that proliferate in a few areas of the build. We should instead leave -Wunused turned on (as done by -Wall) and use a much more fine-grained approach to disabling specific warn

RFR: 8339166: java/lang/String/concat/HiddenClassUnloading.java fails on AIX and Linux ppc64le after JDK-8336856

2024-08-29 Thread Matthias Baesken
We see HiddenClassUnloading.java failing on the ppc64 based platforms. On AIX it seems to fail always; Linux ppc64le sometimes. Failure output : java.lang.RuntimeException: unloadedClassCount is zero at HiddenClassUnloading.main(HiddenClassUnloading.java:66) at java.base/jdk.internal.reflect.Dire

Re: RFR: 8322256: Define and document GZIPInputStream concatenated stream semantics [v10]

2024-08-29 Thread Eirik Bjørsnøs
On Wed, 28 Aug 2024 21:56:50 GMT, Archie Cobbs wrote: >> `GZIPInputStream` supports reading data from multiple concatenated GZIP data >> streams since [JDK-4691425](https://bugs.openjdk.org/browse/JDK-4691425). In >> order to do this, after a GZIP trailer frame is read, it attempts to read a >

Re: RFR: 8339115: Rename TypeKind enum constants to follow code style [v3]

2024-08-29 Thread Adam Sotona
On Wed, 28 Aug 2024 21:24:34 GMT, Chen Liang wrote: >> `TypeKind` enum constants are named in wrong code style; correct them before >> finalization. >> >> Also improved `TypeKind` specification to talk about not mentioned >> `returnType`, `void`, and subword types being erased to int (and how)

Re: RFR: 8339241: Optimize LambdaForm#basicType(Class)

2024-08-29 Thread Claes Redestad
On Thu, 29 Aug 2024 01:30:55 GMT, Shaojin Wen wrote: > A small optimization to simplify the implementation logic of > LambdaForm$BasicType#basicType method can reduce the call stack and reduce > the overall bytecode size. > > Below is the compiler log > > * baseline > > @ 1 java.lang.invo

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Thomas Stuefe
On Thu, 29 Aug 2024 11:37:19 GMT, Coleen Phillimore wrote: >> src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp >> line 79: >> >>> 77: >>> 78: static bool can_compress_element(const Klass* klass) { >>> 79: return Metaspace::is_in_class_space(klass) && >> >> Su

Re: RFR: 8339196: Optimize BufWriterImpl#writeU1/U2/Int/Long

2024-08-29 Thread Claes Redestad
On Wed, 28 Aug 2024 13:16:03 GMT, Shaojin Wen wrote: > A small optimization makes BufWriterImpl's writeU1/U2/Int/Long methods more > C2-friendly and improves performance. Ok, I did some adhoc testing to convince me that these are equivalent for these cases. Masking in line with intended semant

Re: RFR: 8322256: Define and document GZIPInputStream concatenated stream semantics [v10]

2024-08-29 Thread Eirik Bjørsnøs
On Wed, 28 Aug 2024 21:56:50 GMT, Archie Cobbs wrote: >> `GZIPInputStream` supports reading data from multiple concatenated GZIP data >> streams since [JDK-4691425](https://bugs.openjdk.org/browse/JDK-4691425). In >> order to do this, after a GZIP trailer frame is read, it attempts to read a >

Re: RFR: 8339217: Optimize ClassFile API loadConstant

2024-08-29 Thread Chen Liang
On Thu, 29 Aug 2024 05:01:52 GMT, Shaojin Wen wrote: > This is a large method. By splitting it into multiple methods with the same > name, the caller can automatically select based on the different types of > parameters, avoiding this large call that cannot be inlined, which can also > improve

Re: RFR: 8339196: Optimize BufWriterImpl#writeU1/U2/Int/Long

2024-08-29 Thread Shaojin Wen
On Wed, 28 Aug 2024 13:16:03 GMT, Shaojin Wen wrote: > A small optimization makes BufWriterImpl's writeU1/U2/Int/Long methods more > C2-friendly and improves performance. The general way of writing should be like this: elems[offset++] = (byte) (intValue >>> 8 * (intSize - i - 1)); ``` * now

Re: RFR: 8339196: Optimize BufWriterImpl#writeU1/U2/Int/Long

2024-08-29 Thread Chen Liang
On Wed, 28 Aug 2024 18:38:40 GMT, Claes Redestad wrote: >> A small optimization makes BufWriterImpl's writeU1/U2/Int/Long methods more >> C2-friendly and improves performance. > > I made an off-list suggestion along this line some time before integration. > IIRC it was a decent win back then, a

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v5]

2024-08-29 Thread Coleen Phillimore
> This change stores InstanceKlass for interface and abstract classes in the > non-class metaspace, since class metaspace will have limits on number of > classes that can be represented when Lilliput changes go in. Classes that > have no instances created for them don't require compressed class

Re: RFR: 8339241: Optimize LambdaForm#basicType(Class)

2024-08-29 Thread Chen Liang
On Thu, 29 Aug 2024 01:30:55 GMT, Shaojin Wen wrote: > A small optimization to simplify the implementation logic of > LambdaForm$BasicType#basicType method can reduce the call stack and reduce > the overall bytecode size. > > Below is the compiler log > > * baseline > > @ 1 java.lang.invo

RFR: 8339241: Optimize LambdaForm#basicType(Class)

2024-08-29 Thread Shaojin Wen
A small optimization to simplify the implementation logic of LambdaForm$BasicType#basicType method can reduce the call stack and reduce the overall bytecode size. Below is the compiler log * baseline @ 1 java.lang.invoke.LambdaForm$BasicType::basicType (8 bytes) inline @ 1 sun.invoke

Re: RFR: 8339168: Optimize ClassFile Util slotSize

2024-08-29 Thread duke
On Wed, 28 Aug 2024 13:12:35 GMT, Shaojin Wen wrote: > A small optimization to improve the performance of > jdk.internal.classfile.impl.Util#slotSize/isDoubleSlot @wenshao Your change (at version 3c58fab74c9f78b7f3008c4f6fa32a7aab79f053) is now ready to be sponsored by a Committer. -

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v4]

2024-08-29 Thread Coleen Phillimore
On Thu, 29 Aug 2024 05:24:18 GMT, Thomas Stuefe wrote: >> Coleen Phillimore has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Merge branch 'anon' of github.com:coleenp/jdk into anon >> - Fix copyright > > src/hotspot/share/jfr/recorder/

Re: RFR: 8339115: Rename TypeKind enum constants to follow code style [v3]

2024-08-29 Thread Chen Liang
On Thu, 29 Aug 2024 07:07:13 GMT, Adam Sotona wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> space > > src/java.base/share/classes/java/lang/classfile/CodeBuilder.java line 564: > >> 562: case INT -

Re: RFR: 8322256: Define and document GZIPInputStream concatenated stream semantics [v9]

2024-08-29 Thread Eirik Bjørsnøs
On Wed, 28 Aug 2024 19:56:04 GMT, Lance Andersen wrote: >> Sounds good. How would you like to do that? >> >> E.g. we could just remove the words "In particular, some GZIP compression >> tools function by partitioning the input, compressing each partition >> separately, and then concatenating t

Re: RFR: 8339196: Optimize BufWriterImpl#writeU1/U2/Int/Long

2024-08-29 Thread Claes Redestad
On Wed, 28 Aug 2024 13:16:03 GMT, Shaojin Wen wrote: > A small optimization makes BufWriterImpl's writeU1/U2/Int/Long methods more > C2-friendly and improves performance. Needs to mask with `& 0xFF` in these places, otherwise you're changing semantics. - Changes requested by rede

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-08-29 Thread Magnus Ihse Bursie
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: RFR: 6426678: (spec) File.createTempFile(prefix, suffix, dir) needs clarification for illegal symbols in suffix [v2]

2024-08-29 Thread Alan Bateman
On Fri, 2 Aug 2024 16:26:06 GMT, Brian Burkhalter wrote: >> Add some verbiage indicating that an `IOException` will be thrown if a file >> with a name generated from the supplied prefix and suffix according to the >> described algorithm cannot be generated by the underlying system, whether >>

Integrated: 8339120: Use more fine-granular gcc unused warnings

2024-08-29 Thread Magnus Ihse Bursie
On Tue, 27 Aug 2024 20:04:21 GMT, Magnus Ihse Bursie wrote: > Currently, we issue -Wno-unused for all files in gcc, which is a rather big > sledgehammer to get rid of some warnings that proliferate in a few areas of > the build. > > We should instead leave -Wunused turned on (as done by -Wall)

Re: RFR: 8339132: Make DirectCodeBuilder write through without allocating instruction objects [v3]

2024-08-29 Thread Adam Sotona
On Wed, 28 Aug 2024 21:14:50 GMT, Chen Liang wrote: >> Make `DirectCodeBuilder` write instructions actually directly without >> allocating extra objects. This speed up a lot of simple Class-File building >> cases that never go through intermediate transforms. > > Chen Liang has updated the pull

Re: RFR: 8339115: Rename TypeKind enum constants to follow code style [v3]

2024-08-29 Thread Adam Sotona
On Wed, 28 Aug 2024 21:24:34 GMT, Chen Liang wrote: >> `TypeKind` enum constants are named in wrong code style; correct them before >> finalization. >> >> Also improved `TypeKind` specification to talk about not mentioned >> `returnType`, `void`, and subword types being erased to int (and how)