Re: RFR: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock [v2]

2024-01-08 Thread Serguei Spitsyn
On Mon, 8 Jan 2024 09:04:57 GMT, Alan Bateman wrote: >> In preparation for when virtual threads can unmount while holding a monitor >> or unmount when blocking on monitorenter, the implementation of >> VirtualThread's interrupt method is refactored to avoid parking/blocking >> while holding

Re: RFR: 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target. [v3]

2024-01-08 Thread Jatin Bhateja
On Mon, 8 Jan 2024 10:20:33 GMT, Quan Anh Mai wrote: >>> Thanks for the updates! >>> >>> One more idea: Your AVX2 solution has a lot of cost for converting the mask >>> to a permutation. Might it make sense to split this off into a separate >>> vector-node, so that it can float out of a loop

Re: RFR: 8321616: Retire binary test vectors in test/jdk/java/util/zip/ZipFile [v7]

2024-01-08 Thread Eirik Bjørsnøs
On Fri, 15 Dec 2023 11:15:30 GMT, Lance Andersen wrote: >> Seeing that `ReadAfterClose.java` uses a binary test vector `crash.jar`, I >> think it makes sense to include it in this PR, convert it to JUnit and move >> it into `ReadZip.readAfterClose`. >> >> This removes the last remaining

Re: RFR: 8321616: Retire binary test vectors in test/jdk/java/util/zip/ZipFile [v10]

2024-01-08 Thread Eirik Bjørsnøs
> This PR suggests we retire the binary test vectors `ZipFile/input.zip`, > `ZipFile/input.jar` and `ZipFile/crash.jar` > > Binary test vectors are harder to analyze, and sharing test vectors across > unrelated tests increases maintenance burden. It would be better to have each > test produce

Re: RFR: 8321616: Retire binary test vectors in test/jdk/java/util/zip/ZipFile [v7]

2024-01-08 Thread Eirik Bjørsnøs
On Mon, 18 Dec 2023 19:38:55 GMT, Lance Andersen wrote: >> Eirik Bjørsnøs has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Merge the ReadAfterClose test into ReadZip, converting it to JUnit. > >

Re: RFR: 8321616: Retire binary test vectors in test/jdk/java/util/zip/ZipFile [v9]

2024-01-08 Thread Eirik Bjørsnøs
On Mon, 8 Jan 2024 17:30:51 GMT, Lance Andersen wrote: > Changes look fine. Probably need to change the copyright from 2023 -> 2024 No IP was produced in 2024 for most of these files, but I've updated them anyhow. - PR Comment:

Integrated: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock

2024-01-08 Thread Alan Bateman
On Tue, 2 Jan 2024 10:21:11 GMT, Alan Bateman wrote: > In preparation for when virtual threads can unmount while holding a monitor > or unmount when blocking on monitorenter, the implementation of > VirtualThread's interrupt method is refactored to avoid parking/blocking > while holding the

Re: RFR: JDK-8322878: Including sealing information Class.toGenericString() [v3]

2024-01-08 Thread Joe Darcy
> As recently discussed on core libs, sealed-ness information could be included > in the Class.toGenericString() output, analagous to how "modifiers" that also > correspond to JVM access flags are handled. > > This is the initial spec, implementation, and test updated needed for that > change.

Re: RFR: 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target. [v2]

2024-01-08 Thread Jatin Bhateja
On Mon, 8 Jan 2024 07:55:00 GMT, Emanuel Peter wrote: >>> You are using `VectorMask pred = VectorMask.fromLong(ispecies, >>> maskctr++);`. That basically systematically iterates over all masks, which >>> is nice for a correctness test. But that would use different density inside >>> one test

Re: RFR: JDK-8322878: Including sealing information Class.toGenericString() [v4]

2024-01-08 Thread Joe Darcy
> As recently discussed on core libs, sealed-ness information could be included > in the Class.toGenericString() output, analagous to how "modifiers" that also > correspond to JVM access flags are handled. > > This is the initial spec, implementation, and test updated needed for that > change.

Integrated: 8310995: missing @since tags in 36 jdk.dynalink classes

2024-01-08 Thread Athijegannathan Sundararajan
On Mon, 8 Jan 2024 13:24:55 GMT, Athijegannathan Sundararajan wrote: > Adding missing "@ since 9" in javadoc comment of the public classes, > interfaces and packages of the jdk.dynalink module. This pull request has now been integrated. Changeset: 176606d0 Author:Athijegannathan

Re: RFR: 8309218: java/util/concurrent/locks/Lock/OOMEInAQS.java still times out with ZGC, Generational ZGC, and SerialGC

2024-01-08 Thread Jaikiran Pai
On Mon, 8 Jan 2024 21:13:25 GMT, Viktor Klang wrote: > As per conversation in the issue. Hello Viktor, the skara bot very helpfully has noted that this test has been problemlisted in a couple of files: > 8309218 is used in problem lists: [test/jdk/ProblemList-zgc.txt, >

Integrated: 8318971 : Better Error Handling for Jar Tool When Processing Non-existent Files

2024-01-08 Thread Weibing Xiao
On Wed, 13 Dec 2023 18:16:56 GMT, Weibing Xiao wrote: > Better Error Handling for Jar Tool Processing of "@File" > > This is a new PR for this PR since the original developer left the team. See > all of the review history at https://github.com/openjdk/jdk/pull/16423. > > Thank you. This

RFR: 8322809: SystemModulesMap::classNames and moduleNames arrays do not match the order

2024-01-08 Thread Mandy Chung
One optimization of Jlink SystemModulesPlugin pre-resolves the module graph for modules with a main class. It stores the name of the initial module and the generated `SystemModules` class name in two arrays that can be obtained from `SystemModulesMap::moduleNames` and

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v11]

2024-01-08 Thread Laurent Bourgès
On Sun, 22 Oct 2023 17:26:52 GMT, Laurent Bourgès wrote: >> * improved mixed insertion sort (makes whole sorting faster) >> * introduced Radix which sort shows several times boost of performance and >> has linear complexity instead of n*ln(n) >> * improved merging sort for almost sorted data

Re: RFR: JDK-8322878: Including sealing information Class.toGenericString() [v2]

2024-01-08 Thread Joe Darcy
> As recently discussed on core libs, sealed-ness information could be included > in the Class.toGenericString() output, analagous to how "modifiers" that also > correspond to JVM access flags are handled. > > This is the initial spec, implementation, and test updated needed for that > change.

Re: RFR: JDK-8322878: Including sealing information Class.toGenericString() [v2]

2024-01-08 Thread Joe Darcy
On Wed, 3 Jan 2024 19:44:51 GMT, Pavel Rappo wrote: >> I think the best place, or least-bad place, to discuss the "modifier" >> ordering of sealed/non-sealed would be an informative note on >> Modifier.toString(int) -- "The sealed/non-sealed Java language modifiers are >> not represented in

Re: RFR: 8310995: missing @since tags in 36 jdk.dynalink classes

2024-01-08 Thread Attila Szegedi
On Mon, 8 Jan 2024 13:24:55 GMT, Athijegannathan Sundararajan wrote: > Adding missing "@ since 9" in javadoc comment of the public classes, > interfaces and packages of the jdk.dynalink module. Marked as reviewed by attila (Reviewer). - PR Review:

RFR: 8309218: java/util/concurrent/locks/Lock/OOMEInAQS.java still times out with ZGC, Generational ZGC, and SerialGC

2024-01-08 Thread Viktor Klang
As per conversation in the issue. - Commit messages: - Updating copyright year for OOMEInAQS.java - Addresses JBS issue 8309218 but pinning OOMEInAQS to always run on G1 Changes: https://git.openjdk.org/jdk/pull/17313/files Webrev: https://webrevs.openjdk.org/?repo=jdk=17313=00

Re: RFR: JDK-8320448 Accelerate IndexOf using AVX2 [v6]

2024-01-08 Thread Scott Gibbons
> Re-write the IndexOf code without the use of the pcmpestri instruction, only > using AVX2 instructions. This change accelerates String.IndexOf on average > 1.3x for AVX2. The benchmark numbers: > > > BenchmarkScore > Latest

Re: The default java.library.path on Linux does not include the library paths in the mulitarch-spec

2024-01-08 Thread Florian Weimer
* Glavo: > I wish OpenJDK would parse the /etc/ld.so.conf to get the full library > path list so it would be consistent with the behavior of ld. Can > anyone consider this suggestion? Parsing /etc/ld.so.conf is the wrong approach. Even glibc itself does not look at that file at run time, it's

Re: RFR: 8322149: ConcurrentHashMap copy constructor should not transfer from old table on presizing [v2]

2024-01-08 Thread Joshua Cao
On Mon, 8 Jan 2024 15:59:17 GMT, Volker Simonis wrote: > Shouldn't this be something like tryPresize(this.size() + m.size()) to > accommodate for the worst case where there are no common keys in this map and > m? Its a good callout. Not sure if it is a miss, or intentionally conservative. >

Re: RFR: 8275338: Add JFR events for notable serialization situations [v12]

2024-01-08 Thread Roger Riggs
On Mon, 8 Jan 2024 13:48:06 GMT, Raffaello Giulietti wrote: >> Adds serialization misdeclaration events to JFR. > > Raffaello Giulietti 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

Re: RFR: 8321620: Optimize JImage decompressors

2024-01-08 Thread Glavo
On Wed, 8 Nov 2023 11:55:22 GMT, Glavo wrote: > This PR significantly speeds up decompressing resources in Jimage while > significantly reducing temporary memory allocations in the process. > > This will improve startup speed for runtime images generated using `jlink > --compress 1` and

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v9]

2024-01-08 Thread Joe Darcy
On Fri, 22 Dec 2023 07:55:24 GMT, Eirik Bjørsnøs wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data

Re: RFR: JDK-8323186: A faster algorithm for MutablebigInteger.divWord(long, int)

2024-01-08 Thread Brian Burkhalter
On Sat, 6 Jan 2024 18:01:01 GMT, fabioromano1 wrote: > The method `MutableBigInteger.divWord(long, int)` can use the algorithm of > Hacker's Delight (2nd ed), section 9.3, the same used in > `Long.divideUnsigned(long, long)` and `Long.remainderUnsigned(long, long)`, > to get the computation

Re: RFR: 8322565 (zipfs) Files.setPosixPermissions should preserve 'external file attributes' bits

2024-01-08 Thread Lance Andersen
On Wed, 20 Dec 2023 18:51:08 GMT, Eirik Bjørsnøs wrote: > This PR suggests that `Files.setPosixPermissions`as implemented by > `ZipFileSystem` should preserve the leading seven bits of the 'external file > attributes' field. These bits contain the 'file type', 'setuid', 'setgid', > and

Re: RFR: 8321616: Retire binary test vectors in test/jdk/java/util/zip/ZipFile [v9]

2024-01-08 Thread Lance Andersen
On Tue, 2 Jan 2024 13:31:01 GMT, Eirik Bjørsnøs wrote: >> This PR suggests we retire the binary test vectors `ZipFile/input.zip`, >> `ZipFile/input.jar` and `ZipFile/crash.jar` >> >> Binary test vectors are harder to analyze, and sharing test vectors across >> unrelated tests increases

Re: RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate

2024-01-08 Thread Maurizio Cimadamore
On Mon, 8 Jan 2024 16:16:50 GMT, Per Minborg wrote: > This PR proposes to add a clarification that an `Arena` always returns > zeroed-out segments for `Arena::allocate` methods. > > Note that other overloaded methods refer to the abstract `Arena::allocate` > method via implementation notes.

Re: RFR: 8321616: Retire binary test vectors in test/jdk/java/util/zip/ZipFile [v7]

2024-01-08 Thread Lance Andersen
On Thu, 14 Dec 2023 14:55:08 GMT, Eirik Bjørsnøs wrote: >> This PR suggests we retire the binary test vectors `ZipFile/input.zip`, >> `ZipFile/input.jar` and `ZipFile/crash.jar` >> >> Binary test vectors are harder to analyze, and sharing test vectors across >> unrelated tests increases

Re: RFR: 8310995: missing @since tags in 36 jdk.dynalink classes

2024-01-08 Thread Iris Clark
On Mon, 8 Jan 2024 13:24:55 GMT, Athijegannathan Sundararajan wrote: > Adding missing "@ since 9" in javadoc comment of the public classes, > interfaces and packages of the jdk.dynalink module. Marked as reviewed by iris (Reviewer). - PR Review:

Re: RFR: 8323183: ClassFile API performance improvements [v4]

2024-01-08 Thread Chen Liang
On Mon, 8 Jan 2024 16:17:47 GMT, Adam Sotona wrote: >> ClassFile API performance related improvements have been separated from >> #17121 into this PR. >> >> These improvements are important to minimize performance regression of >> 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to

Re: RFR: 8323183: ClassFile API performance improvements

2024-01-08 Thread Adam Sotona
On Mon, 8 Jan 2024 14:43:58 GMT, Chen Liang wrote: > You need to update the slot counting from `DirectCodeBuilder` and > `StackMapDecoder` to fully avoid creating any MethodTypeDesc. It would be good to avoid all bottlenecks, however not all of them have equal effect. This patch avoids MTD

RFR: 8323159: Consider adding some text re. memory zeroing in Arena::allocate

2024-01-08 Thread Per Minborg
This PR proposes to add a clarification that an `Arena` always returns zeroed-out segments for `Arena::allocate` methods. Note that other overloaded methods refer to the abstract `Arena::allocate` method via implementation notes. - Commit messages: - Add in @implSpec that

Re: RFR: 8323183: ClassFile API performance improvements [v4]

2024-01-08 Thread Adam Sotona
On Mon, 8 Jan 2024 14:19:12 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> applied suggested changes > > src/java.base/share/classes/jdk/internal/classfile/impl/StackCounter.java > line

Re: RFR: 8323183: ClassFile API performance improvements [v4]

2024-01-08 Thread Adam Sotona
> ClassFile API performance related improvements have been separated from > #17121 into this PR. > > These improvements are important to minimize performance regression of > 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the > Classfile API to generate proxy classes #17121 >

Re: RFR: 8323183: ClassFile API performance improvements [v2]

2024-01-08 Thread Adam Sotona
> ClassFile API performance related improvements have been separated from > #17121 into this PR. > > These improvements are important to minimize performance regression of > 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the > Classfile API to generate proxy classes #17121 >

Re: RFR: 8323183: ClassFile API performance improvements [v3]

2024-01-08 Thread Adam Sotona
On Mon, 8 Jan 2024 14:20:17 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> applied suggested changes > > src/java.base/share/classes/jdk/internal/classfile/impl/StackCounter.java > line

Re: RFR: 8323183: ClassFile API performance improvements [v3]

2024-01-08 Thread Adam Sotona
> ClassFile API performance related improvements have been separated from > #17121 into this PR. > > These improvements are important to minimize performance regression of > 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the > Classfile API to generate proxy classes #17121 >

Re: RFR: 8322149: ConcurrentHashMap copy constructor should not transfer from old table on presizing [v2]

2024-01-08 Thread Volker Simonis
On Wed, 3 Jan 2024 21:29:57 GMT, Joshua Cao wrote: >> ConcurrentHashMap's copy constructor calls `putAll()` -> `tryPresize()` -> >> `transfer()`. When coming from the copy constructor, the Map is empty, so >> there is nothing to transfer. But `transfer()` will still copy all the empty >>

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v9]

2024-01-08 Thread Jaikiran Pai
On Mon, 8 Jan 2024 14:47:48 GMT, Jaikiran Pai wrote: > With the current proposed change, we not only rely on the Inflater for this > decision but also rely on ZipEntry itself to tell us whether to read 8 bytes > or 4 bytes each. The proposed change resides solely in one single

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v7]

2024-01-08 Thread Adam Sotona
On Sun, 7 Jan 2024 18:24:02 GMT, Chen Liang wrote: > Also `StackMapDecoder::initFrameFromLocals(ClassEntry, ...)` can benefit from > 2 changes: > > 1. Iterate MTD by index instead of creating copies I'll add this fix to the performance improvements PR, thanks! > 2. Pass ClassEntry from

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v3]

2024-01-08 Thread Adam Sotona
On Fri, 5 Jan 2024 23:55:53 GMT, Mandy Chung wrote: > > Profiling of the benchmarks revealed several slowdowns: > > ``` > > * many expensive conversions from `Class` to `ClassDesc` to > > `ClassEntry`, or even more expensive `MethodTypeDesc` > > > > * building proxy class from scratch from

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v7]

2024-01-08 Thread Adam Sotona
On Fri, 5 Jan 2024 21:03:28 GMT, Mandy Chung wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> StackCounter fix > > src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 148: > >> 146:

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v10]

2024-01-08 Thread Adam Sotona
> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes. > > This patch converts it to use Classfile API. > > It is continuation of https://github.com/openjdk/jdk/pull/10991 > > Any comments and suggestions are welcome. > > Please review. > > Thank you, > Adam Adam

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v9]

2024-01-08 Thread Jaikiran Pai
On Fri, 22 Dec 2023 07:55:24 GMT, Eirik Bjørsnøs wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v9]

2024-01-08 Thread Jaikiran Pai
On Fri, 22 Dec 2023 07:55:24 GMT, Eirik Bjørsnøs wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data

RFR: JDK-8323186: A faster algorithm for MutablebigInteger.divWord(long, int)

2024-01-08 Thread fabioromano1
The method `MutableBigInteger.divWord(long, int)` can use the algorithm of Hacker's Delight (2nd ed), section 9.3, the same used in `Long.divideUnsigned(long, long)` and `Long.remainderUnsigned(long, long)`, to get the computation faster. - Commit messages: - Merge branch

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v9]

2024-01-08 Thread Jaikiran Pai
On Fri, 22 Dec 2023 07:55:24 GMT, Eirik Bjørsnøs wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v9]

2024-01-08 Thread Jaikiran Pai
On Fri, 22 Dec 2023 07:55:24 GMT, Eirik Bjørsnøs wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v9]

2024-01-08 Thread Jaikiran Pai
On Fri, 22 Dec 2023 07:55:24 GMT, Eirik Bjørsnøs wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data

Re: RFR: 8323183: ClassFile API performance improvements

2024-01-08 Thread Chen Liang
On Mon, 8 Jan 2024 13:38:16 GMT, Adam Sotona wrote: > ClassFile API performance related improvements have been separated from > #17121 into this PR. > > These improvements are important to minimize performance regression of > 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v9]

2024-01-08 Thread Adam Sotona
> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes. > > This patch converts it to use Classfile API. > > It is continuation of https://github.com/openjdk/jdk/pull/10991 > > Any comments and suggestions are welcome. > > Please review. > > Thank you, > Adam Adam

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v7]

2024-01-08 Thread Adam Sotona
On Fri, 5 Jan 2024 21:23:02 GMT, Mandy Chung wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> StackCounter fix > > src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 739: > >> 737:

Re: RFR: 8323183: ClassFile API performance improvements

2024-01-08 Thread Maurizio Cimadamore
On Mon, 8 Jan 2024 13:38:16 GMT, Adam Sotona wrote: > ClassFile API performance related improvements have been separated from > #17121 into this PR. > > These improvements are important to minimize performance regression of > 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use

Re: RFR: 8323183: ClassFile API performance improvements

2024-01-08 Thread Maurizio Cimadamore
On Mon, 8 Jan 2024 13:38:16 GMT, Adam Sotona wrote: > ClassFile API performance related improvements have been separated from > #17121 into this PR. > > These improvements are important to minimize performance regression of > 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v7]

2024-01-08 Thread Adam Sotona
On Fri, 5 Jan 2024 20:50:16 GMT, Mandy Chung wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> StackCounter fix > > src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 135: > >> 133: var

Re: RFR: 8323183: ClassFile API performance improvements

2024-01-08 Thread Maurizio Cimadamore
On Mon, 8 Jan 2024 14:14:29 GMT, Maurizio Cimadamore wrote: >> ClassFile API performance related improvements have been separated from >> #17121 into this PR. >> >> These improvements are important to minimize performance regression of >> 8294961: Convert

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v7]

2024-01-08 Thread Adam Sotona
On Fri, 5 Jan 2024 20:45:22 GMT, Mandy Chung wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> StackCounter fix > > src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 112: > >> 110: private

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v5]

2024-01-08 Thread Adam Sotona
On Sun, 7 Jan 2024 18:16:05 GMT, Chen Liang wrote: >> Original code has been significant in profiler. >> >> >> MethodTypeDesc desc = MethodTypeDesc.of(toClassDesc(returnType), >> >> Arrays.stream(parameterTypes).map(ProxyGenerator::toClassDesc).toArray(ClassDesc[]::new));

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v7]

2024-01-08 Thread Adam Sotona
On Fri, 5 Jan 2024 20:43:00 GMT, Mandy Chung wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> StackCounter fix > > src/java.base/share/classes/java/lang/reflect/ProxyGenerator.java line 28: > >> 26: package

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v8]

2024-01-08 Thread Adam Sotona
> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy classes. > > This patch converts it to use Classfile API. > > It is continuation of https://github.com/openjdk/jdk/pull/10991 > > Any comments and suggestions are welcome. > > Please review. > > Thank you, > Adam Adam

RFR: 8323183: ClassFile API performance improvements

2024-01-08 Thread Adam Sotona
ClassFile API performance related improvements have been separated from #17121 into this PR. These improvements are important to minimize performance regression of 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes #17121 Please

Re: RFR: 8275338: Add JFR events for notable serialization situations [v12]

2024-01-08 Thread Raffaello Giulietti
> Adds serialization misdeclaration events to JFR. Raffaello Giulietti 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 15 additional commits since the

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v7]

2024-01-08 Thread Adam Sotona
On Wed, 3 Jan 2024 12:36:26 GMT, Adam Sotona wrote: >> java.base java.lang.reflect.ProxyGenerator uses ASM to generate proxy >> classes. >> >> This patch converts it to use Classfile API. >> >> It is continuation of https://github.com/openjdk/jdk/pull/10991 >> >> Any comments and suggestions

RFR: 8310995: missing @since tags in 36 jdk.dynalink classes

2024-01-08 Thread Athijegannathan Sundararajan
Adding missing "@ since 9" in javadoc comment of the public classes, interfaces and packages of the jdk.dynalink module. - Commit messages: - 8310995: missing @since tags in 36 jdk.dynalink classes Changes: https://git.openjdk.org/jdk/pull/17305/files Webrev:

Re: RFR: 8310995: missing @since tags in 36 jdk.dynalink classes

2024-01-08 Thread Jim Laskey
On Mon, 8 Jan 2024 13:24:55 GMT, Athijegannathan Sundararajan wrote: > Adding missing "@ since 9" in javadoc comment of the public classes, > interfaces and packages of the jdk.dynalink module. LGTM - Marked as reviewed by jlaskey (Reviewer). PR Review:

Re: RFR: 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to use the Classfile API to generate proxy classes [v7]

2024-01-08 Thread Adam Sotona
On Sun, 7 Jan 2024 18:18:32 GMT, Chen Liang wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> StackCounter fix > > src/java.base/share/classes/jdk/internal/classfile/impl/StackCounter.java > line 306: > >> 304:

Re: RFR: 8319463: ClassSignature should have superclass and superinterfaces as ClassTypeSig [v4]

2024-01-08 Thread Adam Sotona
On Fri, 5 Jan 2024 23:06:30 GMT, Chen Liang wrote: >> Discovered while writing a test for #16513 that >> `ClassSignature.superclassSignature()` does not return a `ClassTypeSig`, yet >> [JVM >> Spec](https://docs.oracle.com/javase/specs/jvms/se21/html/jvms-4.html#jvms-4.7.9.1-4100) >>

Re: RFR: 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target. [v2]

2024-01-08 Thread Emanuel Peter
On Fri, 5 Jan 2024 09:35:34 GMT, Emanuel Peter wrote: >> Thanks for the comment addition! > > Improvement suggestion: > For a vector with 8 ints, we get `2^8 = 256` many bit patterns for the mask. > The table has a row for each `mask` value, consisting of 8 ints, which > provide the valid

Re: RFR: 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target. [v4]

2024-01-08 Thread Emanuel Peter
On Mon, 8 Jan 2024 06:23:46 GMT, Jatin Bhateja wrote: >> Hi, >> >> Patch optimizes non-subword vector compress and expand APIs for x86 AVX2 >> only targets. >> Upcoming E-core Xeons (Sierra Forest) and Hybrid CPUs only support AVX2 >> instruction set. >> These are very frequently used APIs in

Re: RFR: 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target. [v2]

2024-01-08 Thread Emanuel Peter
On Mon, 8 Jan 2024 06:06:20 GMT, Jatin Bhateja wrote: >> You are using `VectorMask pred = VectorMask.fromLong(ispecies, >> maskctr++);`. >> That basically systematically iterates over all masks, which is nice for a >> correctness test. >> But that would use different density inside one test

Re: RFR: 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target. [v3]

2024-01-08 Thread Quan Anh Mai
On Mon, 8 Jan 2024 06:06:22 GMT, Jatin Bhateja wrote: >> Thanks for the updates! >> >> One more idea: Your AVX2 solution has a lot of cost for converting the mask >> to a permutation. Might it make sense to split this off into a separate >> vector-node, so that it can float out of a loop if

Re: RFR: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock [v2]

2024-01-08 Thread Jaikiran Pai
On Mon, 8 Jan 2024 09:04:57 GMT, Alan Bateman wrote: >> In preparation for when virtual threads can unmount while holding a monitor >> or unmount when blocking on monitorenter, the implementation of >> VirtualThread's interrupt method is refactored to avoid parking/blocking >> while holding

Re: RFR: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock [v2]

2024-01-08 Thread Alan Bateman
> In preparation for when virtual threads can unmount while holding a monitor > or unmount when blocking on monitorenter, the implementation of > VirtualThread's interrupt method is refactored to avoid parking/blocking > while holding the Thread's interrupt lock. The implementations of >

Re: RFR: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock [v2]

2024-01-08 Thread Alan Bateman
On Fri, 5 Jan 2024 17:28:30 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/nio/channels/spi/AbstractInterruptibleChannel.java >> line 180: >> >>> 178: Thread me = Thread.currentThread(); >>> 179: if (me.isInterrupted()) { >>> 180:

Integrated: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment,ValueLayout,long,long) spec mismatch in exception scenario

2024-01-08 Thread Per Minborg
On Tue, 12 Dec 2023 10:02:00 GMT, Per Minborg wrote: > This PR proposes to change the specification for some methods that take > `long` offsets so that they will throw an `IllegalArgumentException` rather > than an `IndexOutOfBoundsException` for negative values. > > The PR also proposes to

RFR: 8322744: VirtualThread.notifyJvmtiDisableSuspend should be static

2024-01-08 Thread Serguei Spitsyn
The notification method `VirtualThread.notifyJvmtiDisableSuspend` should be static. The method disables/enables suspend of the current virtual thread, a no-op if the current thread is a platform thread. It is confusing for this to be an instance method, it should be static to make it clearer