Re: RFR: 8309399: JVMTI spec needs to clarify when OPAQUE_FRAME is thrown for reasons other than a native method

2025-07-03 Thread Alan Bateman
On Thu, 3 Jul 2025 15:31:28 GMT, Serguei Spitsyn wrote: > Then should we say this way: "unable to set a `FramePop` event for the frame" > ? The can_generate_frame_pop_events capability uses "Can set .." so I think what you propose is good. Also the temptation may be to use the word "enable" wh

Re: RFR: 8355960: JvmtiAgentList::Iterator dtor double free with -fno-elide-constructors [v5]

2025-07-03 Thread David Holmes
On Thu, 3 Jul 2025 19:13:24 GMT, Alex Menkov wrote: >> Currently jvmtiAgentList keeps agents in reversed order (new agents are >> added to the head of the list). >> To restore original order JvmtiAgentList::Iterator uses GrowableArray >> allocated in heap. >> Iterators for different agent types

Re: RFR: 8360664: Null pointer dereference in src/hotspot/share/prims/jvmtiTagMap.cpp in IterateOverHeapObjectClosure::do_object() [v4]

2025-07-03 Thread Chris Plummer
On Tue, 1 Jul 2025 07:38:31 GMT, Artem Semenov wrote: >> The defect has been detected and confirmed in the function >> ```IterateOverHeapObjectClosure::do_object()``` located in the file >> ```src/hotspot/share/prims/jvmtiTagMap.cpp``` with static code analysis. >> This defect can potentially

Re: RFR: 8360664: Null pointer dereference in src/hotspot/share/prims/jvmtiTagMap.cpp in IterateOverHeapObjectClosure::do_object() [v4]

2025-07-03 Thread Alex Menkov
On Tue, 1 Jul 2025 07:38:31 GMT, Artem Semenov wrote: >> The defect has been detected and confirmed in the function >> ```IterateOverHeapObjectClosure::do_object()``` located in the file >> ```src/hotspot/share/prims/jvmtiTagMap.cpp``` with static code analysis. >> This defect can potentially

Integrated: 8361325: Refactor ClassLoaderExt

2025-07-03 Thread Calvin Cheung
On Thu, 3 Jul 2025 05:16:54 GMT, Calvin Cheung wrote: > After the refactoring work done via > [JDK-8280682](https://bugs.openjdk.org/browse/JDK-8280682), there are only > three functions remaining in the ClassLoaderExt class. This RFE is to move > those remaining functions into other classes s

Re: RFR: 8361325: Refactor ClassLoaderExt [v2]

2025-07-03 Thread Calvin Cheung
On Thu, 3 Jul 2025 17:26:43 GMT, Coleen Phillimore wrote: >>> It looks good to me. I like this simplification. But I'm curious what was >>> the original reason to have the `classLoaderExt`? >> >> I think it was created during the first revision of AppCDS back in JDK 8u. > >> It looks good to me

Re: RFR: 8355960: JvmtiAgentList::Iterator dtor double free with -fno-elide-constructors [v4]

2025-07-03 Thread Alex Menkov
On Thu, 3 Jul 2025 04:27:13 GMT, David Holmes wrote: > Okay - still took me a little while to understand the double-indirection of > the "tail ptr" in `add`, but I get it now. So looking at the acquire/release > requirements: > > * all additions are done with `cmpxchg` which is effectively

Re: RFR: 8355960: JvmtiAgentList::Iterator dtor double free with -fno-elide-constructors [v5]

2025-07-03 Thread Alex Menkov
> Currently jvmtiAgentList keeps agents in reversed order (new agents are added > to the head of the list). > To restore original order JvmtiAgentList::Iterator uses GrowableArray > allocated in heap. > Iterators for different agent types are returned by value, and the iterator > class nas no cu

Re: RFR: 8309399: JVMTI spec needs to clarify when OPAQUE_FRAME is thrown for reasons other than a native method

2025-07-03 Thread Chris Plummer
On Thu, 3 Jul 2025 18:43:19 GMT, Chris Plummer wrote: >> It was decided in a local discussion with Chris and Alan to update the JVMTI >> spec to make descriptions/clarifications of some `JVMTI_ERROR_OPAQUE_FRAME` >> cases more consistent. >> This impacts the following JVMTI functions: >> - `P

Re: RFR: 8309399: JVMTI spec needs to clarify when OPAQUE_FRAME is thrown for reasons other than a native method

2025-07-03 Thread Chris Plummer
On Thu, 3 Jul 2025 06:05:26 GMT, Serguei Spitsyn wrote: > It was decided in a local discussion with Chris and Alan to update the JVMTI > spec to make descriptions/clarifications of some `JVMTI_ERROR_OPAQUE_FRAME` > cases more consistent. > This impacts the following JVMTI functions: > - `PopF

Re: RFR: 8360599: [TESTBUG] DumpThreadsWithEliminatedLock.java fails because of unstable inlining

2025-07-03 Thread Alan Bateman
On Thu, 3 Jul 2025 14:36:15 GMT, Richard Reingruber wrote: > I found that the runtime of each test is ~300ms with a release build and ~11s > with a fastdebug build on x86_64 and ppc64. If you like I can remove the > requirement within this pr and do some more testing. -Xcomp doesn't seem to >

Re: RFR: 8361325: Refactor ClassLoaderExt [v2]

2025-07-03 Thread Coleen Phillimore
On Thu, 3 Jul 2025 17:10:03 GMT, Calvin Cheung wrote: > It looks good to me. I like this simplification. But I'm curious what was the > original reason to have the classLoaderExt? I think it was from before we settled on the Shared suffix for CDS methods. - PR Comment: https://git

Re: RFR: 8361325: Refactor ClassLoaderExt [v2]

2025-07-03 Thread Coleen Phillimore
On Thu, 3 Jul 2025 17:12:55 GMT, Calvin Cheung wrote: >> After the refactoring work done via >> [JDK-8280682](https://bugs.openjdk.org/browse/JDK-8280682), there are only >> three functions remaining in the ClassLoaderExt class. This RFE is to move >> those remaining functions into other class

Re: RFR: 8361325: Refactor ClassLoaderExt [v2]

2025-07-03 Thread Calvin Cheung
> After the refactoring work done via > [JDK-8280682](https://bugs.openjdk.org/browse/JDK-8280682), there are only > three functions remaining in the ClassLoaderExt class. This RFE is to move > those remaining functions into other classes so that the ClassLoaderExt class > can be eliminated. >

Re: RFR: 8361325: Refactor ClassLoaderExt [v2]

2025-07-03 Thread Calvin Cheung
On Thu, 3 Jul 2025 15:10:12 GMT, Serguei Spitsyn wrote: > It looks good to me. I like this simplification. But I'm curious what was the > original reason to have the `classLoaderExt`? I think it was created during the first revision of AppCDS back in JDK 8u. > src/hotspot/share/cds/classListPa

Re: RFR: 8361325: Refactor ClassLoaderExt [v2]

2025-07-03 Thread Calvin Cheung
On Thu, 3 Jul 2025 12:56:44 GMT, Coleen Phillimore wrote: >> Calvin Cheung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @coleenp comment > > src/hotspot/share/classfile/modules.cpp line 671: > >> 669: // list[3] = "" >> 670: // l

Re: RFR: 8360599: [TESTBUG] DumpThreadsWithEliminatedLock.java fails because of unstable inlining

2025-07-03 Thread Leonid Mesnik
On Sun, 29 Jun 2025 15:26:14 GMT, Richard Reingruber wrote: > This PR adds CompileCommands to the test DumpThreadsWithEliminatedLock.java > to force inlining of java/lang/String*.* methods. This will make inlining > more stable to allow for the expected lock elimination based on c2 escape > an

Integrated: 8361292: Rename ModuleEntry::module() to module_oop()

2025-07-03 Thread Ioi Lam
On Wed, 2 Jul 2025 17:33:40 GMT, Ioi Lam wrote: > A module has both a Java and a C++ representation > > - C++: `ModuleEntry` > - Java: `java.lang.Module` > > In C++, we have the following two methods > > - `ModuleEntry* InstanceKlass::module()` > - `oop ModuleEntry::module()` > > This can lea

Re: RFR: 8361292: Rename ModuleEntry::module() to module_oop() [v2]

2025-07-03 Thread Ioi Lam
On Wed, 2 Jul 2025 19:02:30 GMT, Coleen Phillimore wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @coleenp comments > > Marked as reviewed by coleenp (Reviewer). Thanks @coleenp @calvinccheung @sspitsyn for the review

Re: RFR: 8305567: serviceability/tmtools/jstat/GcTest01.java failed utils.JstatGcResults.assertConsistency

2025-07-03 Thread Leonid Mesnik
On Wed, 2 Jul 2025 11:42:23 GMT, Kevin Walls wrote: > There is no guarantee of consistency when sampling jstat data, and we're > asserting these figures are always consistent. > Tests should retry some small number of times, rerunning the jstat tool to > recapture data. Marked as reviewed by l

Re: RFR: 8309399: JVMTI spec needs to clarify when OPAQUE_FRAME is thrown for reasons other than a native method

2025-07-03 Thread Serguei Spitsyn
On Thu, 3 Jul 2025 08:57:34 GMT, Alan Bateman wrote: >> It was decided in a local discussion with Chris and Alan to update the JVMTI >> spec to make descriptions/clarifications of some `JVMTI_ERROR_OPAQUE_FRAME` >> cases more consistent. >> This impacts the following JVMTI functions: >> - `Po

Re: RFR: 8355960: JvmtiAgentList::Iterator dtor double free with -fno-elide-constructors [v4]

2025-07-03 Thread Serguei Spitsyn
On Thu, 3 Jul 2025 03:08:26 GMT, Alex Menkov wrote: >> Currently jvmtiAgentList keeps agents in reversed order (new agents are >> added to the head of the list). >> To restore original order JvmtiAgentList::Iterator uses GrowableArray >> allocated in heap. >> Iterators for different agent types

Re: RFR: 8361325: Refactor ClassLoaderExt

2025-07-03 Thread Serguei Spitsyn
On Thu, 3 Jul 2025 05:16:54 GMT, Calvin Cheung wrote: > After the refactoring work done via > [JDK-8280682](https://bugs.openjdk.org/browse/JDK-8280682), there are only > three functions remaining in the ClassLoaderExt class. This RFE is to move > those remaining functions into other classes s

Re: RFR: 8360599: [TESTBUG] DumpThreadsWithEliminatedLock.java fails because of unstable inlining

2025-07-03 Thread Richard Reingruber
On Thu, 3 Jul 2025 08:36:53 GMT, Alan Bateman wrote: > It might be that it could be updated to work with debug or -Xcomp too, > execution times would need to be checked out. I found that the runtime of each test is ~300ms with a release build and ~11s with a fastdebug build on x86_64 and ppc64

Re: RFR: 8361325: Refactor ClassLoaderExt

2025-07-03 Thread Coleen Phillimore
On Thu, 3 Jul 2025 05:16:54 GMT, Calvin Cheung wrote: > After the refactoring work done via > [JDK-8280682](https://bugs.openjdk.org/browse/JDK-8280682), there are only > three functions remaining in the ClassLoaderExt class. This RFE is to move > those remaining functions into other classes s

Re: RFR: 8309399: JVMTI spec needs to clarify when OPAQUE_FRAME is thrown for reasons other than a native method

2025-07-03 Thread Alan Bateman
On Thu, 3 Jul 2025 06:05:26 GMT, Serguei Spitsyn wrote: > It was decided in a local discussion with Chris and Alan to update the JVMTI > spec to make descriptions/clarifications of some `JVMTI_ERROR_OPAQUE_FRAME` > cases more consistent. > This impacts the following JVMTI functions: > - `PopF

Re: RFR: 8360599: [TESTBUG] DumpThreadsWithEliminatedLock.java fails because of unstable inlining

2025-07-03 Thread Alan Bateman
On Sun, 29 Jun 2025 15:26:14 GMT, Richard Reingruber wrote: > This PR adds CompileCommands to the test DumpThreadsWithEliminatedLock.java > to force inlining of java/lang/String*.* methods. This will make inlining > more stable to allow for the expected lock elimination based on c2 escape > an

Re: RFR: 8360664: Null pointer dereference in src/hotspot/share/prims/jvmtiTagMap.cpp in IterateOverHeapObjectClosure::do_object() [v3]

2025-07-03 Thread Artem Semenov
On Tue, 1 Jul 2025 00:31:25 GMT, Alex Menkov wrote: >> Artem Semenov has updated the pull request incrementally with one additional >> commit since the last revision: >> >> changed if tu assert > > Marked as reviewed by amenkov (Reviewer). @alexmenkov @plummercj @dholmes-ora do you mind the