Re: RFR: 8361613: System.console() should only be available for interactive terminal

2025-07-11 Thread Andrey Turbanov
On Fri, 11 Jul 2025 18:46:14 GMT, Naoto Sato wrote: > In prior JDK releases, `System.console()` could return a `Console` instance > even when the JVM was not attached to an interactive terminal. This could > lead to confusion, particularly when input was not from a keyboard or output > was red

Re: RFR: 8360037: Refactor ImageReader in preparation for Valhalla support [v5]

2025-07-04 Thread Andrey Turbanov
On Wed, 2 Jul 2025 13:54:02 GMT, David Beaumont wrote: >> Refactoring `ImageReader` to make it easy to add preview mode functionality >> for Valhalla. >> >> This PR is a large change to `ImageReader` (effectively a rewrite) but >> reduces the surface area of the API significantly, reduces code

Re: RFR: 8358533: Improve performance of java.io.Reader.readAllLines

2025-06-24 Thread Andrey Turbanov
On Wed, 18 Jun 2025 00:04:37 GMT, Brian Burkhalter wrote: > Replaces the implementation `readAllCharsAsString().lines().toList()` with > reading into a temporary `char` array which is then processed to detect line > terminators and copy non-terminating characters into strings which are added >

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v4]

2025-06-05 Thread Andrey Turbanov
On Tue, 3 Jun 2025 07:55:06 GMT, Volkan Yazici wrote: >> Passes the `Charset` read from the `stdin.encoding` system property while >> creating `InputStreamReader` or `Scanner` instances for `System.in`. >> >> `stdin.encoding` is a recently added property for Java 25 in >> [JDK-8350703](https:/

Re: RFR: 8351594: JFR: Rate-limited sampling of Java events [v6]

2025-06-05 Thread Andrey Turbanov
On Thu, 5 Jun 2025 08:40:44 GMT, Erik Gahlin wrote: >> Could I have review of an enhancement that adds rate-limited sampling to >> Java events, including five events in the JDK (SocketRead, SocketWrite, >> FileRead, FileWrite, and JavaExceptionThrow). >> >> Testing: test/jdk/jdk/jfr >> >> Tha

Re: RFR: 8358426: Improve lazy computation in Locale

2025-06-05 Thread Andrey Turbanov
On Wed, 4 Jun 2025 21:20:46 GMT, Justin Lu wrote: > Please review this PR which improves occurrences of lazy computation in > `Locale` and `BaseLocale`. > > Existing lazy initialization strategies such as CHM, static nested class, and > local inner class are replaced with Stable Values. > > L

Re: RFR: 8357531: The `SegmentBulkOperations::fill` method can be improved using overlaps [v5]

2025-05-27 Thread Andrey Turbanov
On Thu, 22 May 2025 11:52:34 GMT, Per Minborg wrote: >> This PR builds on a concept John Rose told me about some time ago. Instead >> of combining memory operations of various sizes, a single large and skewed >> memory operation can be made to clean up the tail of remaining bytes. >> >> This h

Re: RFR: 8356995: Provide default methods min(T, T) and max(T, T) in Comparator interface [v4]

2025-05-23 Thread Andrey Turbanov
On Fri, 23 May 2025 12:28:36 GMT, Tagir F. Valeev wrote: >> Implementation of Comparator.min and Comparator.max methods. Preliminary >> discussion is in this thread: >> https://mail.openjdk.org/pipermail/core-libs-dev/2025-May/145638.html >> The specification is mostly composed of Math.min/max a

Re: RFR: 8334015: Add Support for UUID Version 7 (UUIDv7) defined in RFC 9562 [v2]

2025-05-20 Thread Andrey Turbanov
On Tue, 20 May 2025 11:58:30 GMT, kieran-farrell wrote: >> With the recent approval of UUIDv7 >> (https://datatracker.ietf.org/doc/rfc9562/), this PR aims to add a new >> static method UUID.timestampUUID() which constructs and returns a UUID in >> support of the new time generated UUID version

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v12]

2025-05-09 Thread Andrey Turbanov
On Tue, 6 May 2025 20:52:34 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` in

Re: RFR: 8356152: String.concat can throw StringIndexOutOfBoundsException [v5]

2025-05-05 Thread Andrey Turbanov
On Mon, 5 May 2025 17:29:33 GMT, Raffaello Giulietti wrote: >> A fix to throw `OutOfMemoryError`, as done in releases ≤ 23. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Increased min heap size to 8G. Marked as r

Re: RFR: 8356152: String.concat can throw StringIndexOutOfBoundsException [v4]

2025-05-05 Thread Andrey Turbanov
On Mon, 5 May 2025 17:47:02 GMT, Raffaello Giulietti wrote: >> _Really_ fails with Xmx7G > > Yes, the required heap size was not enough for the reverted variant to throw > a non-OOME exception/error. > > Just out of curiosity, is JDK-8356152 a real-world issue you stumbled upon, > or did you

Re: RFR: 8356152: String.concat can throw StringIndexOutOfBoundsException [v4]

2025-05-05 Thread Andrey Turbanov
On Mon, 5 May 2025 14:38:05 GMT, Raffaello Giulietti wrote: >> A fix to throw `OutOfMemoryError`, as done in releases ≤ 23. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Added language concat + to test. test/jdk/

Re: RFR: 8356152: String.concat can throw StringIndexOutOfBoundsException [v4]

2025-05-05 Thread Andrey Turbanov
On Mon, 5 May 2025 17:09:37 GMT, Andrey Turbanov wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Added language concat + to test. > > test/jdk/java/lang/String/concat/HugeCon

Re: RFR: 8356152: String.concat can throw StringIndexOutOfBoundsException [v3]

2025-05-05 Thread Andrey Turbanov
On Mon, 5 May 2025 14:06:27 GMT, Raffaello Giulietti wrote: >> A fix to throw `OutOfMemoryError`, as done in releases ≤ 23. > > Raffaello Giulietti has updated the pull request incrementally with one > additional commit since the last revision: > > Added '@requires' to test. test/jdk/java/l

Re: RFR: 8336831: Optimize StringConcatHelper.simpleConcat [v7]

2025-05-05 Thread Andrey Turbanov
On Tue, 23 Jul 2024 12:56:07 GMT, Shaojin Wen wrote: >> Currently simpleConcat is implemented using mix and prepend, but in this >> simple scenario, it can be implemented in a simpler way and can improve >> performance. > > Shaojin Wen has updated the pull request incrementally with one additio

StringIndexOutOfBoundsException is thrown from String.concat

2025-05-05 Thread Andrey Turbanov
ConcatHelper.java:125) at java.base/java.lang.StringConcatHelper.simpleConcat(StringConcatHelper.java:374) at java.base/java.lang.String.concat(String.java:2990) Andrey Turbanov

Re: RFR: 8351000: StringBuilder getChar and putChar robustness

2025-04-30 Thread Andrey Turbanov
On Tue, 29 Apr 2025 14:10:30 GMT, Roger Riggs wrote: > Improve StringBuilder getChar and putChar robustness with racy updates to > StringBuilder. > Test racing threads with append, insert, and reading characters. Let's cleanup test a bit - Changes requested by aturbanov (Committe

Re: RFR: 8351000: StringBuilder getChar and putChar robustness

2025-04-30 Thread Andrey Turbanov
On Tue, 29 Apr 2025 14:10:30 GMT, Roger Riggs wrote: > Improve StringBuilder getChar and putChar robustness with racy updates to > StringBuilder. > Test racing threads with append, insert, and reading characters. test/jdk/java/lang/StringBuilder/RacingSBThreads.java line 61: > 59: // Cons

Re: RFR: 8342283: CDS cannot handle a large number of classes

2025-04-27 Thread Andrey Turbanov
On Fri, 25 Apr 2025 14:49:37 GMT, Aleksey Shipilev wrote: > CDS cannot handle large number of classes, because `ClassLoader` data > structures get too large for CDS archival. The new test captures such an > occasion. We do `clear()`-s, but that is not enough to trim the backing > storages for

Re: RFR: 8354774: DocumentBuilderFactory getAttribute throws NPE [v2]

2025-04-21 Thread Andrey Turbanov
On Fri, 18 Apr 2025 21:26:23 GMT, Joe Wang wrote: >> Fix a NPE on calling DocumentBuilderFactory::getAttribute, refer to the bug >> report. >> >> Also in this patch: consolidates get and set properties to use the same Util >> methods to reduce potential errors when code changes. >> >> Test: >

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v6]

2025-04-21 Thread Andrey Turbanov
On Fri, 18 Apr 2025 20:10:32 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: Remove unused import test/jdk/java/io/Buffer

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v4]

2025-04-05 Thread Andrey Turbanov
On Fri, 28 Mar 2025 01:08:42 GMT, Brent Christian wrote: >> I propose some cleanups to `FinalizerHistogramTest.java` to hopefully clear >> up the intermittent failures: >> >> * run with `othervm`: this test blocks the (global) finalizer thread, and >> also requires the (global) finalizer threa

RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

2025-03-11 Thread Andrey Turbanov
We have helpful NPE messages now - they are more user-friendly. And shorter methods are more likely to be inlined. - Commit messages: - [PATCH] Avoid explicit Objects.requireNonNull where we know implicit NPE will happen - [PATCH] Avoid explicit Objects.requireNonNull where we know

Re: RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

2025-03-11 Thread Andrey Turbanov
On Thu, 6 Mar 2025 12:38:01 GMT, Jaikiran Pai wrote: >> We have helpful NPE messages now - they are more user-friendly. >> And shorter methods are more likely to be inlined. > > src/java.base/share/classes/java/lang/String.java line 3649: > >> 3647: Iterable elements) { >> 3648:

Re: RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

2025-03-06 Thread Andrey Turbanov
On Thu, 20 Feb 2025 09:30:02 GMT, Andrey Turbanov wrote: > We have helpful NPE messages now - they are more user-friendly. > And shorter methods are more likely to be inlined. While having prerequirements checks often is good, I think not having it in String.join can be a good th

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files

2025-03-06 Thread Andrey Turbanov
On Wed, 5 Mar 2025 21:13:44 GMT, Alexey Semenyuk wrote: > jpackage app laucnher will expand environment variables in .cfg files. > > Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and > `$ROOTDIR` tokens with the corresponding path values. With this patch, any > environme

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v2]

2025-03-06 Thread Andrey Turbanov
On Thu, 6 Mar 2025 10:46:11 GMT, Michael McMahon wrote: >> Hi, >> >> Enhanced exception messages are designed to hide sensitive information such >> as hostnames, IP >> addresses from exception message strings, unless the enhanced mode for the >> specific category >> has been explicitly enabl

Re: RFR: 8350049: [JMH] Float16OperationsBenchmark fails java.lang.NoClassDefFoundError

2025-02-18 Thread Andrey Turbanov
On Fri, 14 Feb 2025 02:23:40 GMT, SendaoYan wrote: > Hi all, > > The newly added JMH tests > 'org.openjdk.bench.jdk.incubator.vector.VectorMultiplyOptBenchmark' fails > "java.lang.NoClassDefFoundError: jdk/incubator/vector/Float16" by below test > command: > > > make test MICRO="FORK=1;WARM

Re: RFR: 8349000: Performance improvement for Currency.isPastCutoverDate(String) [v3]

2025-02-03 Thread Andrey Turbanov
On Mon, 3 Feb 2025 18:58:57 GMT, Justin Lu wrote: >> Please review this PR which improves the performance of cut-over date >> checking when the user supplies a properties override via the >> `java.util.currency.data` sys prop. Replacing the `SimpleDateFormat` with a >> _java.time_ alternative

Re: RFR: 8349000: Performance improvement for Currency.isPastCutoverDate(String) [v2]

2025-02-03 Thread Andrey Turbanov
On Fri, 31 Jan 2025 19:46:37 GMT, Justin Lu wrote: >> Please review this PR which improves the performance of cut-over date >> checking when the user supplies a properties override via the >> `java.util.currency.data` sys prop. Replacing the `SimpleDateFormat` with a >> _java.time_ alternative

Integrated: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily

2025-01-24 Thread Andrey Turbanov
On Tue, 16 Jan 2024 10:19:44 GMT, Andrey Turbanov wrote: > There are 3 methods in `java.util.TimeZone` which are `public static` and > marked as `synchronized`: > 1. getTimeZone(String) > 2. getAvailableIDs(int) > 3. getAvailableIDs() > > This means it is a bottle neck for

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v3]

2025-01-24 Thread Andrey Turbanov
On Thu, 23 Jan 2025 22:48:17 GMT, Chen Liang wrote: >> Right, it can be removed. Actually, I think `getAvailableIDs()` and >> `getAvailableIDs(int)` also do not need to be synchronized. The internal IDs >> are eagerly initialized in the static block of `ZoneInfoFile.java` and are >> effectivel

Re: RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily [v2]

2025-01-16 Thread Andrey Turbanov
ementation and concluded that `synchronized` is > unnecessary. Andrey Turbanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge remote-tracking branch 'refs/remotes/origin/master' into JDK-8291027-TimeZone-sy

Re: RFR: 8346468: SM cleanup of common test library [v3]

2025-01-10 Thread Andrey Turbanov
On Wed, 18 Dec 2024 21:07:14 GMT, Roger Riggs wrote: >> SM Cleanup of common test library test/lib/...: >> >> Remove unnecessary catches of SecurityException >> Remove AccessController and doPrivileged from SimpleSSLContext and >> ProcessTools. > > Roger Riggs has updated the pull request incre

Re: RFR: 8346986: Remove ASM from java.base [v3]

2025-01-09 Thread Andrey Turbanov
On Thu, 9 Jan 2025 08:40:37 GMT, Adam Sotona wrote: >> There are no more consumers of ASM library except for hotspot tests. >> This patch moves ASM library from java.base module to the hotspot test >> libraries location and fixes the tests. >> >> Please review. >> >> Thanks, >> Adam > > Adam S

Re: RFR: 8345668: ZoneOffset.ofTotalSeconds performance regression [v4]

2025-01-02 Thread Andrey Turbanov
On Thu, 2 Jan 2025 18:11:53 GMT, Naoto Sato wrote: >> The change made in >> [JDK-8288723](https://bugs.openjdk.org/browse/JDK-8288723) seems innocuous, >> but it caused this performance regression. Partially reverting the change >> (ones that involve `computeIfAbsent()`) to the original. Provi

Re: RFR: 8345668: ZoneOffset.ofTotalSeconds performance regression [v4]

2025-01-02 Thread Andrey Turbanov
On Thu, 2 Jan 2025 18:11:53 GMT, Naoto Sato wrote: >> The change made in >> [JDK-8288723](https://bugs.openjdk.org/browse/JDK-8288723) seems innocuous, >> but it caused this performance regression. Partially reverting the change >> (ones that involve `computeIfAbsent()`) to the original. Provi

Re: RFR: 8345668: ZoneOffset.ofTotalSeconds performance regression [v3]

2024-12-26 Thread Andrey Turbanov
On Thu, 26 Dec 2024 16:39:58 GMT, Brett Okken wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed compile error > > src/java.base/share/classes/java/time/format/DateTimeTextProvider.java line > 316: > >> 314:

Re: RFR: 8342103: C2 compiler support for Float16 type and associated scalar operations [v5]

2024-12-19 Thread Andrey Turbanov
On Tue, 17 Dec 2024 11:09:09 GMT, Jatin Bhateja wrote: >> Hi All, >> >> This patch adds C2 compiler support for various Float16 operations added by >> [PR#22128](https://github.com/openjdk/jdk/pull/22128) >> >> Following is the summary of changes included with this patch:- >> >> 1. Detection

Re: RFR: 8344246: Unnecessary Hashtable usage in EventSupport.notifiers

2024-12-08 Thread Andrey Turbanov
On Tue, 5 Nov 2024 08:28:10 GMT, Andrey Turbanov wrote: > The field `com.sun.jndi.ldap.EventSupport#notifiers` is always accessed under > `lock`. It means extra synchronization from `Hashtable` is not needed. > Subtle difference in Hashtable vs Hashmap behavior is that Hashtabl

Re: RFR: 8344235: Revisit SecurityManager usage in java.logging after JEP 486 and JEP 491 integration [v2]

2024-12-04 Thread Andrey Turbanov
On Thu, 21 Nov 2024 10:24:28 GMT, Daniel Fuchs wrote: >> This PR remove usage of SecurityManager, doPrivileges, etc... from >> `java.logging` and `java.base/jdk.internal.logger` >> >> Only notable hack - Logger.checkPermission() no longer checks permissions, >> but has been renamed into `ensur

Re: RFR: 8344587: Reduce number of "jdk.jpackage.internal" classes used from other packages

2024-11-21 Thread Andrey Turbanov
On Tue, 19 Nov 2024 22:31:28 GMT, Alexey Semenyuk wrote: > Stop using internal AppImageFile, ApplicationLayout, and PackageFile classes > in the tests. Replace them with stubs. > > Stop referencing IOUtils class from XmlUtils and PathUtils classes. test/jdk/tools/jpackage/helpers/jdk/jpackage/

Re: RFR: 8344337: SecurityManager cleanup in java.prefs module [v5]

2024-11-20 Thread Andrey Turbanov
On Wed, 20 Nov 2024 22:43:44 GMT, Brent Christian wrote: >> Remove usages of SecurityManager, doPrivildged, and AccessController from >> the java.prefs module. > > Brent Christian has updated the pull request incrementally with one > additional commit since the last revision: > > indentation

Re: RFR: 8344337: SecurityManager cleanup in java.prefs module [v5]

2024-11-20 Thread Andrey Turbanov
On Wed, 20 Nov 2024 22:43:44 GMT, Brent Christian wrote: >> Remove usages of SecurityManager, doPrivildged, and AccessController from >> the java.prefs module. > > Brent Christian has updated the pull request incrementally with one > additional commit since the last revision: > > indentation

Re: RFR: 8344248: Remove Security Manager dependencies from java.security.jgss and jdk.security.jgss modules

2024-11-20 Thread Andrey Turbanov
On Tue, 19 Nov 2024 20:43:25 GMT, Sean Mullan wrote: > Now that JEP 486 has been integrated, `java.security.jgss` and > `jdk.security.jgss` module dependencies on `System.getSecurityManager` and > `AccessController.doPrivileged*` can be removed. > > There is an undocumented property named "sun

RFR: 8344246: Unnecessary Hashtable usage in EventSupport.notifiers

2024-11-14 Thread Andrey Turbanov
The field `com.sun.jndi.ldap.EventSupport#notifiers` is always accessed under `lock`. It means extra synchronization from `Hashtable` is not needed. Subtle difference in Hashtable vs Hashmap behavior is that Hashtable doesn't allow `null` keys and `null` values. I've checked all usages of it - on

Integrated: 8344023: Unnecessary Hashtable usage in LdapClient.defaultBinaryAttrs

2024-11-13 Thread Andrey Turbanov
On Tue, 5 Nov 2024 12:49:04 GMT, Andrey Turbanov wrote: > Content of Hashtable `com.sun.jndi.ldap.LdapClient#defaultBinaryAttrs` is > fully initialized in `` block. > It means we can replace legacy synchronized `Hashtable` with immutable set. This pull request has now been i

Re: RFR: 8344023: Unnecessary Hashtable usage in LdapClient.defaultBinaryAttrs

2024-11-13 Thread Andrey Turbanov
On Tue, 5 Nov 2024 12:49:04 GMT, Andrey Turbanov wrote: > Content of Hashtable `com.sun.jndi.ldap.LdapClient#defaultBinaryAttrs` is > fully initialized in `` block. > It means we can replace legacy synchronized `Hashtable` with immutable set. I run `com/sun/jndi` tests on my win x64.

Math.toIntExact why only long?

2024-11-13 Thread Andrey Turbanov
I wounder, why java.lang.Math.toIntExact accepts only long parameter? I think it will quite useful to have it with float/double parameters too. Andrey Turbanov

Re: RFR: 8344034: Remove security manager dependency in Serialization [v3]

2024-11-12 Thread Andrey Turbanov
On Tue, 12 Nov 2024 21:59:43 GMT, Roger Riggs wrote: >> After [JDK-8338411](https://bugs.openjdk.org/browse/JDK-8338411), >> Serialization implementation dependencies on SecurityManager, doPrivildged, >> and AccessController are removed. >> Some refactoring to cleanup the remaining code is expe

Re: RFR: 8343984: Fix Unsafe address overflow [v7]

2024-11-12 Thread Andrey Turbanov
On Tue, 12 Nov 2024 16:30:12 GMT, Shaojin Wen wrote: >> In the JDK code, there are some places that may cause Unsafe offset >> overflow. The probability of occurrence is low, but if it occurs, it will >> cause JVM crash. > > Shaojin Wen has updated the pull request incrementally with one additi

Re: RFR: 8343958: Remove security manager impl in java.lang.Process and java.lang.Runtime.exec [v3]

2024-11-12 Thread Andrey Turbanov
On Tue, 12 Nov 2024 18:05:46 GMT, Roger Riggs wrote: >> Refactor removing the dependencies on SecurityManager, doPrivileged, and >> AccessController. > > Roger Riggs has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 228 commits: > >

RFR: 8344023: Unnecessary Hashtable usage in LdapClient.defaultBinaryAttrs

2024-11-12 Thread Andrey Turbanov
Content of Hashtable `com.sun.jndi.ldap.LdapClient#defaultBinaryAttrs` is fully initialized in `` block. It means we can replace legacy synchronized `Hashtable` with immutable set. - Commit messages: - [PATCH] Unnecessary Hashtable usage in LdapClient.defaultBinaryAttrs Changes: ht

Can LinkedHashMap(accessOrder=true) be guarded by ReadWriteLock ?

2024-11-07 Thread Andrey Turbanov
ps, merely querying the map with get is a structural modification." As I understand, it means that LinkedHashMap.get can't be guarded _just_ by ReadLock. Is my assumption correct? Andrey Turbanov

Re: RFR: 8342693: Use byte[] as parameter in a FDBigInteger constructor and as field

2024-11-06 Thread Andrey Turbanov
On Mon, 21 Oct 2024 14:25:06 GMT, Raffaello Giulietti wrote: > This helps in reducing memory consumption, especially for long inputs. src/java.base/share/classes/jdk/internal/math/FloatingDecimal.java line 1875: > 1873: } // look for and process decimal floating-point string > 187

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning

2024-11-06 Thread Andrey Turbanov
On Thu, 17 Oct 2024 14:28:30 GMT, Patricio Chilano Mateo wrote: > This is the implementation of JEP 491: Synchronize Virtual Threads without > Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for > further details. > > In order to make the code review easier the changes hav

Re: RFR: 8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive

2024-11-01 Thread Andrey Turbanov
On Thu, 31 Oct 2024 07:15:16 GMT, Taizo Kurashige wrote: > To resolve java/io/File/GetXSpace.java failure, I fix libGetXSpace.c to use > Cygwin’s `df` to get the size for comparison if the test target drive is a > CD-ROM drive. > > As described in JDK-8343342, GetDiskSpaceInformationW can't g

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v4]

2024-10-28 Thread Andrey Turbanov
On Thu, 24 Oct 2024 03:01:54 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8342958: Use jvmArgs consistently in microbenchmarks

2024-10-28 Thread Andrey Turbanov
On Thu, 24 Oct 2024 13:52:57 GMT, Claes Redestad wrote: > Many OpenJDK micros use `@Fork(jvmArgs/-Append/-Prepend)` to add JVM > reasonable or necessary flags, but when deploying and running micros we often > want to add or replace flags to tune to the machine, test different GCs, etc. > The i

Integrated: 8342083: Make a few fields in FileSystemPreferences final

2024-10-26 Thread Andrey Turbanov
On Mon, 23 Sep 2024 09:13:58 GMT, Andrey Turbanov wrote: > 8342083: Make a few fields in FileSystemPreferences final This pull request has now been integrated. Changeset: 0e3fc93d Author: Andrey Turbanov URL: https://git.openjdk.org/jdk/com

Re: RFR: 8338383: Implementation of Synchronize Virtual Threads without Pinning

2024-10-21 Thread Andrey Turbanov
On Thu, 17 Oct 2024 14:28:30 GMT, Patricio Chilano Mateo wrote: > This is the implementation of JEP 491: Synchronize Virtual Threads without > Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for > further details. > > In order to make the code review easier the changes hav

Re: RFR: 8341260: Add Float16 to jdk.incubator.vector [v2]

2024-10-21 Thread Andrey Turbanov
On Sun, 20 Oct 2024 18:59:36 GMT, Joe Darcy wrote: >> Port of Float16 from java.lang in the lworld+fp16 branch to >> jdk.incubabor.vector. > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Remove comments for intrinsics per rev

RFR: 8342083: Make a few fields in FileSystemPreferences final

2024-10-14 Thread Andrey Turbanov
8342083: Make a few fields in FileSystemPreferences final - Commit messages: - [PATCH] Make a few fields in FileSystemPreferences final Changes: https://git.openjdk.org/jdk/pull/21131/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21131&range=00 Issue: https://bugs.openj

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v35]

2024-10-11 Thread Andrey Turbanov
On Thu, 10 Oct 2024 20:36:26 GMT, fabioromano1 wrote: >> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses >> repeated squares trick. > > fabioromano1 has updated the pull request incrementally with one additional > commit since the last revision: > > Refining mathematic

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat

2024-10-08 Thread Andrey Turbanov
On Mon, 23 Sep 2024 18:45:49 GMT, Ioi Lam wrote: > This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > This PR implements the AOT-linking of invokedynamic callsites: > - We only link lambda expressions (`LambdaMet

Re: RFR: 8338918: Remove non translated file name from WinResources resource bundle [v2]

2024-09-20 Thread Andrey Turbanov
On Fri, 20 Sep 2024 02:53:00 GMT, Alexey Semenyuk wrote: >> Move `resource.wxl-file-name` property from `WinResources.properties` files >> to the new `WinResourcesNoL10N.properties` files. The later are supposed to >> be excluded from automatic translations. > > Alexey Semenyuk has updated the

Re: RFR: 8338694: x86_64 intrinsic for tanh using libm [v4]

2024-09-13 Thread Andrey Turbanov
On Wed, 11 Sep 2024 00:29:30 GMT, Srinivas Vamsi Parasa wrote: >> The goal of this PR is to implement an x86_64 intrinsic for >> java.lang.Math.tanh() using libm >> >> Benchmark (ops/ms) | Stock JDK | Tanh intrinsic | Speedup >> -- | -- | -- | -- >> MathBench.tanhDouble | 70900 | 95618 | 1.35x

Re: RFR: 8325397: sun/java2d/Disposer/TestDisposerRace.java fails in linux-aarch64

2024-09-03 Thread Andrey Turbanov
On Thu, 29 Aug 2024 17:06:19 GMT, Andrey Turbanov wrote: >> My suspicion is that Condition::await() throws before having successfully >> reacquired the lock, and this exception is swallowed because Lock::unlock() >> then throws when invoke with an IllegalMonitorStateExcept

Re: RFR: 8325397: sun/java2d/Disposer/TestDisposerRace.java fails in linux-aarch64

2024-09-03 Thread Andrey Turbanov
On Thu, 15 Aug 2024 18:22:54 GMT, Viktor Klang wrote: > My suspicion is that Condition::await() throws before having successfully > reacquired the lock, and this exception is swallowed because Lock::unlock() > then throws when invoke with an IllegalMonitorStateException as the current > thread

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

2024-08-28 Thread Andrey Turbanov
On Wed, 28 Aug 2024 01:49:21 GMT, Chen Liang wrote: > Make `DirectCodeBuilder` write instructions actually directly without > allocating extra objects. This speed up a lot of simple Class-File building > cases that never go through intermediate transforms. src/java.base/share/classes/java/lang

Re: RFR: 8338765: ScheuledThreadPoolExecutor struggles with extremely long delays

2024-08-27 Thread Andrey Turbanov
On Tue, 20 Aug 2024 18:52:23 GMT, Viktor Klang wrote: > Unfortunately there is no good, deterministic reproducer which can be used as > a regression test at this point in time. There is now typo in interface name. `ScheuledThreadPoolExecutor` -> `ScheduledThreadPoolExecutor` - PR

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

2024-08-17 Thread Andrey Turbanov
On Wed, 14 Aug 2024 04:59:23 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> following new vector operators. >> >> >> . SUADD : Saturating unsigned addition. >> . SADD: Saturating signed addition. >>

Re: RFR: 8338023: Support two vector selectFrom API

2024-08-17 Thread Andrey Turbanov
On Thu, 8 Aug 2024 06:57:28 GMT, Jatin Bhateja wrote: > Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using in

Integrated: 8337839: Make a few fields in MergeCollation static

2024-08-16 Thread Andrey Turbanov
On Thu, 25 Jul 2024 08:59:17 GMT, Andrey Turbanov wrote: > 3 fields in java.text.MergeCollation could be made 'static': > 1. BITARRAYMASK > 2. BYTEPOWER > 3. BYTEMASK This pull request has now been integrated. Changeset: 60c9b5cd Author:Andrey Turbanov URL: h

Integrated: 8337840: Remove redundant null check in ObjectOutputStream.writeProxyDesc

2024-08-09 Thread Andrey Turbanov
On Fri, 26 Jul 2024 13:09:19 GMT, Andrey Turbanov wrote: > There is implicit null check in line before. > > https://github.com/openjdk/jdk/blob/431d4f7e18369466eedd00926a5162a1461d0b25/src/java.base/share/classes/java/io/ObjectOutputStream.java#L1267-L1277 > > 'cl'

Re: RFR: 8337840: Remove redundant null check in ObjectOutputStream.writeProxyDesc

2024-08-09 Thread Andrey Turbanov
On Fri, 26 Jul 2024 13:09:19 GMT, Andrey Turbanov wrote: > There is implicit null check in line before. > > https://github.com/openjdk/jdk/blob/431d4f7e18369466eedd00926a5162a1461d0b25/src/java.base/share/classes/java/io/ObjectOutputStream.java#L1267-L1277 > > 'cl'

Re: RFR: 8337838: Remove unused methods from ChronoLocalDateImpl

2024-08-06 Thread Andrey Turbanov
On Tue, 6 Aug 2024 19:46:02 GMT, Roger Riggs wrote: >> A few methods in `java.time.chrono.ChronoLocalDateImpl` are unused and could >> be removed: >> 1. plusWeeks(long) >> 2. minusYears(long) >> 3. minusMonths(long) >> 4. minusWeeks(long) >> 5. minusDays(long) >> >> Tested `test/jdk/java/time`

RFR: 8337840: Remove redundant null check in ObjectOutputStream.writeProxyDesc

2024-08-05 Thread Andrey Turbanov
There is implicit null check in line before. https://github.com/openjdk/jdk/blob/431d4f7e18369466eedd00926a5162a1461d0b25/src/java.base/share/classes/java/io/ObjectOutputStream.java#L1267-L1277 'cl' can't be null after that. - Commit messages: - [PATCH] Remove redundant null check

RFR: 8337839: Make a few fields in MergeCollation static

2024-08-05 Thread Andrey Turbanov
3 fields in java.text.MergeCollation could be made 'static': 1. BITARRAYMASK 2. BYTEPOWER 3. BYTEMASK - Commit messages: - [PATCH] Make a few fields in MergeCollation static Changes: https://git.openjdk.org/jdk/pull/20323/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=2032

RFR: 8337838: Remove unused methods from ChronoLocalDateImpl

2024-08-05 Thread Andrey Turbanov
A few methods in `java.time.chrono.ChronoLocalDateImpl` are unused and could be removed: 1. plusWeeks(long) 2. minusYears(long) 3. minusMonths(long) 4. minusWeeks(long) 5. minusDays(long) Tested `test/jdk/java/time` on Linux x64 release - Commit messages: - [PATCH] Remove unused me

Re: RFR: 8337225: Demote maxStack and maxLocals from CodeModel to CodeAttribute [v3]

2024-07-29 Thread Andrey Turbanov
On Mon, 29 Jul 2024 02:22:11 GMT, Chen Liang wrote: >> As discussed in offline meeting, the max stack and locals information are >> part of the code attribute and not meaningful for buffered code elements. >> Computation would be costly and these see no real usage during >> transformations. Th

Re: RFR: 8336754: Remodel TypeAnnotation to "has" instead of "be" an Annotation [v6]

2024-07-24 Thread Andrey Turbanov
On Wed, 24 Jul 2024 13:00:47 GMT, Chen Liang wrote: >> `TypeAnnotation` is not an annotation, as it should not be used in places >> like `AnnotationValue.ofAnnotation`. Thus it's remodeled to contain an >> annotation at a given location instead of to be an annotation. >> >> Depends on #20205.

Re: RFR: 8336847: Use pattern match switch in NumberFormat classes [v2]

2024-07-24 Thread Andrey Turbanov
On Tue, 23 Jul 2024 20:54:08 GMT, Justin Lu wrote: >> As discussed in >> https://github.com/openjdk/jdk/pull/19513#discussion_r1684957942, there is >> code within java.text.NumberFormat (and subclasses) that can use the pattern >> match switch to improve readability. >> >> As this is simply c

Re: RFR: 8315884: New Object to ObjectMonitor mapping [v9]

2024-07-19 Thread Andrey Turbanov
On Mon, 15 Jul 2024 00:50:30 GMT, Axel Boldt-Christmas wrote: >> When inflating a monitor the `ObjectMonitor*` is written directly over the >> `markWord` and any overwritten data is displaced into a displaced >> `markWord`. This is problematic for concurrent GCs which needs extra care or >> l

Re: RFR: 8336254: Virtual thread implementation + test updates

2024-07-19 Thread Andrey Turbanov
On Thu, 11 Jul 2024 17:30:21 GMT, Alan Bateman wrote: > Bringover some of the changes accumulated in the loom repo to the main line, > most of these changes are test updates and have been baking in the loom repo > for several months. The motive is partly to reduce the large set of changes > th

Re: RFR: 8336300: DateFormatSymbols#getInstanceRef returns non-cached instance [v2]

2024-07-17 Thread Andrey Turbanov
On Tue, 16 Jul 2024 16:54:09 GMT, Naoto Sato wrote: >> Removing a redundant private method, which has the same implementation with >> the public sibling and obsolete method description. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revisio

Re: [jdk23] RFR: 8334653: ISO 4217 Amendment 177 Update

2024-07-12 Thread Andrey Turbanov
On Wed, 10 Jul 2024 22:08:47 GMT, Justin Lu wrote: >Please review this PR, which is a backport of commit >[86b0cf25](https://github.com/openjdk/jdk/commit/86b0cf259fb3cbe3a1973151148e5d36c6a99d91) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. This message is kind of confusin

Re: RFR: 8335182: Consolidate and streamline String concat code shapes [v2]

2024-07-09 Thread Andrey Turbanov
On Fri, 28 Jun 2024 12:39:32 GMT, Claes Redestad wrote: >> This PR attains a speed-up on some microbenchmarks by simplifying how we >> build up the MH combinator tree shape >> (only use prependers with prefix, always add a suffix to the newArray >> combinator), then simplifying/inlining some of

Re: RFR: 8334333: MissingResourceCauseTestRun.java fails if run by root [v2]

2024-06-17 Thread Andrey Turbanov
On Tue, 18 Jun 2024 02:00:41 GMT, SendaoYan wrote: >> Hi all, >> Testcase >> `test/jdk/java/util/ResourceBundle/Control/MissingResourceCauseTestRun.java` >> run fails with root user privileged. I think it's necessary to skip this >> testcase when user is root. >> Why run the jtreg test by root

Re: RFR: 8333867: SHA3 performance can be improved [v2]

2024-06-13 Thread Andrey Turbanov
On Wed, 12 Jun 2024 14:08:43 GMT, Ferenc Rakoczi wrote: >> This PR removes some unnecessary conversions between byte arrays and long >> arrays during SHA3 digest computations. > > Ferenc Rakoczi has updated the pull request incrementally with one additional > commit since the last revision: >

Re: RFR: 8332490: JMH org.openjdk.bench.java.util.zip.InflaterInputStreams.inflaterInputStreamRead OOM

2024-05-21 Thread Andrey Turbanov
On Wed, 22 May 2024 05:16:42 GMT, Jaikiran Pai wrote: > Can I please get a review of this test-only change for addressing > https://bugs.openjdk.org/browse/JDK-8332490? > > The jmh test opens a `InflaterInputStream`, reads the stream contents, but > then doesn't close the stream. This can lead

Re: RFR: 8305457: Implement java.io.IO [v10]

2024-05-21 Thread Andrey Turbanov
On Tue, 21 May 2024 21:16:52 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 78: >> >>> 76: String line = null; >>> 77: synchronized (writeLock) { >>> 78: synchronized(readLock) { >> >> Suggestion: >> >> sy

Re: RFR: 8305457: Implement java.io.IO [v10]

2024-05-21 Thread Andrey Turbanov
On Tue, 21 May 2024 15:44:18 GMT, Pavel Rappo wrote: >> Please review this PR which introduces the `java.io.IO` top-level class and >> three methods to `java.io.Console` for [Implicitly Declared Classes and >> Instance Main Methods (Third Preview)]. >> >> This PR has been obtained as `git merg

Re: RFR: JDK-8327474 Review use of java.io.tmpdir in jdk tests [v3]

2024-03-26 Thread Andrey Turbanov
On Thu, 21 Mar 2024 17:13:46 GMT, Bill Huang wrote: >> This task addresses an essential aspect of our testing infrastructure: the >> proper handling and cleanup of temporary files and socket files created >> during test execution. The motivation behind these changes is to prevent the >> accumu

Re: RFR: JDK-8327640: Allow NumberFormat strict parsing [v2]

2024-03-19 Thread Andrey Turbanov
On Tue, 19 Mar 2024 00:07:37 GMT, Justin Lu wrote: >> Please review this PR and associated >> [CSR](https://bugs.openjdk.org/browse/JDK-8327703) which introduces strict >> parsing for NumberFormat. >> >> The concrete subclasses that will utilize this leniency value are >> `DecimalFormat` and

Re: RFR: 8327994: Update code gen in CallGeneratorHelper [v2]

2024-03-16 Thread Andrey Turbanov
l request incrementally with one additional > commit since the last revision: > > Delete extra space > > Co-authored-by: Andrey Turbanov test/jdk/java/foreign/CallGeneratorHelper.java line 195: > 193: } > 194: > 195: private static void generateStructDecl

Re: RFR: 8327839: Crash with unboxing and widening primitive conversion in switch

2024-03-16 Thread Andrey Turbanov
On Tue, 12 Mar 2024 14:06:11 GMT, Aggelos Biboudis wrote: > In cases where the compiler needs to unbox a `long`, `float`, `double` and > then run the exactness check, we were getting a crash. While the selector > value is always boxed, the type (which controls the execution flow) was not, > b

Re: RFR: JDK-8327487: Further augment WorstCaseTests with more cases [v3]

2024-03-12 Thread Andrey Turbanov
On Mon, 11 Mar 2024 17:17:21 GMT, Joe Darcy wrote: >> The atan2 and hypot cases added would fail for a particular test library >> that has errors in the millions of ulps for those inputs, rather than the >> small number of ulps specified for the error. > > Joe Darcy has updated the pull request

Re: RFR: JDK-8327487: Further augment WorstCaseTests with more cases [v2]

2024-03-11 Thread Andrey Turbanov
On Wed, 6 Mar 2024 20:49:55 GMT, Joe Darcy wrote: >> The atan2 and hypot cases added would fail for a particular test library >> that has errors in the millions of ulps for those inputs, rather than the >> small number of ulps specified for the error. > > Joe Darcy has updated the pull request

  1   2   3   4   >