Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Alan Bateman
On Tue, 25 Jul 2023 02:09:29 GMT, Brian Burkhalter wrote: > It's based on micro-benchmarks. Having the loops in Java reduces throughput > but allocating memory using `malloc(len)` also reduces throughput as `len` > gets larger and this threshold appears to balance the two. Are these micro

Re: RFR: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked

2023-07-24 Thread Alan Bateman
On Tue, 25 Jul 2023 05:21:45 GMT, David Holmes wrote: > Why handle TIMED this way instead of just making TIMED_PARKED/PARKING states? Been there but it is 3 additional states and a lot simpler to just use the additional state bits, like we do with SUSPENDED. We might use another one for

Re: RFR: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked

2023-07-24 Thread David Holmes
On Fri, 21 Jul 2023 18:01:45 GMT, Alan Bateman wrote: > Thread::getState is an API for monitoring and management purposes to report > the thread state. If a virtual thread is parked with LockSupport.parkNanos, > its state is reported as WAITING when it should be TIMED_WAITING. JVM TI >

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Brian Burkhalter
On Mon, 24 Jul 2023 13:16:56 GMT, Alan Bateman wrote: >> Limit native memory allocation and move write loop from the native layer >> into Java. This change should make the OOME reported in the issue much less >> likely. > > src/java.base/share/native/libjava/io_util.c line 62: > >> 60: /* The

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Brian Burkhalter
On Mon, 24 Jul 2023 12:59:55 GMT, Alan Bateman wrote: >> Limit native memory allocation and move write loop from the native layer >> into Java. This change should make the OOME reported in the issue much less >> likely. > > src/java.base/share/classes/java/io/FileOutputStream.java line 366: >

Withdrawn: 8312486: Allow abstract classes for MethodHandleProxies::asInterfaceInstance

2023-07-24 Thread Chen Liang
On Thu, 20 Jul 2023 23:50:04 GMT, Chen Liang wrote: > With the reimplementation of MHP.asIFInstance, now it can easily adapt to > abstract classes as well. Repurposed PublicMethods from java.lang to track > method inheritance for MHP to reduce redundancies. This pull request has been closed

Re: RFR: 8306582: Remove MetaspaceShared::exit_after_static_dump()

2023-07-24 Thread Matias Saavedra Silva
On Mon, 17 Jul 2023 16:55:03 GMT, Ioi Lam wrote: >> Currently we exit the VM after static dumping with >> `MetaspaceShared::exit_after_static_dump()`. >> >> >> // We have finished dumping the static archive. At this point, there may be >> pending VM >> // operations. We have changed some

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Brian Burkhalter
I think the idea is to treat an IOException thrown by any but the first invocation of readBytes() as equivalent to end-of-file such as described for InputStream::read(byte[],int,int)

Re: RFR: 8311653: Modify -XshowSettings launcher behavior

2023-07-24 Thread Roger Riggs
On Mon, 24 Jul 2023 16:00:52 GMT, Sean Coffey wrote: > Modify the -XshowSettings launcher option to print non-verbose settings > details of all components by default. Verbose settings details will be > printed via the -XshowSettings:all option. Modify the -XshowSettings option > to reject bad

Re: RFR: 8311653: Modify -XshowSettings launcher behavior

2023-07-24 Thread Mandy Chung
On Mon, 24 Jul 2023 16:00:52 GMT, Sean Coffey wrote: > Modify the -XshowSettings launcher option to print non-verbose settings > details of all components by default. Verbose settings details will be > printed via the -XshowSettings:all option. Modify the -XshowSettings option > to reject bad

RFR: 8312498: Thread::getState and JVM TI GetThreadState should return TIMED_WAITING virtual thread is timed parked

2023-07-24 Thread Alan Bateman
Thread::getState is an API for monitoring and management purposes to report the thread state. If a virtual thread is parked with LockSupport.parkNanos, its state is reported as WAITING when it should be TIMED_WAITING. JVM TI GetThreadState has the same issue in that it returns

Re: RFR: 8311653: Modify -XshowSettings launcher behavior

2023-07-24 Thread Alan Bateman
On Mon, 24 Jul 2023 16:00:52 GMT, Sean Coffey wrote: > Modify the -XshowSettings launcher option to print non-verbose settings > details of all components by default. Verbose settings details will be > printed via the -XshowSettings:all option. Modify the -XshowSettings option > to reject bad

Re: RFR: 8312488: tools/jpackage/share/AppLauncherEnvTest.java fails with dynamically linked libstdc++ [v2]

2023-07-24 Thread Alexander Matveev
On Sat, 22 Jul 2023 21:41:06 GMT, Vladimir Petko wrote: >> Use the same approach as Logger::defaultLogger() to ensure that the >> appender is not destroyed before shared object destructor function is >> executed. >> >> The alternative is to delete dcon() function, but we might run into a >>

Re: RFR: 8312488: tools/jpackage/share/AppLauncherEnvTest.java fails with dynamically linked libstdc++ [v2]

2023-07-24 Thread Alexey Semenyuk
On Sat, 22 Jul 2023 21:41:06 GMT, Vladimir Petko wrote: >> Use the same approach as Logger::defaultLogger() to ensure that the >> appender is not destroyed before shared object destructor function is >> executed. >> >> The alternative is to delete dcon() function, but we might run into a >>

Integrated: 8310530: PipedOutputStream.flush() accesses sink racily

2023-07-24 Thread Sergey Tsypanov
On Wed, 21 Jun 2023 14:01:33 GMT, Sergey Tsypanov wrote: > Just a tiny clean-up to remove racy read within synchronized method This pull request has now been integrated. Changeset: d8f2e9ae Author:Sergey Tsypanov Committer: Brian Burkhalter URL:

Integrated: 8311631: When multiple users run tools/jpackage/share/LicenseTest.java, Permission denied for writing /var/tmp/*.files

2023-07-24 Thread yaqsun
On Fri, 7 Jul 2023 09:51:23 GMT, yaqsun wrote: > The prerequisite is to install the rpmbuild command, when multiple users > switch to write /var/tmp/*.files will have the permission forbidden. This pull request has now been integrated. Changeset: fac9f88c Author:sunyaqi Committer: Alexey

RFR: 8311653: Modify -XshowSettings launcher behavior

2023-07-24 Thread Sean Coffey
Modify the -XshowSettings launcher option to print non-verbose settings details of all components by default. Verbose settings details will be printed via the -XshowSettings:all option. Modify the -XshowSettings option to reject bad values passed to it. Print an error message in such scenarios

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Bernd
If you return the short buffer (on IOException), does it need to cache the pending exception or can you just rely on the next read hitting that underlying exception again? (Is there an actual guarantee somewhere that the read position is not altered on IOExceptions or

Re: RFR: 8298095: Refine implSpec for SegmentAllocator [v2]

2023-07-24 Thread Maurizio Cimadamore
On Mon, 24 Jul 2023 13:32:58 GMT, Per Minborg wrote: >> This PR suggests refining the `@implSpec` for the SegmentAllocator::allocate >> methods as well as clarifying the docs a bit more. Also, a local variable is >> renamed. > > Per Minborg has updated the pull request incrementally with one

Re: RFR: 8298095: Refine implSpec for SegmentAllocator [v2]

2023-07-24 Thread Maurizio Cimadamore
On Mon, 24 Jul 2023 13:32:58 GMT, Per Minborg wrote: >> This PR suggests refining the `@implSpec` for the SegmentAllocator::allocate >> methods as well as clarifying the docs a bit more. Also, a local variable is >> renamed. > > Per Minborg has updated the pull request incrementally with one

Integrated: JDK-8311822: AIX : test/jdk/java/foreign/TestLayouts.java fails because of different output - expected [[i4](struct)] but found [[I4](struct)]

2023-07-24 Thread Per Minborg
On Mon, 24 Jul 2023 09:51:33 GMT, Per Minborg wrote: > This PR suggests making a test independent of the underlying platform byte > ordering and to test both ordering variants rather than just one. This pull request has now been integrated. Changeset: d1cc2782 Author:Per Minborg URL:

Re: RFR: JDK-8311822: AIX : test/jdk/java/foreign/TestLayouts.java fails because of different output - expected [[i4](struct)] but found [[I4](struct)]

2023-07-24 Thread Matthias Baesken
On Mon, 24 Jul 2023 09:51:33 GMT, Per Minborg wrote: > This PR suggests making a test independent of the underlying platform byte > ordering and to test both ordering variants rather than just one. Hi Per-Ake, I put this patch into our internal test queue to see how it works on AIX.

Re: RFR: JDK-8311822: AIX : test/jdk/java/foreign/TestLayouts.java fails because of different output - expected [[i4](struct)] but found [[I4](struct)]

2023-07-24 Thread Jorn Vernee
On Mon, 24 Jul 2023 09:51:33 GMT, Per Minborg wrote: > This PR suggests making a test independent of the underlying platform byte > ordering and to test both ordering variants rather than just one. Marked as reviewed by jvernee (Reviewer). - PR Review:

Re: RFR: 8298095: Refine implSpec for SegmentAllocator [v2]

2023-07-24 Thread Per Minborg
> This PR suggests refining the `@implSpec` for the SegmentAllocator::allocate > methods as well as clarifying the docs a bit more. Also, a local variable is > renamed. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Update array

Re: RFR: 8311630: [s390] Implementation of Foreign Function & Memory API (Preview) [v3]

2023-07-24 Thread Amit Kumar
On Sat, 22 Jul 2023 06:13:01 GMT, sid8606 wrote: >> sid8606 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address suggestions from Jorn Vernee > > I have narrowed down the issue failing on glibc 2.31 but passes on glibc > 2.35 on

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Alan Bateman
On Mon, 24 Jul 2023 09:16:23 GMT, Vyom Tewari wrote: >> Limit native memory allocation and move write loop from the native layer >> into Java. This change should make the OOME reported in the issue much less >> likely. > > src/java.base/share/native/libjava/io_util.c line 99: > >> 97:

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Alan Bateman
On Fri, 21 Jul 2023 22:40:00 GMT, Brian Burkhalter wrote: > Limit native memory allocation and move write loop from the native layer into > Java. This change should make the OOME reported in the issue much less likely. src/java.base/share/classes/java/io/FileOutputStream.java line 366: > 364:

RFR: 8298095: Refine implSpec for SegmentAllocator

2023-07-24 Thread Per Minborg
This PR suggests refining the `@implSpec` for the SegmentAllocator::allocate methods as well as clarifying the docs a bit more. Also, a local variable is renamed. - Commit messages: - Improve javadocs - Update javadocs for SegmentAllocator::allocate methods Changes:

RFR: JDK-8311822: AIX : test/jdk/java/foreign/TestLayouts.java fails because of different output - expected [[i4](struct)] but found [[I4](struct)]

2023-07-24 Thread Per Minborg
This PR suggests making a test independent of the underlying platform byte ordering and to test both ordering variants rather than just one. - Commit messages: - Make test independent of platform byte ordering Changes: https://git.openjdk.org/jdk/pull/14994/files Webrev:

Re: RFR: 8305947: SequenceInputStream implementation can use an Iterator rather than Enumeration

2023-07-24 Thread Aleksey Shipilev
On Mon, 19 Dec 2022 11:26:25 GMT, Romain Manni-Bucau wrote: > enumeration(list) will create an enumeration, a list and an iterator whereas > the impl only requires an iterator > this PR drops the enumeration wrapper for binary constructor and just maps > the enumeration to an iterator for the

Re: RFR: 8305947: SequenceInputStream implementation can use an Iterator rather than Enumeration

2023-07-24 Thread Aleksey Shipilev
On Mon, 19 Dec 2022 11:26:25 GMT, Romain Manni-Bucau wrote: > enumeration(list) will create an enumeration, a list and an iterator whereas > the impl only requires an iterator > this PR drops the enumeration wrapper for binary constructor and just maps > the enumeration to an iterator for the

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Vyom Tewari
On Fri, 21 Jul 2023 22:40:00 GMT, Brian Burkhalter wrote: > Limit native memory allocation and move write loop from the native layer into > Java. This change should make the OOME reported in the issue much less likely. src/java.base/share/native/libjava/io_util.c line 99: > 97: return

Re: RFR: 8305947: SequenceInputStream implementation can use an Iterator rather than Enumeration

2023-07-24 Thread Benjamin Marwell
On Mon, 19 Dec 2022 11:26:25 GMT, Romain Manni-Bucau wrote: > enumeration(list) will create an enumeration, a list and an iterator whereas > the impl only requires an iterator > this PR drops the enumeration wrapper for binary constructor and just maps > the enumeration to an iterator for the