RFR: 8349638: Build libjdwp with SIZE optimization

2025-02-11 Thread Matthias Baesken
The libjdwp is currently built with LOW optimization level, it could be built with SIZE optimization to lower the lib size by ~ 10 % on UNIX. On Windows LOW and SIZE currently translate to the same O1 optimization flag so no difference there. On Linux x86_64 for example the lib shrinks from 300K

Re: RFR: 8349638: Build libjdwp with SIZE optimization

2025-02-11 Thread Matthias Baesken
On Tue, 11 Feb 2025 15:56:39 GMT, Matthias Baesken wrote: > The libjdwp is currently built with LOW optimization level, it could be built > with SIZE optimization to lower the lib size by ~ 10 % on UNIX. > On Windows LOW and SIZE currently translate to the same O1 optimization flag > so no diff

Re: RFR: 8347433: Deprecate XML interchange in java.management/javax/management/modelmbean/DescriptorSupport for removal

2025-02-11 Thread Daniel Fuchs
On Fri, 10 Jan 2025 14:43:00 GMT, Kevin Walls wrote: > DescriptorSupport has a constructor and a method providing creation from, and > export to, XML. > > These are unused in the JDK and have no practical known examples of usage. > XML parsing is best done by an independent implementation, no

Re: RFR: 8349723: Problemlist jdp tests for macosx-x64

2025-02-11 Thread Roger Riggs
On Mon, 10 Feb 2025 15:33:55 GMT, Kevin Walls wrote: > Trivial problemlist update. > Problemlist should be expanded for macosx, from just aarch64 to all, for > these JDP tests, as x64 has occasional failures. > > > - > ### Progress > - [ ] Change must be properly reviewed (1 review re

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v4]

2025-02-11 Thread SendaoYan
> H all, > > This PR add `/native` keyword in the test header for virtual thread tests. > The `/native` keyword will make run the related tests by jtreg standalone > more friendly. > > I runed all the tests without -nativepath argument and find the fail tests. > This will find all the virtual

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 08:44:15 GMT, Alan Bateman wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add /native for test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java >> test/jdk/java/lang/Thread/virtual/Starvation.

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread Alan Bateman
On Tue, 11 Feb 2025 08:38:48 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread SendaoYan
> H all, > > This PR add `/native` keyword in the test header for virtual thread tests. > The `/native` keyword will make run the related tests by jtreg standalone > more friendly. > > I runed all the tests without -nativepath argument and find the fail tests. > This will find all the virtual

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 08:41:44 GMT, Alan Bateman wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add /native for test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java >> test/jdk/java/lang/Thread/virtual/Starvation.

Re: RFR: 8349689: Several virtual thread tests missing /native keyword

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 07:30:49 GMT, Alan Bateman wrote: > Can you check if these two needs to be updated too? > > test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java > test/jdk/java/lang/Thread/virtual/Starvation.java These two tests also need `/native` keyword. - Test test/jdk/java/lang/T

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread Alan Bateman
On Tue, 11 Feb 2025 09:03:24 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 09:03:24 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

Re: RFR: 8192647: GClocker induced GCs can starve threads requiring memory leading to OOME [v2]

2025-02-11 Thread David Holmes
On Wed, 5 Feb 2025 14:41:39 GMT, Albert Mingkun Yang wrote: >> Here is an attempt to simplify GCLocker implementation for Serial and >> Parallel. >> >> GCLocker prevents GC when Java threads are in a critical region (i.e., >> calling JNI critical APIs). JDK-7129164 introduces an optimization t

Re: RFR: 8349684: Remove SA core file tests from problem list for macosx-x64

2025-02-11 Thread Kevin Walls
On Sat, 8 Feb 2025 03:45:04 GMT, Chris Plummer wrote: > Now that we have retired OSX 11 and earlier, > [JDK-8267433](https://bugs.openjdk.org/browse/JDK-8267433) does not seem to > reproduce anymore. I ran the SA core file tests about 2000 times and only saw > 1 failure, and it was not related

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 08:53:41 GMT, Alan Bateman wrote: >> Reason description as >> https://github.com/openjdk/jdk/pull/23550#issuecomment-2650141187. > > Can you remove this change from the PR as it this is a separate discussion? > My guess is that in your environment the Thread.yield is somehow

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread SendaoYan
> H all, > > This PR add `/native` keyword in the test header for virtual thread tests. > The `/native` keyword will make run the related tests by jtreg standalone > more friendly. > > I runed all the tests without -nativepath argument and find the fail tests. > This will find all the virtual

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread Alan Bateman
On Tue, 11 Feb 2025 08:44:15 GMT, SendaoYan wrote: >> test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java line 69: >> >>> 67: if (flag != true) { >>> 68: throw new RuntimeException("flag = " + flag); >>> 69: } >> >> What are these other changes about? > > Reason

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v3]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 09:00:46 GMT, SendaoYan wrote: >> Can you remove this change from the PR as it this is a separate discussion? >> My guess is that in your environment the Thread.yield is somehow taking more >> than 5 seconds, is that right? In that case, we can modify the test to use a >> l

Re: RFR: 8349638: Build libjdwp with SIZE optimization

2025-02-11 Thread Julian Waters
On Tue, 11 Feb 2025 15:56:39 GMT, Matthias Baesken wrote: > The libjdwp is currently built with LOW optimization level, it could be built > with SIZE optimization to lower the lib size by ~ 10 % on UNIX. > On Windows LOW and SIZE currently translate to the same O1 optimization flag > so no diff

Re: RFR: 8349088: De-virtualize Codeblob and nmethod [v2]

2025-02-11 Thread Vladimir Kozlov
On Sun, 9 Feb 2025 19:43:29 GMT, Vladimir Kozlov wrote: >> Remove virtual methods from CodeBlob and nmethod to simplify >> saving/restoring in Leyden AOT cache. It avoids the need to patch hidden >> VPTR pointer to class's virtual table. >> >> Added C++ static asserts to make sure no virtual m

Re: RFR: 8349088: De-virtualize Codeblob and nmethod [v4]

2025-02-11 Thread Vladimir Kozlov
> Remove virtual methods from CodeBlob and nmethod to simplify saving/restoring > in Leyden AOT cache. It avoids the need to patch hidden VPTR pointer to > class's virtual table. > > Added C++ static asserts to make sure no virtual methods are added in a > future. > > Fixed/cleaned SA code whi

Re: RFR: 8349088: De-virtualize Codeblob and nmethod [v5]

2025-02-11 Thread Vladimir Kozlov
> Remove virtual methods from CodeBlob and nmethod to simplify saving/restoring > in Leyden AOT cache. It avoids the need to patch hidden VPTR pointer to > class's virtual table. > > Added C++ static asserts to make sure no virtual methods are added in a > future. > > Fixed/cleaned SA code whi

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread Leonid Mesnik
On Tue, 11 Feb 2025 09:03:24 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

Re: RFR: 8192647: GClocker induced GCs can starve threads requiring memory leading to OOME [v2]

2025-02-11 Thread David Holmes
On Wed, 5 Feb 2025 14:41:39 GMT, Albert Mingkun Yang wrote: >> Here is an attempt to simplify GCLocker implementation for Serial and >> Parallel. >> >> GCLocker prevents GC when Java threads are in a critical region (i.e., >> calling JNI critical APIs). JDK-7129164 introduces an optimization t

Re: RFR: 8348347: Cleanup JavaThread subclass support in SA [v2]

2025-02-11 Thread Chris Plummer
On Tue, 11 Feb 2025 23:15:38 GMT, Serguei Spitsyn wrote: >> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update comments > > src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/ThreadStackTrace.java > line 51: >

Re: RFR: 8348347: Cleanup JavaThread subclass support in SA [v2]

2025-02-11 Thread Serguei Spitsyn
On Thu, 6 Feb 2025 22:44:48 GMT, Chris Plummer wrote: >> Cleanup SA JavaThread support. Details in first comment: >> >> Testing: >> - Tier1 >> - Tier2 svc >> - Tier3 >> - Tier5 svc >> - Local testing of debuggee using graal java compiler threads. Verified that >> the compiler threads shows up i

Re: RFR: 8348347: Cleanup JavaThread subclass support in SA [v2]

2025-02-11 Thread Serguei Spitsyn
On Thu, 6 Feb 2025 22:44:48 GMT, Chris Plummer wrote: >> Cleanup SA JavaThread support. Details in first comment: >> >> Testing: >> - Tier1 >> - Tier2 svc >> - Tier3 >> - Tier5 svc >> - Local testing of debuggee using graal java compiler threads. Verified that >> the compiler threads shows up i

Re: RFR: 8348347: Cleanup JavaThread subclass support in SA [v2]

2025-02-11 Thread Chris Plummer
On Tue, 11 Feb 2025 23:11:50 GMT, Serguei Spitsyn wrote: >> Chris Plummer has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update comments > > src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaThread.java > line 54: > >> 5

Re: RFR: 8349088: De-virtualize Codeblob and nmethod [v2]

2025-02-11 Thread Vladimir Kozlov
On Mon, 10 Feb 2025 03:11:22 GMT, Chris Plummer wrote: >> Vladimir Kozlov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix Zero and Minimal VM builds > > I almost wished I hadn't looked because there is a lot of SA CodeBlob support >

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread David Holmes
On Tue, 11 Feb 2025 09:03:24 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread SendaoYan
On Wed, 12 Feb 2025 03:43:53 GMT, David Holmes wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove the additional check for virtual thread of >> test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java > > test/jd

Re: RFR: 8349638: Build libjdwp with SIZE optimization

2025-02-11 Thread Chris Plummer
On Tue, 11 Feb 2025 15:56:39 GMT, Matthias Baesken wrote: > The libjdwp is currently built with LOW optimization level, it could be built > with SIZE optimization to lower the lib size by ~ 10 % on UNIX. > On Windows LOW and SIZE currently translate to the same O1 optimization flag > so no diff

Re: RFR: 8349638: Build libjdwp with SIZE optimization

2025-02-11 Thread Chris Plummer
On Tue, 11 Feb 2025 17:30:53 GMT, Julian Waters wrote: > Just a heads up, there is a known issue with -Os and gcc (-Os turns on > -fdeclone-ctor-dtor which causes the problem), especially if LTO is active. > Turning more optimization levels to -Os could present a problem if you want > to have

Re: RFR: 8349684: Remove SA core file tests from problem list for macosx-x64

2025-02-11 Thread Serguei Spitsyn
On Sat, 8 Feb 2025 03:45:04 GMT, Chris Plummer wrote: > Now that we have retired OSX 11 and earlier, > [JDK-8267433](https://bugs.openjdk.org/browse/JDK-8267433) does not seem to > reproduce anymore. I ran the SA core file tests about 2000 times and only saw > 1 failure, and it was not related

Re: RFR: 8349571: Remove JavaThreadFactory interface from SA

2025-02-11 Thread Serguei Spitsyn
On Thu, 6 Feb 2025 23:22:25 GMT, Chris Plummer wrote: > The SA JavaThreadFactory interface is no longer used, so it is being removed. > I stumbled on it while looking at JavaThread related code. It looks like it's > original purpose is related to JavaThread subclasses at one point being > plat

Re: RFR: 8349088: De-virtualize Codeblob and nmethod [v3]

2025-02-11 Thread Vladimir Kozlov
> Remove virtual methods from CodeBlob and nmethod to simplify saving/restoring > in Leyden AOT cache. It avoids the need to patch hidden VPTR pointer to > class's virtual table. > > Added C++ static asserts to make sure no virtual methods are added in a > future. > > Fixed/cleaned SA code whi

Re: RFR: 8349723: Problemlist jdp tests for macosx-x64

2025-02-11 Thread Serguei Spitsyn
On Mon, 10 Feb 2025 15:33:55 GMT, Kevin Walls wrote: > Trivial problemlist update. > Problemlist should be expanded for macosx, from just aarch64 to all, for > these JDP tests, as x64 has occasional failures. > > > - > ### Progress > - [ ] Change must be properly reviewed (1 review re

Re: RFR: 8348347: Cleanup JavaThread subclass support in SA [v2]

2025-02-11 Thread Serguei Spitsyn
On Tue, 11 Feb 2025 23:16:04 GMT, Chris Plummer wrote: >> src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/JavaThread.java >> line 54: >> >>> 52: private static long oopPtrSize; >>> 53: >>> 54: // For accessing platform dependent functionality >> >> Nit: It is better to have do

Integrated: 8349689: Several virtual thread tests missing /native keyword

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 02:45:11 GMT, SendaoYan wrote: > H all, > > This PR add `/native` keyword in the test header for virtual thread tests. > The `/native` keyword will make run the related tests by jtreg standalone > more friendly. > > I runed all the tests without -nativepath argument and fi

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v5]

2025-02-11 Thread SendaoYan
On Tue, 11 Feb 2025 09:03:24 GMT, SendaoYan wrote: >> H all, >> >> This PR add `/native` keyword in the test header for virtual thread tests. >> The `/native` keyword will make run the related tests by jtreg standalone >> more friendly. >> >> I runed all the tests without -nativepath argument

Re: RFR: 8349088: De-virtualize Codeblob and nmethod [v2]

2025-02-11 Thread Chris Plummer
On Tue, 11 Feb 2025 23:55:46 GMT, Vladimir Kozlov wrote: > I think some wrapper subclasses for CodeBlob were kept because of `is*()` > which were used only in `PStack` to print name. Why not use `getName()` for > this purpose without big `if/else` there? Possibly getName() didn't exist when PS

Re: RFR: 8349638: Build libjdwp with SIZE optimization

2025-02-11 Thread Matthias Baesken
On Tue, 11 Feb 2025 19:00:01 GMT, Chris Plummer wrote: > Just a heads up, there is a known issue with -Os and gcc (-Os turns on > -fdeclone-ctor-dtor which causes the problem), especially if LTO is active. > Turning more optimization levels to -Os could present a problem if you want > to have

Re: RFR: 8349638: Build libjdwp with SIZE optimization

2025-02-11 Thread Matthias Baesken
On Tue, 11 Feb 2025 19:01:44 GMT, Chris Plummer wrote: > I'm not too familiar with optimization choices in the build system, but it > seems libjdwp should be built optimized in the same manner as libjvm. LIBJVM is built with optimization level HIGHEST_JVM (seems this is -O3 with gcc/clang) by

Re: RFR: 8349638: Build libjdwp with SIZE optimization

2025-02-11 Thread Matthias Baesken
On Wed, 12 Feb 2025 07:31:39 GMT, Matthias Baesken wrote: > if you want to have LTO support for the JDK's native code outside of HotSpot > as was discussed elsewhere Maybe per lib, additionally to the currently offered optimization options LOW, SIZE, HIGH etc (the ones we currently have now)