Re: RFR: 8303814: getLastErrorString should avoid charset conversions [v2]

2023-03-13 Thread Roger Riggs
On Mon, 13 Mar 2023 09:48:19 GMT, Daniel Jeliński wrote: >> This patch modifies the `getLastErrorString` method to return a `jstring`. >> Thanks to that we can avoid unnecessary back and forth conversions between >> Unicode and other charsets on Windows. >> >> Other changes include: >> - the

Re: RFR: 8303485: Replacing os.name for operating system customization [v2]

2023-03-13 Thread Roger Riggs
On Fri, 10 Mar 2023 21:21:56 GMT, Roger Riggs wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archi

Re: RFR: 8303814: getLastErrorString should avoid charset conversions

2023-03-10 Thread Roger Riggs
On Wed, 8 Mar 2023 11:30:27 GMT, Daniel Jeliński wrote: > This patch modifies the `getLastErrorString` method to return a `jstring`. > Thanks to that we can avoid unnecessary back and forth conversions between > Unicode and other charsets on Windows. > > Other changes include: > - the Windows

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v6]

2023-03-10 Thread Roger Riggs
can identify the caller and purpose. > Logging the process start event is complementary to the process start event > generated for JFR (Java Flight Recorder). Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Reword @implNote to in

Re: RFR: 8303485: Replacing os.name for operating system customization [v2]

2023-03-10 Thread Roger Riggs
s with `os.name` > - Clear and consistent use across build, runtime, and JDK modules > > The PR includes updates within java.base to use the new API. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Move OperatingSyste

Re: RFR: 8303648: Add String.indexOf(String str, int beginIndex, int endIndex) [v2]

2023-03-10 Thread Roger Riggs
On Fri, 10 Mar 2023 13:35:27 GMT, Raffaello Giulietti wrote: >> As a followup of [JDK-8302590](https://bugs.openjdk.org/browse/JDK-8302590), >> this issue covers the analogous case for a search of a string rather than a >> character. > > Raffaello Giulietti has updated the pull request

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v5]

2023-03-10 Thread Roger Riggs
can identify the caller and purpose. > Logging the process start event is complementary to the process start event > generated for JFR (Java Flight Recorder). Roger Riggs has updated the pull request incrementally with two additional commits since the last revision: - Fix one more i

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v3]

2023-03-10 Thread Roger Riggs
On Thu, 9 Mar 2023 20:24:11 GMT, Thomas Stuefe wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revise logging of ProcessBuilder.start to support DEBUG and TRACE logging. >>

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v4]

2023-03-09 Thread Roger Riggs
can identify the caller and purpose. > Logging the process start event is complementary to the process start event > generated for JFR (Java Flight Recorder). Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Reorder pid, directo

Re: RFR: 8303919: Instant.ofEpochMilli says it can throw an exception that it can't

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 19:49:29 GMT, Eamonn McManus wrote: > Instant.ofEpochMilli says this: > > > @throws DateTimeException if the instant exceeds the maximum or minimum > instant > > > But that can't happen. Even given `Long.MIN_VALUE` or `Long.MAX_VALUE` it > does not throw. That's already

Re: RFR: 8303919: Instant.ofEpochMilli says it can throw an exception that it can't

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 19:49:29 GMT, Eamonn McManus wrote: > Instant.ofEpochMilli says this: > > > @throws DateTimeException if the instant exceeds the maximum or minimum > instant > > > But that can't happen. Even given `Long.MIN_VALUE` or `Long.MAX_VALUE` it > does not throw. That's already

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v2]

2023-03-09 Thread Roger Riggs
On Sun, 5 Mar 2023 06:14:49 GMT, Thomas Stuefe wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add javadoc @implNote to Runtime.exec and ProcessBuilder methods > > Hi Roger, >

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Wed, 8 Mar 2023 19:15:16 GMT, Roger Riggs wrote: > Improvements to support OS specific customization for JDK internal use: > - To select values and code; allowing elimination of unused code and values > - Optionally evaluated by build processes, compilation, or archiving (i.

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Wed, 8 Mar 2023 23:23:38 GMT, Mandy Chung wrote: > I wonder if `jdk.internal.platform` would be a better home for > `OperatingSystem` class? jdk.internal.platform seems to be focused on information about container environments such as Docker. jdk.internal.misc already contains other

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v3]

2023-03-09 Thread Roger Riggs
can identify the caller and purpose. > Logging the process start event is complementary to the process start event > generated for JFR (Java Flight Recorder). Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Revise logging of Pr

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 16:05:56 GMT, Roger Riggs wrote: >> src/java.base/share/classes/jdk/internal/misc/OperatingSystem.java line 98: >> >>> 96: @ForceInline >>> 97: public static boolean isLinux() { >>> 98: return OperatingSystemProp

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 17:07:28 GMT, Mandy Chung wrote: >> The one in the template file is independent to the build variables. > >> I would argue that we should keep the replacement string matching the make >> variable its getting the value from. It makes it easier to trace the origin >> of the

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
have OpenJDK 19 and 17 respectively. On Wed, Mar 8, 2023, 6:54 PM David Holmes wrote: On Wed, 8 Mar 2023 19:15:16 GMT, Roger Riggs wrote: > Improvements to support OS specific customization for JDK internal use: >  - To select values and code; allowing elimination of

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Wed, 8 Mar 2023 23:09:06 GMT, Mandy Chung wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS)

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 00:45:02 GMT, Naoto Sato wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS) >>

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 15:24:04 GMT, Erik Joelsson wrote: >> src/java.base/share/classes/jdk/internal/misc/OperatingSystemProps.java.template >> line 39: >> >>> 37: >>> 38: // Index/ordinal of the current OperatingSystem enum as substituted >>> by the build >>> 39: static final int

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Wed, 8 Mar 2023 23:11:34 GMT, Mandy Chung wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS)

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Wed, 8 Mar 2023 22:49:05 GMT, Raffaello Giulietti wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e.

Re: RFR: 8303485: Replacing os.name for operating system customization

2023-03-09 Thread Roger Riggs
On Thu, 9 Mar 2023 02:51:24 GMT, David Holmes wrote: > Has this totally killed of BSD support on the JDK side? I thought building > non-macOS BSD was still viable, but perhaps not - certainly not after this > change. I haven't found any use of BSD and I don't think the build supports a BSD

RFR: 8303485: Replacing os.name for operating system customization

2023-03-08 Thread Roger Riggs
Improvements to support OS specific customization for JDK internal use: - To select values and code; allowing elimination of unused code and values - Optionally evaluated by build processes, compilation, or archiving (i.e. CDS) - Simple API to replace adhoc comparisons with `os.name` - Clear

Re: RFR: 8303480: Miscellaneous fixes to mostly invisible doc comments [v2]

2023-03-06 Thread Roger Riggs
On Mon, 6 Mar 2023 20:22:48 GMT, Pavel Rappo wrote: >> Please review this superficial documentation cleanup that was triggered by >> unrelated analysis of doc comments in JDK API. >> >> The only effect that this multi-area PR has on the JDK API Documentation >> (i.e. the observable effect on

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v2]

2023-03-06 Thread Roger Riggs
On Sun, 5 Mar 2023 06:14:49 GMT, Thomas Stuefe wrote: > I think to be even more useful it could make sense to print the current > directory the child is started in as well as the env var array, possibly only > with a finer logging level. There are concerns about exposing potentially sensitive

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v2]

2023-03-06 Thread Roger Riggs
On Mon, 6 Mar 2023 12:44:57 GMT, Daniel Fuchs wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add javadoc @implNote to Runtime.exec and ProcessBuilder methods > > src/jav

Re: RFR: 8303440: The "ZonedDateTime.parse" may not accept the "UTC+XX" zone id [v3]

2023-03-06 Thread Roger Riggs
On Sat, 4 Mar 2023 02:22:39 GMT, Naoto Sato wrote: >> This change is to fix a regression caused by the fix to >> [JDK-8234347](https://bugs.openjdk.org/browse/JDK-8234347). The previous fix >> was simply disabling offset-based parsing if the parser was text-based. >> Instead, check if it is

Re: UUID creation performance

2023-03-06 Thread Roger Riggs
chooses which utility class to call based on the native order vs. some other option? Thanks, Brett On Wed, Mar 1, 2023 at 9:08 AM Roger Riggs wrote: Hi, That's an interesting idea. Recently VarHandle access methods were created by JDK-8300236 [1] [2] in the jdk.internal.util package. See

Re: Testing no memory leak occurs via references

2023-03-06 Thread Roger Riggs
Hi Albert, The only  downside of the WhiteBox API is the need to link and run with native code. It make adhoc testing more difficult. I would not say ForceGC relies on chance, since it is testing the specific condition as requested by the caller. It uses mechanisms available to normal

Re: RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger [v2]

2023-03-04 Thread Roger Riggs
can identify the caller and purpose. > Logging the process start event is complementary to the process start event > generated for JFR (Java Flight Recorder). Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Add javadoc @implNo

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) [v8]

2023-03-03 Thread Roger Riggs
On Fri, 3 Mar 2023 19:38:57 GMT, Raffaello Giulietti wrote: >> Add an `indexOf()` variant allowing to specify both a lower and an upper >> bound on the search. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > git

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v42]

2023-03-03 Thread Roger Riggs
On Mon, 27 Feb 2023 12:47:03 GMT, Jim Laskey wrote: >> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of

RFR: 8303392: Runtime.exec and ProcessBuilder.start should use System logger

2023-03-03 Thread Roger Riggs
Runtime.exec and ProcessBuilder.start methods create a new operating system process with the program and arguments. Many applications configure a logging subsystem to monitor application events. Logging a process start message with the program, arguments, and stack trace can identify the caller

Integrated: JDK-8303587 Remove VMOutOfMemoryError001 test from the problem list after 8303198

2023-03-03 Thread Roger Riggs
On Fri, 3 Mar 2023 16:40:41 GMT, Roger Riggs wrote: > Remove VMOutOfMemoryException001.java from the problem list, after > JDK-8303198. > > The logging of Runtime.exit interfered with out-of-memory exception handling > in this test. > Making the logging more robust in JDK-8

Re: Testing no memory leak occurs via references

2023-03-03 Thread Roger Riggs
Hi, There is test library class jdk.test.lib.util.ForceGC that is useful for that case. It uses a PhantomReference to detect that gc has been run. And it can be called with a function that can test for another condition. For an example, look at the tests that use ForceGC in test/jdk/...

RFR: JDK-8303587 Remove VMOutOfMemoryError001 test from the problem list after 8303198

2023-03-03 Thread Roger Riggs
Remove VMOutOfMemoryException001.java from the problem list, after JDK-8303198. The logging of Runtime.exit interfered with out-of-memory exception handling in this test. Making the logging more robust in JDK-8303198 by handling exceptions restores the conditions expected by this test.

Integrated: 8303198: System and Runtime.exit() resilience to logging errors

2023-03-03 Thread Roger Riggs
On Mon, 27 Feb 2023 15:41:01 GMT, Roger Riggs wrote: > Consolidate logging and handle exceptions by printing to standard error and > ignoring the exception. > Exceptions while logging will not interfere with Runtime.exit. This pull request has now been integrated. Changeset: 379f20

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors [v2]

2023-03-02 Thread Roger Riggs
On Fri, 3 Mar 2023 02:49:01 GMT, Chris Plummer wrote: > Are you going to remove VMOutOfMemoryException001.java from the problem list? I'll do that a separate PR to avoid mixing the issues and solutions. This change is not only to address JDK-8303057. - PR:

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors [v2]

2023-03-02 Thread Roger Riggs
On Wed, 1 Mar 2023 16:59:51 GMT, Roger Riggs wrote: >> Consolidate logging and handle exceptions by printing to standard error and >> ignoring the exception. >> Exceptions while logging will not interfere with Runtime.exit. > > Roger Riggs has updated the pull reques

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) [v7]

2023-03-02 Thread Roger Riggs
On Thu, 2 Mar 2023 10:24:03 GMT, Raffaello Giulietti wrote: >> Add an `indexOf()` variant allowing to specify both a lower and an upper >> bound on the search. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > >

Re: RFR: 8299807: newStringNoRepl should avoid copying arrays for ASCII compatible charsets [v4]

2023-03-02 Thread Roger Riggs
On Sat, 28 Jan 2023 19:54:32 GMT, Glavo wrote: >> This is the javadoc of `JavaLangAccess::newStringNoRepl`: >> >> >> /** >> * Constructs a new {@code String} by decoding the specified subarray of >> * bytes using the specified {@linkplain java.nio.charset.Charset >> charset}. >>

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) [v7]

2023-03-02 Thread Roger Riggs
On Thu, 2 Mar 2023 10:24:03 GMT, Raffaello Giulietti wrote: >> Add an `indexOf()` variant allowing to specify both a lower and an upper >> bound on the search. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > >

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) [v4]

2023-03-01 Thread Roger Riggs
On Wed, 1 Mar 2023 16:24:46 GMT, Raffaello Giulietti wrote: >> Add an `indexOf()` variant allowing to specify both a lower and an upper >> bound on the search. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > >

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors [v2]

2023-03-01 Thread Roger Riggs
> Consolidate logging and handle exceptions by printing to standard error and > ignoring the exception. > Exceptions while logging will not interfere with Runtime.exit. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Add ex

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-03-01 Thread Roger Riggs
On Wed, 1 Mar 2023 11:03:39 GMT, Jaikiran Pai wrote: >> Consolidate logging and handle exceptions by printing to standard error and >> ignoring the exception. >> Exceptions while logging will not interfere with Runtime.exit. > > src/java.base/share/classes/java/lang/Shutdown.java line 186: >

Re: UUID creation performance

2023-03-01 Thread Roger Riggs
Hi, That's an interesting idea.  Recently VarHandle access methods were created by JDK-8300236 [1] [2] in the jdk.internal.util package. See the ByteArray and ByteArrayLittleEndian classes. See how that would affect performance and leverage existing VarHandles. Thanks, Roger [1]

Re: RFR: 8303266: Prefer ArrayList to LinkedList in JImageTask

2023-02-28 Thread Roger Riggs
On Mon, 27 Feb 2023 11:33:38 GMT, Andrey Turbanov wrote: > `LinkedList` is used as a field > `jdk.tools.jimage.JImageTask.OptionsValues#jimages` > It's created, filled (with `add`) and then iterated. No removes from the head > or something like this. `ArrayList` should be preferred as more

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer [v4]

2023-02-28 Thread Roger Riggs
On Tue, 28 Feb 2023 13:29:49 GMT, Jim Laskey wrote: >> Add the ability to repeatedly append char and CharSequence data to >> StringBuilder/StringBuffer. > > Jim Laskey has updated the pull request incrementally with two additional > commits since the last revision: > > - Remove @throws

Re: RFR: 8303133: Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed. [v5]

2023-02-28 Thread Roger Riggs
On Mon, 27 Feb 2023 23:11:27 GMT, Leonid Mesnik wrote: >> The solution proposed by Stefan K >> >> The startProcess() might wait forever for the expected line if the process >> exits (failed to start). It makes sense to just fail earlier in such cases. >> >> The fix also move >> 'output = new

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer [v3]

2023-02-28 Thread Roger Riggs
On Tue, 28 Feb 2023 09:05:44 GMT, John Hendrikx wrote: >> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1903: >> >>> 1901: throw new OutOfMemoryError("Required length exceeds >>> implementation limit"); >>> 1902: } >>> 1903: int total = count

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 23:00:45 GMT, David Holmes wrote: >> Yes, its racy, and intentional, but from a diagnostic view, the developer >> should know that multiple callers were trying to exit. All but one will >> hang. >> Consolidating the code in a single method is cleaner and with fewer >>

Re: RFR: 8303266: Prefer ArrayList to LinkedList in JImageTask

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 11:33:38 GMT, Andrey Turbanov wrote: > `LinkedList` is used as a field > `jdk.tools.jimage.JImageTask.OptionsValues#jimages` > It's created, filled (with `add`) and then iterated. No removes from the head > or something like this. `ArrayList` should be preferred as more

Integrated: 8303253: Remove unnecessary calls to super() in java.time value based classes

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 15:50:02 GMT, Roger Riggs wrote: > To simplify future work changing some java.time value based classes to > Valhalla value classes, the explicit calls to super() are removed from > Duration, Instant, and ZoneOffset. This pull request has now been integrated.

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v4]

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 17:37:48 GMT, Justin Lu wrote: >> This PR adds a new method to java.util.Locale which returns Stream >> >> The contents of the Stream are composed of the same underlying elements as >> Locale.getAvailableLocales(). >> >> This method allows streaming of the Locale array

Re: RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread Roger Riggs
On Mon, 27 Feb 2023 15:58:33 GMT, Alan Bateman wrote: >> Consolidate logging and handle exceptions by printing to standard error and >> ignoring the exception. >> Exceptions while logging will not interfere with Runtime.exit. > > src/java.base/share/classes/java/lang/Shutdown.java line 189: >

RFR: 8303253: Remove unnecessary calls to super() in java.time value based classes

2023-02-27 Thread Roger Riggs
To simplify future work changing some java.time value based classes to Valhalla value classes, the explicit calls to super() are removed from Duration, Instant, and ZoneOffset. - Commit messages: - 8303253: Remove unnecessary calls to super() in java.time value based classes

RFR: 8303198: System and Runtime.exit() resilience to logging errors

2023-02-27 Thread Roger Riggs
Consolidate logging and handle exceptions by printing to standard error and ignoring the exception. Exceptions while logging will not interfere with Runtime.exit. - Commit messages: - Consolidate logging and handle exceptions by printing to standard error Changes:

Re: RFR: 8292914: Drop the counter from lambda class names [v10]

2023-02-27 Thread Roger Riggs
On Fri, 24 Feb 2023 16:16:51 GMT, David M. Lloyd wrote: >> The class generated for lambda proxies is now defined as a hidden class. >> This means that the counter, which was used to ensure a unique class name >> and avoid clashes, is now redundant. In addition to performing redundant >> work,

Re: RFR: 8303133: Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed.

2023-02-24 Thread Roger Riggs
On Fri, 24 Feb 2023 22:15:18 GMT, Leonid Mesnik wrote: > The solution proposed by Stefan K > > The startProcess() might wait forever for the expected line if the process > exits (failed to start). It makes sense to just fail earlier in such cases. > > The fix also move > 'output = new

Re: RFR: 8303133: Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed.

2023-02-24 Thread Roger Riggs
On Fri, 24 Feb 2023 22:15:18 GMT, Leonid Mesnik wrote: > The solution proposed by Stefan K > > The startProcess() might wait forever for the expected line if the process > exits (failed to start). It makes sense to just fail earlier in such cases. > > The fix also move > 'output = new

Re: RFR: 8282319: java.util.Locale method to stream available Locales [v3]

2023-02-24 Thread Roger Riggs
On Fri, 24 Feb 2023 21:57:41 GMT, Justin Lu wrote: >> OK but then we should be consistent and update all of the methods to use the >> new tag or revert the change for consistency > > Makes sense, will look at both Locale and LocaleServiceProviderPool and > update the methods that are

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex) [v2]

2023-02-24 Thread Roger Riggs
On Fri, 24 Feb 2023 17:45:42 GMT, Raffaello Giulietti wrote: >> addressed > > JMH does not indicate any performance regression. > > W.r.t. renaming Java parameters in `@IntrinsicCandidate` methods, I > crosschecked with a runtime compiler guy. He confirms that changing names in > the Java

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-24 Thread Roger Riggs
On Fri, 24 Feb 2023 15:28:33 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/java/lang/String.java line 2483: >> >>> 2481: return isLatin1() ? StringLatin1.indexOf(value, ch, >>> fromIndex, toIndex) >>> 2482: : StringUTF16.indexOf(value, ch, fromIndex,

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-23 Thread Roger Riggs
On Thu, 16 Feb 2023 17:16:35 GMT, Raffaello Giulietti wrote: > Add an `indexOf()` variant allowing to specify both a lower and an upper > bound on the search. There should be no or little impact from the extra level of calls but its worth confirming.

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Roger Riggs
On Thu, 23 Feb 2023 13:13:43 GMT, Jim Laskey wrote: > Add the ability to repeatedly append char and CharSequence data to > StringBuilder/StringBuffer. src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1918: > 1916: } > 1917: int valueLength = length <<

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Roger Riggs
On Thu, 23 Feb 2023 13:13:43 GMT, Jim Laskey wrote: > Add the ability to repeatedly append char and CharSequence data to > StringBuilder/StringBuffer. src/java.base/share/classes/java/lang/String.java line 4461: > 4459: > 4460: /** > 4461: * Used to perform copying after the initial

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Roger Riggs
On Thu, 23 Feb 2023 16:20:59 GMT, Jim Laskey wrote: >> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1867: >> >>> 1865: >>> 1866: private AbstractStringBuilder repeatNull(int count) { >>> 1867: if (count < 0) { >> >> This could be implemented as

Re: RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-23 Thread Roger Riggs
On Thu, 16 Feb 2023 17:16:35 GMT, Raffaello Giulietti wrote: > Add an `indexOf()` variant allowing to specify both a lower and an upper > bound on the search. Is there any performance impact? Are there relevant JHM tests? Or should be added. Also to verify that the intrinsics are still valid

Re: RFR: JDK-8302323 Add repeat methods to StringBuilder/StringBuffer

2023-02-23 Thread Roger Riggs
On Thu, 23 Feb 2023 13:13:43 GMT, Jim Laskey wrote: > Add the ability to repeatedly append char and CharSequence data to > StringBuilder/StringBuffer. src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1839: > 1837: * @throws StringIndexOutOfBoundsException if the

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor [v4]

2023-02-23 Thread Roger Riggs
On Thu, 23 Feb 2023 08:31:36 GMT, Alan Bateman wrote: >> Executors.newSingleThreadExecutor returns a delegating ExecutorService that >> has finalizer to shutdown the underlying TPE when the wrapper is >> finalizable. It goes back to JDK 6 and JDK-6399443. This is the last >> non-empty

Integrated: 8301627: System.exit and Runtime.exit debug logging

2023-02-21 Thread Roger Riggs
On Fri, 10 Feb 2023 20:33:39 GMT, Roger Riggs wrote: > It can be difficult to find the cause of calls to > `java.lang.System.exit(status)` and `Runtime.exit(status)` because the Java > runtime exits. > The status value and stack trace are logged using the System

Re: RFR: 8302899: Executors.newSingleThreadExecutor can use Cleaner to shutdown executor

2023-02-21 Thread Roger Riggs
On Mon, 20 Feb 2023 18:34:17 GMT, Alan Bateman wrote: > Executors.newSingleThreadExecutor returns a delegating ExecutorService that > has finalizer to shutdown the underlying TPE when the wrapper is finalizable. > It goes back to JDK 6 and JDK-6399443. This is the last non-empty finalizer >

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v7]

2023-02-20 Thread Roger Riggs
ger.Level.DEBUG`. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: fix double the - Changes: - all: https://git.openjdk.org/jdk/pull/12517/files - new: https://git.openjdk.org/jdk/pull/12517/files/3dc13135..acce58f1 W

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-17 Thread Roger Riggs
On Fri, 17 Feb 2023 19:53:10 GMT, Stuart Marks wrote: >> Matthew Donovan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> added exceptions for cases 4 and 5 > > test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java line 211: > >> 209:

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v6]

2023-02-17 Thread Roger Riggs
ger.Level.DEBUG`. Roger Riggs 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 eight additional commits since the last revision: - Move test to the java/la

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v5]

2023-02-17 Thread Roger Riggs
On Fri, 17 Feb 2023 07:48:41 GMT, Alan Bateman wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve implNote for Runtime.exit() with review suggestions. > > src/java.base/share/

Re: RFR: 8298939: Refactor open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.sh to jtreg java test [v3]

2023-02-17 Thread Roger Riggs
On Tue, 7 Feb 2023 20:38:40 GMT, Matthew Donovan wrote: >> Removed SSLSocketParametersTest.sh script (which just called a Java file) >> and configured the java code to run directly with jtreg > > Matthew Donovan has updated the pull request incrementally with one > additional commit since the

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v5]

2023-02-16 Thread Roger Riggs
ger.Level.DEBUG`. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Improve implNote for Runtime.exit() with review suggestions. - Changes: - all: https://git.openjdk.org/jdk/pull/12517/files - new: https://git.openjdk.org

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v4]

2023-02-16 Thread Roger Riggs
On Tue, 14 Feb 2023 19:02:52 GMT, Stuart Marks wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Correct System.getLogger link > > src/java.base/share/classes/java/lang/Shu

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v4]

2023-02-16 Thread Roger Riggs
On Thu, 16 Feb 2023 16:52:14 GMT, Sean Mullan wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Correct System.getLogger link > > src/java.base/share/classes/java/lang/Runtime.java line

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v4]

2023-02-16 Thread Roger Riggs
On Tue, 14 Feb 2023 13:10:41 GMT, Daniel Fuchs wrote: >> Roger has updated this but it's still a comment on a non-public class. I >> think the main question here is whether there should be a note in the >> System.exit and Runtime.exit to document that these methods log? If not, >> will it be

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v4]

2023-02-16 Thread Roger Riggs
On Mon, 13 Feb 2023 11:02:14 GMT, Daniel Fuchs wrote: >> test/jdk/java/lang/runtime/RuntimeExitLogTest.java line 89: >> >>> 87: } >>> 88: cmd.add(this.getClass().getName()); >>> 89: cmd.add(Integer.toString(status)); >> >> Another possibility for testing this is to

Re: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)

2023-02-15 Thread Roger Riggs
Hi Raffaello, What's the use case, can you give an example? Seems reasonable; would you also add `lastIndexOf(int ch, int fromIndex, int toIndex)`? Not intrinsified, but for symmetry. Regards, Roger On 2/15/23 10:47 AM, Raffaello Giulietti wrote: Hello, Currently `String` does not expose

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v4]

2023-02-14 Thread Roger Riggs
ger.Level.DEBUG`. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Correct System.getLogger link - Changes: - all: https://git.openjdk.org/jdk/pull/12517/files - new: https://git.openjdk.org/jdk/pull/12517/files/a8eca9e5..60

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v3]

2023-02-14 Thread Roger Riggs
On Tue, 14 Feb 2023 17:15:28 GMT, Daniel Fuchs wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add an @implNote to Runtime.exit to describe the java.lang.Runtime logging. > > src/jav

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v3]

2023-02-14 Thread Roger Riggs
ger.Level.DEBUG`. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Add an @implNote to Runtime.exit to describe the java.lang.Runtime logging. - Changes: - all: https://git.openjdk.org/jdk/pull/12517/files - new: https://

Re: RFR: 8301627: System.exit and Runtime.exit debug logging [v2]

2023-02-13 Thread Roger Riggs
ger.Level.DEBUG`. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Added try/catch around lookup of logger so exceptions do not prevent System.exit. Added test case with console logger (when java.util.logging) not present. Removed @i

Re: RFR: 8302163: Speed up various String comparison methods with ArraysSupport.mismatch

2023-02-13 Thread Roger Riggs
On Mon, 13 Feb 2023 09:59:24 GMT, Claes Redestad wrote: > We can improve various String methods such as `startsWith`, `endsWith` and > `regionMatches` by leveraging the intrinsified mismatch methods in > `ArraysSupport`. Look good. - Marked as reviewed by rriggs (Reviewer). PR:

Re: RFR: 8301552: Use AtomicReferenceArray for caching instead of CHM in ZoneOffset [v8]

2023-02-10 Thread Roger Riggs
On Thu, 9 Feb 2023 13:46:14 GMT, Per Minborg wrote: >> `ZoneOffset` instances are cached by the `ZoneOffset` class itself for >> values in the range [-18h, 18h] for each second that is on an even quarter >> of an hour (i.e. at most 2*18*4+1 = 145 values). >> >> Instead of using a

RFR: 8301627: System.exit and Runtime.exit debug logging

2023-02-10 Thread Roger Riggs
It can be difficult to find the cause of calls to `java.lang.System.exit(status)` and `Runtime.exit(status)` because the Java runtime exits. The status value and stack trace are logged using the System Logger named `java.lang.Runtime` with message level `System.Logger.Level.DEBUG`.

Re: RFR: 8301737: java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java fail with -Xcomp [v4]

2023-02-10 Thread Roger Riggs
On Fri, 10 Feb 2023 17:50:40 GMT, Mark Sheppard wrote: >> @msheppar It depends on the timing of GC and the unpredictable interactions >> between the compiler and gc. >> If gc is particularly aggressive (as may be stimulated by -Xcomp), it may >> determine that the impl is no longer referenced

Re: RFR: 8301737: java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java fail with -Xcomp [v4]

2023-02-10 Thread Roger Riggs
On Fri, 10 Feb 2023 12:13:13 GMT, Mark Sheppard wrote: >> I just tested it and it really be OK, I'll submit a new commit. > > yes, this mitigates the issue within the test, and alls good. > BUT it still leave an open question as to why the behaviour of the test is > different for the -Xcomp

Re: RFR: 8301737: java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java fail with -Xcomp [v5]

2023-02-10 Thread Roger Riggs
On Fri, 10 Feb 2023 03:03:07 GMT, SUN Guoyun wrote: >> Hi all, >> When -Xcomp be used, this testcase will use more codecaches, causing the GC >> to be triggered early, then causing this test failed on LoongArch64 >> architecture. >> >> This PR fix the issue, Please help review it. >> >>

Re: RFR: 8301737: java/rmi/server/UnicastRemoteObject/serialFilter/FilterUROTest.java fail with -Xcomp [v4]

2023-02-09 Thread Roger Riggs
On Thu, 9 Feb 2023 08:48:17 GMT, SUN Guoyun wrote: >> Hi all, >> When -Xcomp be used, this testcase will use more codecaches, causing the GC >> to be triggered early, then causing this test failed on LoongArch64 >> architecture. >> >> This PR fix the issue, Please help review it. >> >>

Re: RFR: JDK-8301704: Shorten the number of GCs in UnloadingTest.java to verify a class loader not being unloaded [v2]

2023-02-08 Thread Roger Riggs
On Wed, 8 Feb 2023 23:17:20 GMT, Mandy Chung wrote: >> `test/jdk/java/lang/invoke/defineHiddenClass/UnloadingTest.java` defines >> hidden classes and verify cases that a class loader is not unloaded using >> `ForceGC::wait`.ForceGC::wait` defaults the timeout to 1000ms * jtreg >> timeout

[jdk20] Integrated: 8301863: ObjectInputFilter example incorrectly calls rejectUndecidedClass

2023-02-08 Thread Roger Riggs
On Mon, 6 Feb 2023 20:40:08 GMT, Roger Riggs wrote: > The example code in ObjectInputFilter for the FilterInThread filter factory > does not do what is intended and is poorly described. Clarifies that the > JVM-wide filter and the thread local filter are merged and will reject

Re: RFR: JDK-8301704: Shorten the number of GCs in UnloadingTest.java to verify a class loader not being unloaded

2023-02-08 Thread Roger Riggs
On Wed, 8 Feb 2023 20:30:13 GMT, Mandy Chung wrote: >> test/lib/jdk/test/lib/util/ForceGC.java line 73: >> >>> 71: * if did not complete after the specified waiting time. >>> 72: */ >>> 73: public static boolean wait(BooleanSupplier booleanSupplier, long >>> timeout) { >> >>

Re: RFR: JDK-8301704: Shorten the number of GCs in UnloadingTest.java to verify a class loader not being unloaded

2023-02-08 Thread Roger Riggs
On Thu, 2 Feb 2023 20:09:22 GMT, Mandy Chung wrote: > `test/jdk/java/lang/invoke/defineHiddenClass/UnloadingTest.java` defines > hidden classes and verify cases that a class loader is not unloaded using > `ForceGC::wait`.ForceGC::wait` defaults the timeout to 1000ms * jtreg > timeout

<    4   5   6   7   8   9   10   11   12   >