Re: RFR: 8339260: Move rarely used constants out of ClassFile [v6]

2024-09-10 Thread Chen Liang
On Wed, 11 Sep 2024 03:20:54 GMT, ExE Boss wrote: >> Chen Liang has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 14 commits: >> >> - Merge branch 'master' of https://github.com/openjdk/jdk into >> fix/constant-moving >> - omissi

Re: RFR: 8299419: Thread.sleep(millis) may throw OOME [v2]

2024-09-10 Thread David Holmes
On Tue, 10 Sep 2024 21:01:24 GMT, Viktor Klang wrote: >> This PR applies @AlanBateman's patch from the JBS issue. > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Removing ThreadSleepEvent from stack trace checks If these a

Re: RFR: 8299419: Thread.sleep(millis) may throw OOME [v2]

2024-09-10 Thread Alan Bateman
On Wed, 11 Sep 2024 02:28:45 GMT, David Holmes wrote: > With regards to the nsk tests, are `beforeSleep` and `afterSleep` still > potential candidates now that it is impossible for them to throw OOME? These tests are sampling and checking for specific methods and call stacks, I don't think the

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v5]

2024-09-10 Thread Daniel Jeliński
On Tue, 10 Sep 2024 21:42:08 GMT, Magnus Ihse Bursie wrote: >> well I'm not satisfied with the answers :) I removed mswsock.lib from libnio >> dependencies >> [here](https://github.com/openjdk/jdk/blob/f57b6f13e9f375bfd2e8a05afd2b900a4d42285e/make/modules/java.base/Lib.gmk#L89) >> and the buil

Integrated: 8339810: Clean up the code in sun.tools.jar.Main to properly close resources and use ZipFile during extract

2024-09-10 Thread Jaikiran Pai
On Tue, 10 Sep 2024 05:31:29 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which proposes to address > https://bugs.openjdk.org/browse/JDK-8339810? > > As noted in the issue we have a few places in the jar's tool `Main` class > where we currently don't close the resources

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC [v2]

2024-09-10 Thread Stuart Marks
On Tue, 10 Sep 2024 19:23:16 GMT, Brent Christian wrote: >> From the bug description: >> ForceGC would be improved by moving the Reference.reachabilityFence() calls >> for 'obj' and 'ref'. >> >> Reference.reachabilityFence(obj) is currently placed after 'obj' has been >> set to null, so effect

Re: [External] : Re: [POTENTIAL BUG] Potential FIFO violation in BlockingQueue under high contention and suggestion for fair mode in ArrayBlockingQueue and LinkedBlockingQueue

2024-09-10 Thread 김민주
Hi Archie and Viktor, I apologize for the delay in my response. After further consideration, I believe my understanding aligns more closely with Interpretation B. To clarify my understanding of Interpretation B, threads waiting on a Condition (linked through ConditionNode in ConditionObject)

Re: RFR: 8339260: Move rarely used constants out of ClassFile [v6]

2024-09-10 Thread ExE Boss
On Tue, 10 Sep 2024 21:18:19 GMT, Chen Liang wrote: >> Many constants are cluttered in `ClassFile`. However, only a few of them are >> ever used by regular users, most notably `ACC_` flags and `JAVA_X_VERSION` >> constants. All other constants are specific and should live in more local >> loca

Re: RFR: 8299419: Thread.sleep(millis) may throw OOME [v2]

2024-09-10 Thread David Holmes
On Tue, 10 Sep 2024 21:01:24 GMT, Viktor Klang wrote: >> This PR applies @AlanBateman's patch from the JBS issue. > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Removing ThreadSleepEvent from stack trace checks With regar

Re: RFR: 8339714: Delete tedious bool type define

2024-09-10 Thread SendaoYan
On Mon, 9 Sep 2024 09:50:59 GMT, SendaoYan wrote: > Hi all, > This PR delete tedious bool type define in > `src/java.base/unix/native/libjsig/jsig.c` and > `src/utils/hsdis/binutils/hsdis-binutils.c`. After JEP > 347([JDK-8246032](https://bugs.openjdk.org/browse/JDK-8246032)), I think we >

Integrated: 8339714: Delete tedious bool type define

2024-09-10 Thread SendaoYan
On Mon, 9 Sep 2024 09:50:59 GMT, SendaoYan wrote: > Hi all, > This PR delete tedious bool type define in > `src/java.base/unix/native/libjsig/jsig.c` and > `src/utils/hsdis/binutils/hsdis-binutils.c`. After JEP > 347([JDK-8246032](https://bugs.openjdk.org/browse/JDK-8246032)), I think we >

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC [v2]

2024-09-10 Thread David Holmes
On Tue, 10 Sep 2024 19:23:16 GMT, Brent Christian wrote: >> From the bug description: >> ForceGC would be improved by moving the Reference.reachabilityFence() calls >> for 'obj' and 'ref'. >> >> Reference.reachabilityFence(obj) is currently placed after 'obj' has been >> set to null, so effect

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

2024-09-10 Thread Joe Darcy
On Thu, 5 Sep 2024 19:10:08 GMT, Srinivas Vamsi Parasa wrote: >> test/jdk/java/lang/Math/HyperbolicTests.java line 1009: >> >>> 1007: for(int i = 0; i < testCases.length; i++) { >>> 1008: double testCase = testCases[i]; >>> 1009: failures += testTanhWithReferenceU

Re: RFR: 8339810: Clean up the code in sun.tools.jar.Main to properly close resources and use ZipFile during extract [v2]

2024-09-10 Thread Jaikiran Pai
On Tue, 10 Sep 2024 06:17:39 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8339810? >> >> As noted in the issue we have a few places in the jar's tool `Main` class >> where we currently don't close the reso

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

2024-09-10 Thread Srinivas Vamsi Parasa
On Tue, 10 Sep 2024 16:26:38 GMT, Sandhya Viswanathan wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update libm tanh reference test with code review suggestions > > src/hotspot/cpu/x86/c1_LIRGenerator_x

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

2024-09-10 Thread Srinivas Vamsi Parasa
> 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 Srinivas Vamsi Parasa has updated the pull request incrementally with

RFR: 8339875: MethodTypeDesc to reuse descriptor string from MethodType

2024-09-10 Thread Chen Liang
A micro-optimization by sharing compatible String objects from MethodType (which itself is already deduplicated in a cache) to the generated MethodTypeDesc. This very slightly improves hashing performance by avoiding some string creation, hashing, and fast path equality via identity. --

Re: RFR: 8339803: Acknowledge case insensitive unambiguous keywords in tzdata files [v2]

2024-09-10 Thread Naoto Sato
On Tue, 10 Sep 2024 22:53:15 GMT, Justin Lu wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> tz files aligned with the default TzdbZoneRulesProvider list > > Looks good to me Thanks, @justin-curtis-lu. @coffeys, woul

Re: RFR: 8339803: Acknowledge case insensitive unambiguous keywords in tzdata files [v2]

2024-09-10 Thread Justin Lu
On Tue, 10 Sep 2024 22:39:38 GMT, Naoto Sato wrote: >> make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java line 1375: >> >>> 1373: Files.walk(Path.of(tzDataDir), 1, >>> FileVisitOption.FOLLOW_LINKS) >>> 1374: .filter(p -> p.toFile().isFile()) >>> 1375:

Re: RFR: 8339803: Acknowledge case insensitive unambiguous keywords in tzdata files [v2]

2024-09-10 Thread Justin Lu
On Tue, 10 Sep 2024 22:42:37 GMT, Naoto Sato wrote: >> This is a follow on fix to >> [JDK-8339644](https://bugs.openjdk.org/browse/JDK-8339644). It turned out >> that TZ data files allow abbreviation of keywords, such as "ZO" for "Zone." >> Same fix, i.e, replacing `startsWith()` with `regionM

Re: RFR: 8339803: Acknowledge case insensitive unambiguous keywords in tzdata files [v2]

2024-09-10 Thread Naoto Sato
On Tue, 10 Sep 2024 22:17:51 GMT, Justin Lu wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> tz files aligned with the default TzdbZoneRulesProvider list > > make/jdk/src/classes/build/tools/cldrconverter/CLDRConverte

Re: RFR: 8339803: Acknowledge case insensitive unambiguous keywords in tzdata files [v2]

2024-09-10 Thread Naoto Sato
> This is a follow on fix to > [JDK-8339644](https://bugs.openjdk.org/browse/JDK-8339644). It turned out > that TZ data files allow abbreviation of keywords, such as "ZO" for "Zone." > Same fix, i.e, replacing `startsWith()` with `regionMatches()` was applied. Naoto Sato has updated the pull re

Re: RFR: 8339803: Acknowledge case insensitive unambiguous keywords in tzdata files

2024-09-10 Thread Justin Lu
On Tue, 10 Sep 2024 19:45:01 GMT, Naoto Sato wrote: > This is a follow on fix to > [JDK-8339644](https://bugs.openjdk.org/browse/JDK-8339644). It turned out > that TZ data files allow abbreviation of keywords, such as "ZO" for "Zone." > Same fix, i.e, replacing `startsWith()` with `regionMatch

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-09-10 Thread Magnus Ihse Bursie
On Tue, 10 Sep 2024 13:51:55 GMT, Josef Eisl wrote: >> Magnus Ihse Bursie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Also update build to link properly > > src/java.desktop/unix/native/libawt/awt/awt_LoadLibrary.c line 135: > >> 13

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v5]

2024-09-10 Thread Magnus Ihse Bursie
On Tue, 10 Sep 2024 15:15:26 GMT, Daniel Jeliński wrote: >> I believe this question has already been answered >> [here](https://github.com/openjdk/jdk/pull/20317/files#r1707599113). > > well I'm not satisfied with the answers :) I removed mswsock.lib from libnio > dependencies > [here](https:/

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

2024-09-10 Thread Sandhya Viswanathan
On Thu, 5 Sep 2024 19:10:34 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: 8339834: Replace usages of -mx and -ms in some tests [v2]

2024-09-10 Thread David Holmes
On Tue, 10 Sep 2024 11:10:38 GMT, Jaikiran Pai wrote: >> Can I please get a review of this trivial change which replaces the usages >> of `-mx` and `-ms` to `-Xmx` and `-Xms` in tests and in one code comment? >> >> As noted in https://bugs.openjdk.org/browse/JDK-8339834, these options are >> o

Re: RFR: 8339789: Use index and definition tags in AnnotatedElement

2024-09-10 Thread Joe Darcy
On Tue, 10 Sep 2024 20:03:46 GMT, Chen Liang wrote: > Just curious, if we have `{@index "type annotation"}`, does a search for > `type annotation` in Javadoc search bar still work? Yes; Javadoc search is fine returning multiple results. They are grouped by category with search terms like this

Re: RFR: 8339260: Move rarely used constants out of ClassFile [v6]

2024-09-10 Thread Chen Liang
> Many constants are cluttered in `ClassFile`. However, only a few of them are > ever used by regular users, most notably `ACC_` flags and `JAVA_X_VERSION` > constants. All other constants are specific and should live in more local > locations, such as getters that return these constants. > > T

Re: RFR: 8299419: Thread.sleep(millis) may throw OOME [v2]

2024-09-10 Thread Viktor Klang
> This PR applies @AlanBateman's patch from the JBS issue. Viktor Klang has updated the pull request incrementally with one additional commit since the last revision: Removing ThreadSleepEvent from stack trace checks - Changes: - all: https://git.openjdk.org/jdk/pull/20923/file

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-10 Thread Brent Christian
On Sat, 7 Sep 2024 00:59:25 GMT, Stuart Marks wrote: >> From the bug description: >> ForceGC would be improved by moving the Reference.reachabilityFence() calls >> for 'obj' and 'ref'. >> >> Reference.reachabilityFence(obj) is currently placed after 'obj' has been >> set to null, so effectivel

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC [v2]

2024-09-10 Thread Brent Christian
On Tue, 10 Sep 2024 19:23:16 GMT, Brent Christian wrote: >> From the bug description: >> ForceGC would be improved by moving the Reference.reachabilityFence() calls >> for 'obj' and 'ref'. >> >> Reference.reachabilityFence(obj) is currently placed after 'obj' has been >> set to null, so effect

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

2024-09-10 Thread Lance Andersen
On Sun, 8 Sep 2024 14:39:06 GMT, Eirik Bjørsnøs wrote: > Please review this cleanup PR which makes `ZipFile.Source.initCEN` not > include the 22-byte trailing`END` header when reading the `CEN` section of > the ZIP file. > > The reading of the END header was probably brought over from native c

Re: RFR: 8339789: Use index and definition tags in AnnotatedElement

2024-09-10 Thread Chen Liang
On Mon, 9 Sep 2024 18:37:47 GMT, Joe Darcy wrote: > Use index and definition tags in AnnotatedElement. Just curious, if we have `{@index "type annotation"}`, does a search for `type annotation` in Javadoc search bar still work? - PR Comment: https://git.openjdk.org/jdk/pull/20919#

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v5]

2024-09-10 Thread Brian Burkhalter
On Tue, 10 Sep 2024 11:06:28 GMT, Daniel Jeliński wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8337143: Remove loading libnet from Inet6AddressImpl; delete commented out >> #include in Windows IOUtil.c > >

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry

2024-09-10 Thread Claes Redestad
On Tue, 10 Sep 2024 18:35:52 GMT, Eirik Bjørsnøs wrote: > Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lo

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v6]

2024-09-10 Thread Brian Burkhalter
> This proposed change would move the native objects required for NIO file > interaction from the libnio native library to the libjava native library on > Linux, macOS, and Windows. Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The pull request

RFR: 8339803: Acknowledge case insensitive unambiguous keywords in tzdata files

2024-09-10 Thread Naoto Sato
This is a follow on fix to [JDK-8339644](https://bugs.openjdk.org/browse/JDK-8339644). It turned out that TZ data files allow abbreviation of keywords, such as "ZO" for "Zone." Same fix, i.e, replacing `startsWith()` with `regionMatches()` was applied. - Commit messages: - initial

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry

2024-09-10 Thread Lance Andersen
On Tue, 10 Sep 2024 18:35:52 GMT, Eirik Bjørsnøs wrote: > Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lo

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry

2024-09-10 Thread Claes Redestad
On Tue, 10 Sep 2024 18:35:52 GMT, Eirik Bjørsnøs wrote: > Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lo

Integrated: 8339789: Use index and definition tags in AnnotatedElement

2024-09-10 Thread Joe Darcy
On Mon, 9 Sep 2024 18:37:47 GMT, Joe Darcy wrote: > Use index and definition tags in AnnotatedElement. This pull request has now been integrated. Changeset: 6fd043f1 Author:Joe Darcy URL: https://git.openjdk.org/jdk/commit/6fd043f1e4423b61cb5b85af9380f75e6a3846a2 Stats: 7 lines

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry

2024-09-10 Thread Claes Redestad
On Tue, 10 Sep 2024 18:35:52 GMT, Eirik Bjørsnøs wrote: > Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lo

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC [v2]

2024-09-10 Thread Brent Christian
> From the bug description: > ForceGC would be improved by moving the Reference.reachabilityFence() calls > for 'obj' and 'ref'. > > Reference.reachabilityFence(obj) is currently placed after 'obj' has been set > to null, so effectively does nothing. It should occur before obj = null; > > For R

Re: RFR: 8339810: Clean up the code in sun.tools.jar.Main to properly close resources and use ZipFile during extract [v2]

2024-09-10 Thread Lance Andersen
On Tue, 10 Sep 2024 06:17:39 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to address >> https://bugs.openjdk.org/browse/JDK-8339810? >> >> As noted in the issue we have a few places in the jar's tool `Main` class >> where we currently don't close the reso

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Mark Sheppard
On Tue, 10 Sep 2024 18:38:15 GMT, Aleksei Efimov wrote: >> I think 2 times is good, remove all potential noise ;-) >> >> the following failures is nearly twice the expected >> >> --System.out:(3/73)-- >> Skip local DNS Server creation >> Elapsed (ms): 14229 >> Expected (ms): 77

RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry

2024-09-10 Thread Eirik Bjørsnøs
Please review this PR which speeds up `ZipFile.getZipEntry` by removing slash-checking logic which is already taking place during lookup in `ZipFile.Source.getEntryPos`. `ZipFile.Source.getEntryPos` includes logic to match a lookup for "name" against a directory entry "name/" (with a trailing

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Aleksei Efimov
On Tue, 10 Sep 2024 14:47:26 GMT, Daniel Fuchs wrote: >> src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsClient.java line 443: >> >>> 441: // integer overflow (timeout is an int). >>> 442: // no point in supporting timeout > Integer.MAX_VALUE, >>> clamp if n

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Aleksei Efimov
On Tue, 10 Sep 2024 18:15:34 GMT, Mark Sheppard wrote: >> I don't think it is a rabbit hole, to provide some additional clarity on the >> timeout mechanism and to avoid any perception that it has absolute realtime >> timeout semantics, such that developers have precise view of how the >> mecha

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Aleksei Efimov
On Tue, 10 Sep 2024 14:54:58 GMT, Daniel Fuchs wrote: >> Aleksei Efimov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Measure time the caller spent waiting. Simplify timeoutLeft computation > > src/jdk.naming.dns/share/classes/com/sun/

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Aleksei Efimov
On Tue, 10 Sep 2024 17:54:30 GMT, Mark Sheppard wrote: >> If I'm not mistaken here it's `Math.clamp(long, long, long)` which is >> called - because `timeout * (1L << retry)` is a long. We could make it more >> obvious by using `0L` instead of `0` too. > > thanks for the clarification ... yes i

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v6]

2024-09-10 Thread Aleksei Efimov
> This PR proposes the following changes to address wrong timeout computations > in the `com.sun.jndi.dns.DnsClient`: > - The `DnsClient` has been updated to use a monotonic high-resolution (nano) > clock. The existing `Timeout` test has also been updated to use the nano > clock to measure obser

Re: RFR: 8328821: Map.of() derived view collection mutators should throw UnsupportedOperationException [v7]

2024-09-10 Thread Liam Miller-Cushon
On Tue, 9 Jul 2024 23:17:47 GMT, Liam Miller-Cushon wrote: >> This change overrides mutator methods in the implementation returned by >> `Map.of().entrySet()` to throw `UnsupportedOperationException`. > > Liam Miller-Cushon has updated the pull request incrementally with one > additional commit

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Mark Sheppard
On Tue, 10 Sep 2024 17:50:59 GMT, Mark Sheppard wrote: >> I don't think we want to go down the rabbit hole of documenting too much. >> Agreed that using a simple factor 2 would make the code simpler, but do we >> want to go that high? > > I don't think it is a rabbit hole, to provide some addit

Re: RFR: 8339789: Use index and definition tags in AnnotatedElement

2024-09-10 Thread Pavel Rappo
On Mon, 9 Sep 2024 18:37:47 GMT, Joe Darcy wrote: > Use index and definition tags in AnnotatedElement. Marked as reviewed by prappo (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/20919#pullrequestreview-2293347006

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v5]

2024-09-10 Thread Brian Burkhalter
On Tue, 10 Sep 2024 17:33:22 GMT, Alan Bateman wrote: > or truncating in the case of FOS For that matter, I don't see where truncation is explicitly mentioned in the FOS doc. - PR Review Comment: https://git.openjdk.org/jdk/pull/20878#discussion_r1752446236

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Mark Sheppard
On Tue, 10 Sep 2024 14:44:35 GMT, Daniel Fuchs wrote: >> src/jdk.naming.dns/share/classes/com/sun/jndi/dns/DnsClient.java line 442: >> >>> 440: // use 1L below to ensure conversion to long and avoid >>> potential >>> 441: // integer overflow (timeout is an int).

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Mark Sheppard
On Tue, 10 Sep 2024 14:59:44 GMT, Daniel Fuchs wrote: >> test/jdk/com/sun/jndi/dns/ConfigTests/Timeout.java line 112: >> >>> 110: // Check that elapsed time is as long as expected, and >>> 111: // not more than 67% greater. Given the min DNS timeout >>> 112: /

RFR: 8338747: hasIncubatorModules needs to be generated when module resolution required at startup

2024-09-10 Thread Alan Bateman
This PR proposes changes to the ModuleBootstrap code that is used with CDS (Ahead-of-Time Class Loading & Linking in the future). At things stand, the module graph and boot layer can be archived at dump time (-Xshare:dump) when the initial module is the class path or the initial module is in the

Re: RFR: 8339686: java/foreign/TestMappedHandshake.java fails with assert(depth < max_critical_stack_depth) failed: can't have more than 10 critical frames [v3]

2024-09-10 Thread Alan Bateman
On Mon, 9 Sep 2024 21:11:32 GMT, Maurizio Cimadamore wrote: >> The new test added by https://github.com/openjdk/jdk/pull/20854 fails >> spuriously. >> While JNI lookup is now moved into the static initializer of the >> `MappedMemoryUtils` class, this class might only get initialized while in

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v5]

2024-09-10 Thread Alan Bateman
On Mon, 9 Sep 2024 19:22:19 GMT, Brian Burkhalter wrote: >> Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and >> `isHidden` behave when the `File` represents a symbolic link. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit sin

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module [v13]

2024-09-10 Thread Nizar Benalla
On Tue, 10 Sep 2024 16:45:23 GMT, Nizar Benalla wrote: >> This checker checks the values of the `@since` tag found in the >> documentation comment for an element against the release in which the >> element first appeared. >> >> Real since value of an API element is computed as the oldest relea

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module [v13]

2024-09-10 Thread Nizar Benalla
> This checker checks the values of the `@since` tag found in the documentation > comment for an element against the release in which the element first > appeared. > > Real since value of an API element is computed as the oldest release in which > the given API element was introduced. That is:

RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-10 Thread sbgoog
FIleSystemPreferences.lockFile() catches an InterruptedException and just returns false, forgetting to re-interrupt the current thread. This leaves the caller with no way to observe that the thread was interrupted. This change restores the interrupted status on the current thread before returnin

Re: RFR: 8331051: Add an `@since` checker test for `java.base` module [v12]

2024-09-10 Thread Nizar Benalla
> This checker checks the values of the `@since` tag found in the documentation > comment for an element against the release in which the element first > appeared. > > Real since value of an API element is computed as the oldest release in which > the given API element was introduced. That is:

Re: RFR: 8336881: [Linux] Support for hierarchical limits for Metrics [v7]

2024-09-10 Thread Severin Gehwolf
> Please review this fix for cgroups-based metrics reporting in the > `jdk.internal.platform` package. This fix is supposed to address wrong > reporting of certain limits if the limits aren't set at the leaf nodes. > > For example, on cg v2, the memory limit interface file is `memory.max`. > Co

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v5]

2024-09-10 Thread Daniel Jeliński
On Tue, 10 Sep 2024 13:30:05 GMT, Magnus Ihse Bursie wrote: >> make/modules/java.base/lib/CoreLibraries.gmk line 71: >> >>> 69: -framework Foundation \ >>> 70: -framework SystemConfiguration, \ >>> 71: LIBS_windows := advapi32.lib mswsock.lib ole32.lib shell32.lib >>> versio

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Daniel Fuchs
On Tue, 10 Sep 2024 09:49:08 GMT, Mark Sheppard wrote: >> Aleksei Efimov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Measure time the caller spent waiting. Simplify timeoutLeft computation > > test/jdk/com/sun/jndi/dns/ConfigTests/Ti

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Daniel Fuchs
On Mon, 9 Sep 2024 22:29:23 GMT, Aleksei Efimov wrote: >> This PR proposes the following changes to address wrong timeout computations >> in the `com.sun.jndi.dns.DnsClient`: >> - The `DnsClient` has been updated to use a monotonic high-resolution (nano) >> clock. The existing `Timeout` test ha

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Daniel Fuchs
On Tue, 10 Sep 2024 08:39:15 GMT, Daniel Jeliński wrote: >> Aleksei Efimov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Measure time the caller spent waiting. Simplify timeoutLeft computation > > src/jdk.naming.dns/share/classes/com/s

Re: RFR: 8339538: Wrong timeout computations in DnsClient [v5]

2024-09-10 Thread Daniel Fuchs
On Tue, 10 Sep 2024 09:38:35 GMT, Mark Sheppard wrote: >> Aleksei Efimov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Measure time the caller spent waiting. Simplify timeoutLeft computation > > src/jdk.naming.dns/share/classes/com/sun

Re: RFR: 8336881: [Linux] Support for hierarchical limits for Metrics [v6]

2024-09-10 Thread Severin Gehwolf
On Thu, 5 Sep 2024 13:25:17 GMT, Severin Gehwolf wrote: >> Please review this fix for cgroups-based metrics reporting in the >> `jdk.internal.platform` package. This fix is supposed to address wrong >> reporting of certain limits if the limits aren't set at the leaf nodes. >> >> For example, o

Re: RFR: 8338768: Introduce runtime lookup to check for static builds [v2]

2024-09-10 Thread Josef Eisl
On Wed, 21 Aug 2024 22:14:40 GMT, Magnus Ihse Bursie wrote: >> As a preparation for Hermetic Java, we need to have a way to look up during >> runtime if we are using a statically linked library or not. >> >> This change will be the first step needed towards compiling the object files >> only o

Re: Where to ask about a potential bug/oversight with hidden classes

2024-09-10 Thread Chen Liang
Hi Matias, Since MethodHandles is a library API, I think we can discuss about this on core-libs list. About the self-reference replacement: as the spec says, it only happens to the thisClass Class entry in the hidden class. That means if the class is referenced in a method (such as a method's p

Integrated: 8339799: Reduce work done in j.l.invoke bytecode generators

2024-09-10 Thread Claes Redestad
On Mon, 9 Sep 2024 22:53:28 GMT, Claes Redestad wrote: > Misc improvements to InnerClassLambdaMetafactory and InvokerBytecodeGenerator: > - Define `ClassEntry` early, use it when profitable (there are some warts in > the API where using `ce.name(), ce.type()` in a few places means we drop the >

Re: RFR: 8339799: Reduce work done in j.l.invoke bytecode generators

2024-09-10 Thread Claes Redestad
On Tue, 10 Sep 2024 13:28:55 GMT, Chen Liang wrote: > After all, this patch will still be valid with ClassEntry hash updates. Thanks for checking and reviewing! - PR Comment: https://git.openjdk.org/jdk/pull/20925#issuecomment-2340800697

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v5]

2024-09-10 Thread Magnus Ihse Bursie
On Tue, 10 Sep 2024 09:56:26 GMT, Daniel Jeliński wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8337143: Remove loading libnet from Inet6AddressImpl; delete commented out >> #include in Windows IOUtil.c > >

Re: RFR: 8333446: Add tests for hierarchical container support [v10]

2024-09-10 Thread Zdenek Zambersky
On Tue, 10 Sep 2024 13:23:45 GMT, Severin Gehwolf wrote: >> Please review this PR which adds test support for systemd slices so that >> bugs like [JDK-8217338](https://bugs.openjdk.org/browse/JDK-8217338) can be >> verified. The added test, `SystemdMemoryAwarenessTest` currently passes on >> c

Re: RFR: 8339799: Reduce work done in j.l.invoke bytecode generators

2024-09-10 Thread Chen Liang
On Mon, 9 Sep 2024 22:53:28 GMT, Claes Redestad wrote: > Misc improvements to InnerClassLambdaMetafactory and InvokerBytecodeGenerator: > - Define `ClassEntry` early, use it when profitable (there are some warts in > the API where using `ce.name(), ce.type()` in a few places means we drop the >

Re: RFR: 8333446: Add tests for hierarchical container support [v6]

2024-09-10 Thread Severin Gehwolf
On Fri, 30 Aug 2024 11:05:24 GMT, Matthias Baesken 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 10 additional >> co

Re: RFR: 8333446: Add tests for hierarchical container support [v6]

2024-09-10 Thread Zdenek Zambersky
On Tue, 10 Sep 2024 13:23:37 GMT, Severin Gehwolf wrote: >> Looking through the coding it looks more or less okay to me; but if you >> really need to run it under user 'root' I think we will not have so much >> use for this in our test environments because we use other test users. >> Not sayi

Re: RFR: 8339704: Refactor StringConcatHelper simpleConcat [v6]

2024-09-10 Thread Shaojin Wen
On Tue, 10 Sep 2024 10:28:56 GMT, Claes Redestad wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> more 2 arguments simple concat > > src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line > 529:

Re: RFR: 8333446: Add tests for hierarchical container support [v10]

2024-09-10 Thread Severin Gehwolf
> Please review this PR which adds test support for systemd slices so that bugs > like [JDK-8217338](https://bugs.openjdk.org/browse/JDK-8217338) can be > verified. The added test, `SystemdMemoryAwarenessTest` currently passes on > cgroups v1 and fails on cgroups v2 due to the way how > [JDK-82

Re: RFR: 8339704: Refactor StringConcatHelper simpleConcat [v7]

2024-09-10 Thread Shaojin Wen
> The string concatenation of the java.base module is implemented using > StringBuilder. By providing a series of concat methods in StringConcatHelper, > it is used in the java.lang package to replace string concatenation. > > These concat methods can also be exposed through JLA for use by other

Integrated: 8339677: [vectorapi] YYYXXXVector::withLaneHelper and laneHelper should use Double::doubleToRawLongBits/Float::floatToRawIntBits

2024-09-10 Thread Quan Anh Mai
On Fri, 6 Sep 2024 18:31:00 GMT, Quan Anh Mai wrote: > Hi, > > This patch fixes an issue where we mistakenly use `Double::doubleToLongBits` > in `DoubleXXXVector::withLaneHelper` and `DoubleXXXVector::laneHelper`. We > should use the raw bit version instead. > > Please kindly review, thanks v

Re: RFR: 8339714: Delete tedious bool type define

2024-09-10 Thread duke
On Mon, 9 Sep 2024 09:50:59 GMT, SendaoYan wrote: > Hi all, > This PR delete tedious bool type define in > `src/java.base/unix/native/libjsig/jsig.c` and > `src/utils/hsdis/binutils/hsdis-binutils.c`. After JEP > 347([JDK-8246032](https://bugs.openjdk.org/browse/JDK-8246032)), I think we >

Re: RFR: 8339714: Delete tedious bool type define

2024-09-10 Thread SendaoYan
On Mon, 9 Sep 2024 09:50:59 GMT, SendaoYan wrote: > Hi all, > This PR delete tedious bool type define in > `src/java.base/unix/native/libjsig/jsig.c` and > `src/utils/hsdis/binutils/hsdis-binutils.c`. After JEP > 347([JDK-8246032](https://bugs.openjdk.org/browse/JDK-8246032)), I think we >

Integrated: 8339837: Remove unused BootstrapMethodsInvokers.isLambdaMetafactoryCondyBSM

2024-09-10 Thread Claes Redestad
On Tue, 10 Sep 2024 10:58:19 GMT, Claes Redestad wrote: > Trivially remove a static optimization mapping for a non-existent method in > LambdaMetafactory. The referenced method was refactored into a set of factory > methods in java.lang.invoke.ConstantBootstraps before ever becoming a public >

Integrated: 8338930: StringConcatFactory hardCoded string concatenation strategy

2024-09-10 Thread Shaojin Wen
On Thu, 22 Aug 2024 11:50:02 GMT, Shaojin Wen wrote: > This is a follow-up to PR #20273, which improves performance when the number > of parameters exceeds 20. > > When the number of parameters is large, the possibility of reuse will be > lower, so we can use the static concat method and write

Re: RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy [v11]

2024-09-10 Thread Claes Redestad
On Mon, 9 Sep 2024 01:53:01 GMT, Shaojin Wen wrote: >> This is a follow-up to PR #20273, which improves performance when the number >> of parameters exceeds 20. >> >> When the number of parameters is large, the possibility of reuse will be >> lower, so we can use the static concat method and w

Re: RFR: 8339837: Remove unused BootstrapMethodsInvokers.isLambdaMetafactoryCondyBSM

2024-09-10 Thread Claes Redestad
On Tue, 10 Sep 2024 11:41:43 GMT, Jorn Vernee wrote: >> Trivially remove a static optimization mapping for a non-existent method in >> LambdaMetafactory. The referenced method was refactored into a set of >> factory methods in java.lang.invoke.ConstantBootstraps before ever becoming >> a publi

Re: RFR: 8333446: Add tests for hierarchical container support [v9]

2024-09-10 Thread Severin Gehwolf
On Tue, 10 Sep 2024 12:12:50 GMT, Zdenek Zambersky wrote: > I have just added `cpu` to Delegate list of `user@.service`, looks similar, > to what is done there. I see use of `Delegate=yes` in your link, that > probably delegates all. > Thanks for this link. FWIW, I was able to reproduce what y

Re: RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy [v11]

2024-09-10 Thread duke
On Mon, 9 Sep 2024 01:53:01 GMT, Shaojin Wen wrote: >> This is a follow-up to PR #20273, which improves performance when the number >> of parameters exceeds 20. >> >> When the number of parameters is large, the possibility of reuse will be >> lower, so we can use the static concat method and w

Re: RFR: 8333446: Add tests for hierarchical container support [v9]

2024-09-10 Thread Zdenek Zambersky
On Mon, 9 Sep 2024 17:28:16 GMT, Zdenek Zambersky 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 17 additional >> com

Integrated: 8338526: Don't store abstract and interface Klasses in class metaspace

2024-09-10 Thread Coleen Phillimore
On Thu, 9 May 2024 13:51:09 GMT, Coleen Phillimore wrote: > This change stores InstanceKlass for interface and abstract classes in the > non-class metaspace, since class metaspace will have limits on number of > classes that can be represented when Lilliput changes go in. Classes that > have

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v6]

2024-09-10 Thread Coleen Phillimore
On Fri, 6 Sep 2024 16:20:52 GMT, Coleen Phillimore wrote: >> This change stores InstanceKlass for interface and abstract classes in the >> non-class metaspace, since class metaspace will have limits on number of >> classes that can be represented when Lilliput changes go in. Classes that >> h

Re: RFR: 8339837: Remove unused BootstrapMethodsInvokers.isLambdaMetafactoryCondyBSM

2024-09-10 Thread Jorn Vernee
On Tue, 10 Sep 2024 10:58:19 GMT, Claes Redestad wrote: > Trivially remove a static optimization mapping for a non-existent method in > LambdaMetafactory. The referenced method was refactored into a set of factory > methods in java.lang.invoke.ConstantBootstraps before ever becoming a public >

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v5]

2024-09-10 Thread Daniel Jeliński
On Fri, 9 Aug 2024 17:59:12 GMT, Brian Burkhalter wrote: >> This proposed change would move the native objects required for NIO file >> interaction from the libnio native library to the libjava native library on >> Linux, macOS, and Windows. > > Brian Burkhalter has updated the pull request inc

Re: RFR: 8339834: Replace usages of -mx and -ms in some tests [v2]

2024-09-10 Thread David Holmes
On Tue, 10 Sep 2024 11:07:30 GMT, Jaikiran Pai wrote: >> Can I please get a review of this trivial change which replaces the usages >> of `-mx` and `-ms` to `-Xmx` and `-Xms` in tests and in one code comment? >> >> As noted in https://bugs.openjdk.org/browse/JDK-8339834, these options are >> o

Re: RFR: 8339834: Replace usages of -mx and -ms in some tests [v2]

2024-09-10 Thread Jaikiran Pai
> Can I please get a review of this trivial change which replaces the usages of > `-mx` and `-ms` to `-Xmx` and `-Xms` in tests and in one code comment? > > As noted in https://bugs.openjdk.org/browse/JDK-8339834, these options are > outdated and support for them will soon be deprecated and remo

RFR: 8339837: Remove unused BootstrapMethodsInvokers.isLambdaMetafactoryCondyBSM

2024-09-10 Thread Claes Redestad
Trivially remove a static optimization mapping for a non-existent method in LambdaMetafactory. The referenced method was refactored into a set of factory methods in java.lang.invoke.ConstantBootstraps before ever becoming a public API. - Commit messages: - Remove unused BootstrapM

  1   2   >