Re: RFR: 8320448: Accelerate IndexOf using AVX2 [v18]

2024-05-03 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: RFR: 8331535: Incorrect prompt for Console.readLine

2024-05-03 Thread Pavel Rappo
On Fri, 3 May 2024 19:02:41 GMT, Naoto Sato wrote: > We have a test that checks if `System.console()` returns the correct Console > (or null) from the expected module > (`test/jdk/java/io/Console/ModuleSelectionTest.java`) > Good; then here we should indeed specify

Re: [External] : Re: New candidate JEP: 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal

2024-05-03 Thread John Rose
P.S. I didn’t directly address David’s request for that magic number N. I would just assume 32 bits as the conservative element size (for oops) and work from there. If the cache line size is 64 bytes, then N=16. These are robust assumptions, even if they waste a little space when N could be 8

Re: [External] : Re: New candidate JEP: 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal

2024-05-03 Thread John Rose
Some of these sorts of use cases could be covered by somehow discovering a platform-specific parameter N such that a[I] and a[I+N] are not likely to have false sharing in a data cache, for any I. (Or a series of N0, N1, … that prevent a[N0], a[N1]… from being falsely shared.) David is right that

Re: RFR: 8330276: Console methods with explicit Locale [v2]

2024-05-03 Thread Roger Riggs
On Mon, 29 Apr 2024 23:22:21 GMT, Naoto Sato wrote: >> Proposing new overloaded methods in `java.io.Console` class that explicitly >> take a `Locale` argument. Existing methods rely on the default locale, so >> the users won't be able to format their prompts/outputs in a certain locale >>

Re: Need for a sponsor for JDK-8313674

2024-05-03 Thread Kevin Rushforth
Also , as a helpful hint, Skara has reminded you not to force push [1]. I see that you have done this a couple times, which suggests you might be in the habit of doing this as part of your workflow. Please don't. Instead, if you need to make changes, push the changes as additional commits.

Integrated: 8331655: ClassFile API ClassCastException with verbose output of certain class files

2024-05-03 Thread Adam Sotona
On Fri, 3 May 2024 15:28:05 GMT, Adam Sotona wrote: > Specifically corrupted constant pool of a class file can cause > ClassCastException, when the entries are accessed by Class-File API in exact > order. > > This fix avoids the ClassCastException and throws ConstantPoolException > instead.

Re: RFR: 8331535: Incorrect prompt for Console.readLine

2024-05-03 Thread Naoto Sato
On Fri, 3 May 2024 18:52:12 GMT, Pavel Rappo wrote: > Ideally, we should have separate tests that make sure that jdk.internal.le is > the default impl. We have a test that checks if `System.console()` returns the correct Console (or null) from the expected module

Re: Need for a sponsor for JDK-8313674

2024-05-03 Thread Brian Burkhalter
Hello, This is the PR [1]. This is the sequence that should be followed: 1. Align the name title of the PR with the issue. (you) 2. Continue the conversation until at least one Reviewer approves it. (one or more of us) 3. Comment with /integrate command. (you) 4. Comment with /sponsor command.

Re: RFR: 8331535: Incorrect prompt for Console.readLine

2024-05-03 Thread Pavel Rappo
On Fri, 3 May 2024 17:07:59 GMT, Naoto Sato wrote: > Or maybe we could explicitly specify `-Djdk.console=jdk.internal.le` to the > test. We could do that, or we could replace `jdk.internal.le` with "default" in the summary. Ideally, we should have separate tests that make sure that

Re: RFR: 8331485: Odd Results when Parsing Scientific Notation with Large Exponent [v2]

2024-05-03 Thread Naoto Sato
On Fri, 3 May 2024 18:29:23 GMT, Justin Lu wrote: >> Please review this PR which corrects an edge case bug for >> java.text.DecimalFormat that causes incorrect parsing results for strings >> with very large exponent values. >> >> When parsing values with large exponents, if the value of the

Re: RFR: 8331485: Odd Results when Parsing Scientific Notation with Large Exponent [v2]

2024-05-03 Thread Justin Lu
On Fri, 3 May 2024 18:24:31 GMT, Justin Lu wrote: >> src/java.base/share/classes/java/text/DecimalFormat.java line 2596: >> >>> 2594: exponent = -exponent; >>> 2595: } >>> 2596: sawExponent = true; >> >> I see you

Re: RFR: 8331485: Odd Results when Parsing Scientific Notation with Large Exponent [v2]

2024-05-03 Thread Justin Lu
On Fri, 3 May 2024 18:02:05 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - correct other test comment >> - reflect review > > src/java.base/share/classes/java/text/DecimalFormat.java line 2596: >

Re: RFR: 8331485: Odd Results when Parsing Scientific Notation with Large Exponent [v2]

2024-05-03 Thread Justin Lu
> Please review this PR which corrects an edge case bug for > java.text.DecimalFormat that causes incorrect parsing results for strings > with very large exponent values. > > When parsing values with large exponents, if the value of the exponent > exceeds `Integer.MAX_VALUE`, the parsed value

Need for a sponsor for JDK-8313674

2024-05-03 Thread Iñigo Mediavilla
Hello, For my first contribution to OpenJDK, I've started looking into JDK-8313674, an issue that falls into core-libs. According to the OpenJDK Developers’ Guide I'd need a sponsor to help me through the contribution process, would anyone be available to help me ? Thanks in advance Íñigo

Looking for a sponsor to help with my first contribution

2024-05-03 Thread Iñigo Mediavilla
Hello, For my first contribution to OpenJDK, I've started looking into JDK-8313674, an issue that falls into core-libs. According to the OpenJDK Developers’ Guide I'd need a sponsor to help me through the contribution process, would anyone be available to help me ? Thanks in advance Íñigo

Re: [External] : Re: New candidate JEP: 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal

2024-05-03 Thread Ron Pressler
> On 3 May 2024, at 18:33, David Lloyd wrote: > > > On Fri, May 3, 2024 at 10:12 AM Mark Reinhold > wrote: > https://openjdk.org/jeps/471 > > Summary: Deprecate the memory-access methods in sun.misc.Unsafe for > removal in a future release. > > > We still use Unsafe fairly often in

Re: RFR: 8331485: Odd Results when Parsing Scientific Notation with Large Exponent

2024-05-03 Thread Naoto Sato
On Fri, 3 May 2024 08:47:03 GMT, Justin Lu wrote: > Please review this PR which corrects an edge case bug for > java.text.DecimalFormat that causes incorrect parsing results for strings > with very large exponent values. > > When parsing values with large exponents, if the value of the

Re: RFR: 8331655: ClassFile API ClassCastException with verbose output of certain class files [v2]

2024-05-03 Thread Paul Sandoz
On Fri, 3 May 2024 17:13:04 GMT, Adam Sotona wrote: >> Specifically corrupted constant pool of a class file can cause >> ClassCastException, when the entries are accessed by Class-File API in exact >> order. >> >> This fix avoids the ClassCastException and throws ConstantPoolException >>

Re: RFR: 8331655: ClassFile API ClassCastException with verbose output of certain class files [v2]

2024-05-03 Thread Adam Sotona
> Specifically corrupted constant pool of a class file can cause > ClassCastException, when the entries are accessed by Class-File API in exact > order. > > This fix avoids the ClassCastException and throws ConstantPoolException > instead. > Test is attached. > > Please review. > > Thanks, >

Re: RFR: 8331655: ClassFile API ClassCastException with verbose output of certain class files [v2]

2024-05-03 Thread Adam Sotona
On Fri, 3 May 2024 16:25:30 GMT, Paul Sandoz 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/ClassReaderImpl.java > line 402: >

Re: RFR: 8331535: Incorrect prompt for Console.readLine

2024-05-03 Thread Naoto Sato
On Fri, 3 May 2024 11:12:48 GMT, Pavel Rappo wrote: >> When JLine reads a line, there may be a prompt provided. However, JLine will >> not interpret the prompt literally, it will handle `%` specially. As a >> consequence, doing: >> >> System.console().readLine("%%s"); >> >> >> will not

Integrated: 8295153: java/util/Base64/TestEncodingDecodingLength.java ran out of memory

2024-05-03 Thread Justin Lu
On Wed, 1 May 2024 16:10:06 GMT, Justin Lu wrote: > Please review this PR which converts _TestEncodingDecodingLength.java_ into a > whitebox test which allows for testing to be done without memory usage issues. > > Currently, the test requires about ~2.75 `Integer.MAX_VALUE` sized byte >

Re: RFR: 8331655: ClassFile API ClassCastException with verbose output of certain class files

2024-05-03 Thread Paul Sandoz
On Fri, 3 May 2024 15:28:05 GMT, Adam Sotona wrote: > Specifically corrupted constant pool of a class file can cause > ClassCastException, when the entries are accessed by Class-File API in exact > order. > > This fix avoids the ClassCastException and throws ConstantPoolException > instead.

Integrated: 8331582: Incorrect default Console provider comment

2024-05-03 Thread Naoto Sato
On Thu, 2 May 2024 20:54:58 GMT, Naoto Sato wrote: > Fixing a comment in `java.io.Console`, which was a leftover from the fix to > https://bugs.openjdk.org/browse/JDK-8308591 This pull request has now been integrated. Changeset: cf2c80e4 Author:Naoto Sato URL:

Re: RFR: 8331582: Incorrect default Console provider comment

2024-05-03 Thread Naoto Sato
On Thu, 2 May 2024 20:54:58 GMT, Naoto Sato wrote: > Fixing a comment in `java.io.Console`, which was a leftover from the fix to > https://bugs.openjdk.org/browse/JDK-8308591 Thank you for the reviews! - PR Comment: https://git.openjdk.org/jdk/pull/19070#issuecomment-2093318995

Re: RFR: 8331582: Incorrect default Console provider comment [v2]

2024-05-03 Thread Naoto Sato
> Fixing a comment in `java.io.Console`, which was a leftover from the fix to > https://bugs.openjdk.org/browse/JDK-8308591 Naoto Sato has updated the pull request incrementally with one additional commit since the last revision: Update src/java.base/share/classes/java/io/Console.java

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v2]

2024-05-03 Thread Severin Gehwolf
On Fri, 3 May 2024 15:58:11 GMT, Severin Gehwolf wrote: >> src/java.base/share/classes/sun/launcher/LauncherHelper.java line 375: >> >>> 373: if (!c.isContainerized()) { >>> 374: ostream.println(INDENT + "System not containerized."); >>> 375: return; >> >> Why

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container

2024-05-03 Thread Severin Gehwolf
On Mon, 22 Apr 2024 13:56:23 GMT, Jan Kratochvil wrote: > Anyway in this patch one could unify naming across variables/parameters, the > same value is called `_is_ro`, `is_read_only`, `ro_opt`, `read_only`, `ro`. I've tried to unify the naming a bit. Thanks for the review! - PR

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v3]

2024-05-03 Thread Severin Gehwolf
> Please review this enhancement to the container detection code which allows > it to figure out whether the JVM is actually running inside a container > (`podman`, `docker`, `crio`), or with some other means that enforces > memory/cpu limits by means of the cgroup filesystem. If neither of

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v2]

2024-05-03 Thread Severin Gehwolf
On Tue, 16 Apr 2024 18:21:29 GMT, Thomas Stuefe wrote: > Why return here? Because it's not useful to see containerized settings (other than the cg version in use) after this patch. The JVM won't use them (uses the physical settings instead). Why would you want to show the settings?

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v2]

2024-05-03 Thread Severin Gehwolf
On Tue, 16 Apr 2024 18:10:08 GMT, Thomas Stuefe wrote: >> src/hotspot/os/linux/cgroupSubsystem_linux.cpp line 351: >> >>> 349: // >>> 350: // We collect the read only mount option in the cgroup infos so as >>> to have that >>> 351: // info ready when determining is_containerized().

Re: RFR: 8261242: [Linux] OSContainer::is_containerized() returns true when run outside a container [v2]

2024-05-03 Thread Severin Gehwolf
On Tue, 16 Apr 2024 18:16:33 GMT, Thomas Stuefe 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 ten additional >>

RFR: 8331655: ClassFile API ClassCastException with verbose output of certain class files

2024-05-03 Thread Adam Sotona
Specifically corrupted constant pool of a class file can cause ClassCastException, when the entries are accessed by Class-File API in exact order. This fix avoids the ClassCastException and throws ConstantPoolException instead. Test is attached. Please review. Thanks, Adam -

Re: RFR: 8329653: JLILaunchTest fails on AIX after JDK-8329131 [v2]

2024-05-03 Thread Joachim Kern
> Since ~ end of March, after > [JDK-8329131](https://bugs.openjdk.org/browse/JDK-8329131), > tools/launcher/JliLaunchTest.java fails on AIX. Failure is : > > stdout: []; > stderr: [Error: could not find libjava.so > Error: Could not find Java SE Runtime Environment. > ] > exitValue = 2 > >

Re: In support of Instant.minus(Instant)

2024-05-03 Thread Roger Riggs
Hi, I would also reinforce Stephen's early observation that the pattern for "until" methods in java.time includes those of the XXXDate classes, with a single Temporal parameter.  Period and Duration are similar values holding relative TemporalAmounts.     public Period until(ChronoLocalDate

Re: RFR: 8331582: Incorrect default Console provider comment

2024-05-03 Thread Pavel Rappo
On Thu, 2 May 2024 20:54:58 GMT, Naoto Sato wrote: > Fixing a comment in `java.io.Console`, which was a leftover from the fix to > https://bugs.openjdk.org/browse/JDK-8308591 Looks good. src/java.base/share/classes/java/io/Console.java line 409: > 407: * The JdkConsole provider

Re: RFR: 8329653: JLILaunchTest fails on AIX after JDK-8329131

2024-05-03 Thread Matthias Baesken
On Fri, 3 May 2024 11:31:35 GMT, Alan Bateman wrote: > > I was busy with other things and missed JoKern65's comment. I would be less > risky to limit this to AIX for now. Thanks for your comment; we see the issue only on AIX so it makes sense to limit it to this platform. - PR

Re: RFR: 8329653: JLILaunchTest fails on AIX after JDK-8329131

2024-05-03 Thread Alan Bateman
On Fri, 3 May 2024 08:15:32 GMT, Matthias Baesken wrote: > The naming GetApplicationHomeFromLD_LIBRARY_PATH looks a bit unconventional ; > maybe adjust this ? Regarding if the code should be added for all platforms > or just AIX, let's hear what Alan and others have to say. I was busy with

Re: RFR: 8331535: Incorrect prompt for Console.readLine

2024-05-03 Thread Pavel Rappo
On Fri, 3 May 2024 10:11:02 GMT, Jan Lahoda wrote: > When JLine reads a line, there may be a prompt provided. However, JLine will > not interpret the prompt literally, it will handle `%` specially. As a > consequence, doing: > > System.console().readLine("%%s"); > > > will not print `%s`,

Integrated: 8323707: Adjust Classfile API's type arg model to better represent the embodied type

2024-05-03 Thread Chen Liang
On Mon, 6 Nov 2023 07:30:41 GMT, Chen Liang wrote: > API changes as discussed on the mailing list: > https://mail.openjdk.org/pipermail/classfile-api-dev/2023-November/000419.html > > Additional questions: > 1. Whether to rename `WildcardIndicator.DEFAULT` to `NONE` This pull request has now

Re: RFR: 8182774: Verify code in javap [v2]

2024-05-03 Thread Maurizio Cimadamore
On Thu, 2 May 2024 12:22:23 GMT, Adam Sotona wrote: >> This patch adds `javap -verify` option to check the class and print obvious >> verification errors found. >> Implementation depends on extended Class-File API verification support, so >> PR #16809 is important to precede. >> The new

RFR: 8331535: Incorrect prompt for Console.readLine

2024-05-03 Thread Jan Lahoda
When JLine reads a line, there may be a prompt provided. However, JLine will not interpret the prompt literally, it will handle `%` specially. As a consequence, doing: System.console().readLine("%%s"); will not print `%s`, as first `String.format` is used, which will convert `%%s` to `%s`,

RFR: 8331485: Odd Results when Parsing Scientific Notation with Large Exponent

2024-05-03 Thread Justin Lu
Please review this PR which corrects an edge case bug for java.text.DecimalFormat that causes incorrect parsing results for strings with very large exponent values. When parsing values with large exponents, if the value of the exponent exceeds `Integer.MAX_VALUE`, the parsed value is equal to

Re: RFR: 8329653: JLILaunchTest fails on AIX after JDK-8329131

2024-05-03 Thread Matthias Baesken
On Mon, 29 Apr 2024 14:45:07 GMT, Joachim Kern wrote: > Since ~ end of March, after > [JDK-8329131](https://bugs.openjdk.org/browse/JDK-8329131), > tools/launcher/JliLaunchTest.java fails on AIX. Failure is : > > stdout: []; > stderr: [Error: could not find libjava.so > Error: Could not

Re: RFR: 8331582: Incorrect default Console provider comment

2024-05-03 Thread Justin Lu
On Thu, 2 May 2024 20:54:58 GMT, Naoto Sato wrote: > Fixing a comment in `java.io.Console`, which was a leftover from the fix to > https://bugs.openjdk.org/browse/JDK-8308591 Marked as reviewed by jlu (Committer). - PR Review:

Re: RFR: 8331582: Incorrect default Console provider comment

2024-05-03 Thread Jan Lahoda
On Thu, 2 May 2024 20:54:58 GMT, Naoto Sato wrote: > Fixing a comment in `java.io.Console`, which was a leftover from the fix to > https://bugs.openjdk.org/browse/JDK-8308591 Looks good to me, thanks! - Marked as reviewed by jlahoda (Reviewer). PR Review: