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

2024-09-28 Thread Alan Bateman
On Sun, 29 Sep 2024 04:23:14 GMT, Ioi Lam wrote: >> Added braces. >> The `setClassPath(null)` used to be in `ClassLoaders.AppClassLoader`. Based >> on investigations so far, the clearing of the `moduleToReader` map is >> required only for `AppClassLoader`. > > Why does it need to clear `moduleT

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

2024-09-28 Thread Ioi Lam
On Thu, 26 Sep 2024 00:45:48 GMT, Calvin Cheung wrote: >> src/java.base/share/classes/jdk/internal/loader/BuiltinClassLoader.java line >> 1092: >> >>> 1090: void resetArchivedStatesForAppClassLoader() { >>> 1091: setClassPath(null); >>> 1092: if (!moduleToReader.isEmpty()) m

RFR: 8341137: Optimize long vector multiplication using x86 VPMULUDQ instruction

2024-09-28 Thread Jatin Bhateja
This patch optimizes LongVector multiplication by inferring VPMULUDQ instruction for following IR pallets. MulL ( And SRC1, 0x) ( And SRC2, 0x) MulL (URShift SRC1 , 32) (URShift SRC2, 32) MulL (URShift SRC1 , 32) ( And SRC2, 0x)

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

2024-09-28 Thread Ioi Lam
On Thu, 26 Sep 2024 00:45:20 GMT, Calvin Cheung wrote: >> src/hotspot/share/classfile/classLoaderExt.cpp line 162: >> >>> 160: int n = os::snprintf(full_name, full_name_len, "%s%s%s", path, >>> os::file_separator(), file_name); >>> 161: assert((size_t)n == full_name_len - 1, "Un

Re: RFR: 8341136: Optimize StackMapGenerator::trimAndCompress

2024-09-28 Thread Shaojin Wen
On Sat, 28 Sep 2024 17:15:43 GMT, Abdelhak Zaaim wrote: > We can improve performance by avoiding repeated array access in the loop. > Instead of accessing types[i] multiple times, we cache it in a local > variable. Here's the optimized version `for (int i = 0; i < count; i++) { > Type current

Re: RFR: 8341136: Optimize StackMapGenerator::trimAndCompress

2024-09-28 Thread Shaojin Wen
On Fri, 27 Sep 2024 17:05:25 GMT, Shaojin Wen wrote: > A small optimization to reduce the write operations of trimAndCompress I saw trimAndCompress in the flame graph of the profile, so I made this optimization. Avoiding write operations here is a very small optimization and will not have a si

RFR: 8341141: Optimize DirectCodeBuilder

2024-09-28 Thread Shaojin Wen
Some DirectCodeBuilder related optimizations to improve startup and running performance: 1. Merge calls, merge writeU1 and writeU2 into writeU3 2. Merge calls, merge writeU1 and writeIndex operations 3. Directly use writeU1 instead of writeBytecode 4. Rewrite the implementation of load and store

Re: RFR: 8341064: Define anchor point and index term for "wrapper classes" [v3]

2024-09-28 Thread Chen Liang
On Sat, 28 Sep 2024 21:30:24 GMT, Pavel Rappo wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Respond to review feedback. > > src/java.base/share/classes/java/lang/package-info.java line 34: > >> 32: * Frequently it

Re: RFR: 8341064: Define anchor point and index term for "wrapper classes" [v3]

2024-09-28 Thread Pavel Rappo
On Sat, 28 Sep 2024 15:02:50 GMT, Joe Darcy wrote: >> The is the initial version of a PR to defined an anchor point and index term >> of "wrapper classes." > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Respond to review fee

Re: RFR: 8341064: Define anchor point and index term for "wrapper classes" [v3]

2024-09-28 Thread Pavel Rappo
On Sat, 28 Sep 2024 15:02:50 GMT, Joe Darcy wrote: >> The is the initial version of a PR to defined an anchor point and index term >> of "wrapper classes." > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Respond to review fee

Re: RFR: 8341100: Add index entries for terms used in java.lang.Class

2024-09-28 Thread Chen Liang
On Sat, 28 Sep 2024 14:56:37 GMT, Joe Darcy wrote: > Small update to java.lang.Class docs. > > I didn't add an index item for "hidden classes" since the indexing mechanism > picks up the section titles. Confirmed that searching for "hidden class" finds the "Hidden Classes" section in JDK 23 A

Re: RFR: 8339329: ConstantPoolBuilder#constantValueEntry method doc typo and clarifications [v2]

2024-09-28 Thread Chen Liang
On Fri, 30 Aug 2024 18:12:38 GMT, David M. Lloyd wrote: >> Please review this small documentation change to ConstantPoolBuilder to fix >> a typo and clarify the usage of the `constantValueEntry` method. > > David M. Lloyd has updated the pull request incrementally with one additional > commit s

Re: RFR: 8341136: Optimize StackMapGenerator::trimAndCompress

2024-09-28 Thread Chen Liang
On Fri, 27 Sep 2024 17:05:25 GMT, Shaojin Wen wrote: > A small optimization to reduce the write operations of trimAndCompress Does this bring a speed up in the interpreter or compiled code like C2? Indeed the category 2 long/double primitive types appear rarely, and the majority of methods won

Re: Proposal for new public class: java.io.CharSequenceReader

2024-09-28 Thread Bernd Eckenfels
Markus Karg schrieb am 28.09.2024 18:15 (GMT +02:00): > Dear Sirs, > for performance reasons, hereby I like to propose the new public class > java.io.CharSequenceReader > I like the idea and missed it in the past. while we are at it, also support a char[] constructor (since this char[] does n

Re: RFR: 8341136: Optimize StackMapGenerator::trimAndCompress

2024-09-28 Thread Abdelhak Zaaim
On Fri, 27 Sep 2024 17:05:25 GMT, Shaojin Wen wrote: > A small optimization to reduce the write operations of trimAndCompress I think there's no significant performance impact with this change, or it's negligible, because the condition is replaced by an assignment. While the condition check wo

Re: RFR: 8341136: Optimize StackMapGenerator::trimAndCompress

2024-09-28 Thread Abdelhak Zaaim
On Fri, 27 Sep 2024 17:05:25 GMT, Shaojin Wen wrote: > A small optimization to reduce the write operations of trimAndCompress We can improve performance by avoiding repeated array access in the loop. Instead of accessing types[i] multiple times, we cache it in a local variable. Here's the opti

Proposal for new public class: java.io.CharSequenceReader

2024-09-28 Thread Markus Karg
Dear Sirs, for performance reasons, hereby I like to propose the new public class java.io.CharSequenceReader. Before sharing a pull request, I'd kindly like to request for comments. Since Java 1.1 we have the StringReader class. Since Java 1.4 we have the CharSequence class. StringBuilder,

Re: RFR: 8341064: Define anchor point and index term for "wrapper classes" [v3]

2024-09-28 Thread Joe Darcy
> The is the initial version of a PR to defined an anchor point and index term > of "wrapper classes." Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Respond to review feedback. - Changes: - all: https://git.openjdk.org

RFR: 8341100: Add index entries for terms used in java.lang.Class

2024-09-28 Thread Joe Darcy
Small update to java.lang.Class docs. I didn't add an index item for "hidden classes" since the indexing mechanism picks up the section titles. - Commit messages: - Refine changes. - Merge branch 'master' into JDK-8341100 - JDK-8341100: Add index entries for terms used in java.la

Re: RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v4]

2024-09-28 Thread Jaikiran Pai
On Fri, 27 Sep 2024 01:41:33 GMT, Henry Jen wrote: >> This PR support a -k, --keep options like tar that allows jar to avoid >> override existing files. > > Henry Jen has updated the pull request incrementally with one additional > commit since the last revision: > > Address review feedbacks

Re: RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v4]

2024-09-28 Thread Jaikiran Pai
On Fri, 27 Sep 2024 01:41:33 GMT, Henry Jen wrote: >> This PR support a -k, --keep options like tar that allows jar to avoid >> override existing files. > > Henry Jen has updated the pull request incrementally with one additional > commit since the last revision: > > Address review feedbacks

Re: RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v4]

2024-09-28 Thread Jaikiran Pai
On Fri, 27 Sep 2024 01:41:33 GMT, Henry Jen wrote: >> This PR support a -k, --keep options like tar that allows jar to avoid >> override existing files. > > Henry Jen has updated the pull request incrementally with one additional > commit since the last revision: > > Address review feedbacks

Re: RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v4]

2024-09-28 Thread Jaikiran Pai
On Fri, 27 Sep 2024 01:41:33 GMT, Henry Jen wrote: >> This PR support a -k, --keep options like tar that allows jar to avoid >> override existing files. > > Henry Jen has updated the pull request incrementally with one additional > commit since the last revision: > > Address review feedbacks

Re: RFR: 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files [v3]

2024-09-28 Thread Jaikiran Pai
On Fri, 27 Sep 2024 01:41:17 GMT, Henry Jen wrote: >> src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties line >> 316: >> >>> 314: main.help.opt.extract.keep-old-files=\ >>> 315: \ -k, --keep-old-files Do not overwrite existing files.\n\ >>> 316: \

RFR: 8341136: Optimize StackMapGenerator::trimAndCompress

2024-09-28 Thread Shaojin Wen
A small optimization to reduce the write operations of trimAndCompress - Commit messages: - optimize trimAndCompress Changes: https://git.openjdk.org/jdk/pull/21227/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21227&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8

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

2024-09-28 Thread Jaikiran Pai
On Wed, 25 Sep 2024 16:22:55 GMT, Eirik Bjørsnøs wrote: >> Please review this cleanup PR which makes `ZipFile.Source.initCEN` not >> include the 22-byte trailing`END` header when reading the `CEN` section of >> the ZIP file. >> >> The reading of the END header was probably brought over from na

Re: RFR: 8341064: Define anchor point and index term for "wrapper classes" [v2]

2024-09-28 Thread Pavel Rappo
On Sat, 28 Sep 2024 00:56:02 GMT, Joe Darcy wrote: >> src/java.base/share/classes/java/lang/package-info.java line 63: >> >>> 61: * security policies. >>> 62: * >>> 63: * Class {@link Throwable} encompasses objects that may be thrown >> >> We already have a link to `Class` in this doc commen

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v14]

2024-09-28 Thread fabioromano1
> This implementation of MutableBigInteger.leftShift(int) optimizes the current > version, avoiding unnecessary copy of the MutableBigInteger's value content > and performing the primitive shifting only in the original portion of the > value array rather than in the value yet extended with trail

Re: RFR: 8340205: Native linker allows MemoryLayout consisting of only PaddingLayout [v5]

2024-09-28 Thread Vladimir Kozelkov
On Mon, 23 Sep 2024 16:35:18 GMT, Per Minborg wrote: >> This PR prevents sequence layout with padding to be used with the Linker. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last revision: > > Reword doce I came with a new batch of weird