Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v2]

2022-11-17 Thread Serguei Spitsyn
On Fri, 18 Nov 2022 06:15:39 GMT, Serguei Spitsyn wrote: >> If there are no command line agents, then on startup >> `vthread_notify_jvmti_events` is not set true. Because it is not true, when >> `javaClasses_init()` calls `init_static_notify_jvmti_events()`, it does >> nothing. The whole point

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v3]

2022-11-17 Thread Serguei Spitsyn
> The `VirtualThread` static field `notifyJvmtiEvents` is not set correctly in > cases JVMTI agents are loaded into running VM. It is because an extra call to > java_lang_VirtualThread::init_static_notify_jvmti_events() is needed. > This function is called once at the VM initialization, so this e

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v2]

2022-11-17 Thread Serguei Spitsyn
On Fri, 18 Nov 2022 05:21:02 GMT, Chris Plummer wrote: > What I believe to be the flaw here is that you call > `set_notify_jvmti_events(true)` > even if you don't call `init_static_notify_jvmti_events()`. This only happen in a detached thread case which can be only at startup. It was implemente

Re: RFR: JDK-8296796: Provide clean, platform-agnostic interface to C-heap trimming [v2]

2022-11-17 Thread Thomas Stuefe
On Fri, 18 Nov 2022 02:23:54 GMT, David Holmes wrote: > Okay. I have some reservations about this style of approach but the > precedents are there. I'd argue that for single-use situations like this and > os::map_stack_shadow_pages that a XXX_ONLY(foo();) in the shared code would > be acceptab

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v2]

2022-11-17 Thread Chris Plummer
On Fri, 18 Nov 2022 04:55:10 GMT, Serguei Spitsyn wrote: >> I think you need a flag that tells you if >> `init_static_notify_jvmti_events()` has been called. > > A part of the initialization sequence we need to know is: > > create_vm() { > . . . > // Launch -agentlib/-agentpath and convert

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v2]

2022-11-17 Thread Serguei Spitsyn
On Fri, 18 Nov 2022 03:43:34 GMT, Chris Plummer wrote: >> If `notify_jvmti_events()` is false, then you call >> `set_notify_jvmti_events(true)`, which means you will never enter the `if` >> block again. However, if the thread is not attached, you do not call >> `init_static_notify_jvmti_event

Re: RFR: 8269817: serviceability/jvmti/DynamicCodeGenerated/DynamicCodeGeneratedTest.java timed out with -Xcomp

2022-11-17 Thread Chris Plummer
On Fri, 18 Nov 2022 01:16:13 GMT, Leonid Mesnik wrote: > Test serviceability/jvmti/DynamicCodeGenerated/DynamicCodeGeneratedTest.java > timed out with -Xcomp. It starts 2000 threads at the same time. However, > there is no goal to start them simultaneously. It is needed just to start a > lot o

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v2]

2022-11-17 Thread Chris Plummer
On Fri, 18 Nov 2022 03:42:39 GMT, Chris Plummer wrote: >> Enabling the `notify_jvmti_events` is an optimization to avoid having this >> notification overhead with JVMTI virtual thread mount state transitions when >> it is not needed. >> We need to enable it only once and never disable it if ena

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v2]

2022-11-17 Thread Chris Plummer
On Fri, 18 Nov 2022 02:11:39 GMT, Serguei Spitsyn wrote: >> src/hotspot/share/prims/jvmtiExport.cpp line 390: >> >>> 388: ThreadInVMfromNative tiv(JavaThread::current()); >>> 389: java_lang_VirtualThread::init_static_notify_jvmti_events(); >>> 390: } >> >> Doesn't this log

Re: RFR: 8297083: Remove vmTestbase/nsk/jvmti/GetAllThreads/allthr001 from problem list

2022-11-17 Thread Chris Plummer
On Thu, 17 Nov 2022 22:19:16 GMT, Daniel D. Daugherty wrote: > Gotta wonder how the fix for 8284027 was tested with the test still > on the ProblemList. Or did the ProblemList update just get lost? I'm not sure. Maybe @alexmenkov remembers. - PR: https://git.openjdk.org/jdk/pull/1

Re: RFR: JDK-8296796: Provide clean, platform-agnostic interface to C-heap trimming [v2]

2022-11-17 Thread David Holmes
On Mon, 14 Nov 2022 07:32:25 GMT, Thomas Stuefe wrote: >> This is a breakout from >> [JDK-8293114](https://bugs.openjdk.org/browse/JDK-8293114), which is starved >> for reviews. So I attempt to break up that fix into smaller units which are >> hopefully easier to review separately. >> >> We c

Re: RFR: JDK-8297164: Update troff man pages and CheckManPageOptions.java

2022-11-17 Thread David Holmes
On Thu, 17 Nov 2022 22:23:53 GMT, Jonathan Gibbons wrote: > Please review an update for the troff man pages, following the recent update > to upgrade to use pandoc 2.19.2 > (See https://bugs.openjdk.org/browse/JDK-8297165) > > In conjunction with this, one javadoc test also needs to be updated,

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v2]

2022-11-17 Thread Serguei Spitsyn
On Thu, 17 Nov 2022 18:41:08 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> add @requires vm.jvmti to VirtualStackTraceTest > > src/hotspot/share/prims/jvmtiExport.cpp line 390: > >> 388:

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v2]

2022-11-17 Thread Serguei Spitsyn
On Thu, 17 Nov 2022 18:37:09 GMT, Chris Plummer wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> add @requires vm.jvmti to VirtualStackTraceTest > > src/hotspot/share/prims/jvmtiExport.cpp line 385: > >> 383:

RFR: 8269817: serviceability/jvmti/DynamicCodeGenerated/DynamicCodeGeneratedTest.java timed out with -Xcomp

2022-11-17 Thread Leonid Mesnik
Test serviceability/jvmti/DynamicCodeGenerated/DynamicCodeGeneratedTest.java timed out with -Xcomp. It starts 2000 threads at the same time. However, there is no goal to start them simultaneously. It is needed just to start a lot of threads. So fix is to start them by smaller groups. --

Re: RFR: 8297080: Remove com/sun/jdi/NashornPopFrameTest.java from the problem list

2022-11-17 Thread Leonid Mesnik
On Thu, 17 Nov 2022 18:53:58 GMT, Chris Plummer wrote: > The bug is closed (was specific to sparc) and the test no longer exists > (Nashorn has been removed). > > I'd like to push this as a trivial change. Marked as reviewed by lmesnik (Reviewer). - PR: https://git.openjdk.org/j

RFR: JDK-8297164: Update troff man pages and CheckManPageOptions.java

2022-11-17 Thread Jonathan Gibbons
Please review an update for the troff man pages, following the recent update to upgrade to use pandoc 2.19.2 (See https://bugs.openjdk.org/browse/JDK-8297165) In conjunction with this, one javadoc test also needs to be updated, to work with the new form of output generated by the new version of

Re: RFR: 8297080: Remove com/sun/jdi/NashornPopFrameTest.java from the problem list

2022-11-17 Thread Daniel D . Daugherty
On Thu, 17 Nov 2022 18:53:58 GMT, Chris Plummer wrote: > The bug is closed (was specific to sparc) and the test no longer exists > (Nashorn has been removed). > > I'd like to push this as a trivial change. Thumbs up. I agree this is a trivial fix. - Marked as reviewed by dcubed

Re: RFR: 8297083: Remove vmTestbase/nsk/jvmti/GetAllThreads/allthr001 from problem list

2022-11-17 Thread Alex Menkov
On Thu, 17 Nov 2022 20:49:53 GMT, Chris Plummer wrote: > Remove vmTestbase/nsk/jvmti/GetAllThreads/allthr001 from vthread problem > list. [JDK-8284027](https://bugs.openjdk.org/browse/JDK-8284027) has been > fixed. > > Ran test on all supported platforms with: > > `JTREG_EXTRA_PROBLEM_LISTS=P

Re: RFR: 8297083: Remove vmTestbase/nsk/jvmti/GetAllThreads/allthr001 from problem list

2022-11-17 Thread Leonid Mesnik
On Thu, 17 Nov 2022 20:49:53 GMT, Chris Plummer wrote: > Remove vmTestbase/nsk/jvmti/GetAllThreads/allthr001 from vthread problem > list. [JDK-8284027](https://bugs.openjdk.org/browse/JDK-8284027) has been > fixed. > > Ran test on all supported platforms with: > > `JTREG_EXTRA_PROBLEM_LISTS=P

Re: RFR: 8297083: Remove vmTestbase/nsk/jvmti/GetAllThreads/allthr001 from problem list

2022-11-17 Thread Daniel D . Daugherty
On Thu, 17 Nov 2022 20:49:53 GMT, Chris Plummer wrote: > Remove vmTestbase/nsk/jvmti/GetAllThreads/allthr001 from vthread problem > list. [JDK-8284027](https://bugs.openjdk.org/browse/JDK-8284027) has been > fixed. > > Ran test on all supported platforms with: > > `JTREG_EXTRA_PROBLEM_LISTS=P

RFR: JDK-8297215: Update libs tests to use @enablePreview

2022-11-17 Thread Joe Darcy
Similar to an update recently done for langtools tests, update the libraries regression tests to take advantage of the @enablePreview jtreg feature. - Commit messages: - JDK-8297215: Update libs tests to use @enablePreview Changes: https://git.openjdk.org/jdk/pull/11222/files Webr

RFR: 8297080: Remove com/sun/jdi/NashornPopFrameTest.java from the problem list

2022-11-17 Thread Chris Plummer
The bug is closed (was specific to sparc) and the test no longer exists (Nashorn has been removed). I'd like to push this as a trivial change. - Commit messages: - Reove NashornPopFrameTest.java from problem list. The test no longer exists. Changes: https://git.openjdk.org/jdk/pu

RFR: 8297083: Remove vmTestbase/nsk/jvmti/GetAllThreads/allthr001 from problem list

2022-11-17 Thread Chris Plummer
Remove vmTestbase/nsk/jvmti/GetAllThreads/allthr001 from vthread problem list. [JDK-8284027](https://bugs.openjdk.org/browse/JDK-8284027) has been fixed. Ran test on all supported platforms with: `JTREG_EXTRA_PROBLEM_LISTS=ProblemList-svc-vthread.txt JTREG_MAIN_WRAPPER=Virtual TEST_VM_OPTS=-Dma

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v2]

2022-11-17 Thread Chris Plummer
On Thu, 17 Nov 2022 17:35:32 GMT, Serguei Spitsyn wrote: >> The `VirtualThread` static field `notifyJvmtiEvents` is not set correctly in >> cases JVMTI agents are loaded into running VM. It is because an extra call >> to java_lang_VirtualThread::init_static_notify_jvmti_events() is needed. >> T

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v2]

2022-11-17 Thread Serguei Spitsyn
On Thu, 17 Nov 2022 15:36:01 GMT, Leonid Mesnik wrote: >> Serguei Spitsyn has updated the pull request incrementally with one >> additional commit since the last revision: >> >> add @requires vm.jvmti to VirtualStackTraceTest > > test/hotspot/jtreg/serviceability/jvmti/vthread/VirtualStackTra

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM [v2]

2022-11-17 Thread Serguei Spitsyn
> The `VirtualThread` static field `notifyJvmtiEvents` is not set correctly in > cases JVMTI agents are loaded into running VM. It is because an extra call to > java_lang_VirtualThread::init_static_notify_jvmti_events() is needed. > This function is called once at the VM initialization, so this e

Re: RFR: 8295044: Implementation of Foreign Function and Memory API (Second Preview) [v27]

2022-11-17 Thread ExE Boss
On Tue, 15 Nov 2022 18:47:39 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-434 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjd

Re: RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM

2022-11-17 Thread Leonid Mesnik
On Thu, 17 Nov 2022 09:12:07 GMT, Serguei Spitsyn wrote: > The `VirtualThread` static field `notifyJvmtiEvents` is not set correctly in > cases JVMTI agents are loaded into running VM. It is because an extra call to > java_lang_VirtualThread::init_static_notify_jvmti_events() is needed. > This

Re: RFR: JDK-8296796: Provide clean, platform-agnostic interface to C-heap trimming [v2]

2022-11-17 Thread Thomas Stuefe
On Thu, 17 Nov 2022 02:17:09 GMT, David Holmes wrote: > I don't disagree that C-heap trimming is useful even if only Linux does it. > My objection is to defining a platform-agnostic API when only Linux does it. I see. It will allow us to use these APIs in shared code though, without having to

Re: RFR: 8296875: Generational ZGC: Refactor loom code [v3]

2022-11-17 Thread Erik Österlund
On Thu, 17 Nov 2022 11:16:52 GMT, Richard Reingruber wrote: >> The compiler should be able to do that already. We devirtualize calls into >> oop closures, and the closure is stack allocated. So the compiler should be >> able to do that if it finds that it is a good idea. I'd prefer to leave tha

Re: RFR: 8296875: Generational ZGC: Refactor loom code [v4]

2022-11-17 Thread Erik Österlund
On Thu, 17 Nov 2022 11:23:07 GMT, Richard Reingruber wrote: >> Erik Österlund has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix Richard comments > > Marked as reviewed by rrich (Reviewer). Thanks for the review, @reinrich! --

Integrated: 8296492: Remove ObjectLocker in JVMTI get_subgroups call

2022-11-17 Thread Coleen Phillimore
On Tue, 8 Nov 2022 00:58:44 GMT, Coleen Phillimore wrote: > The JVM code took a ThreadGroup lock before poking into ThreadGroup fields. > Call a method in the ThreadGroup to call the synchronized method instead. > Tested with tier 1-4. This pull request has now been integrated. Changeset: d8c

Re: RFR: 8296492: Remove ObjectLocker in JVMTI get_subgroups call [v6]

2022-11-17 Thread Coleen Phillimore
On Tue, 15 Nov 2022 18:52:37 GMT, Coleen Phillimore wrote: >> The JVM code took a ThreadGroup lock before poking into ThreadGroup fields. >> Call a method in the ThreadGroup to call the synchronized method instead. >> Tested with tier 1-4. > > Coleen Phillimore has updated the pull request incr

Re: RFR: 8296875: Generational ZGC: Refactor loom code [v4]

2022-11-17 Thread Richard Reingruber
On Thu, 17 Nov 2022 09:24:04 GMT, Erik Österlund wrote: >> The current loom code makes some assumptions about GC that will not work >> with generational ZGC. We should make this code more GC agnostic, and >> provide a better interface for talking to the GC. >> >> In particular, >> 1) All GCs h

Re: RFR: 8296875: Generational ZGC: Refactor loom code [v3]

2022-11-17 Thread Richard Reingruber
On Thu, 17 Nov 2022 09:23:48 GMT, Erik Österlund wrote: >> src/hotspot/share/gc/shared/barrierSetStackChunk.cpp line 68: >> >>> 66: >>> 67: virtual void do_oop(oop* p) override { >>> 68: if (UseCompressedOops) { >> >> Wouldn't it be better to hoist the check for `UseCompressedOops`? > >

Re: RFR: 8297173: usageTicks and totalTicks should be volatile to ensure that different threads get the latest ticks [v2]

2022-11-17 Thread Alan Bateman
On Thu, 17 Nov 2022 09:43:39 GMT, Poison wrote: >> As the title says, add the volatile modifier. > > Poison has updated the pull request incrementally with one additional commit > since the last revision: > > 8297173: usageTicks and totalTicks should be volatile Marked as reviewed by alanb (

Re: RFR: 8297173: usageTicks and totalTicks should be volatile to ensure that different threads get the latest ticks [v2]

2022-11-17 Thread Poison
On Thu, 17 Nov 2022 09:35:07 GMT, Alan Bateman wrote: >> Poison has updated the pull request incrementally with one additional commit >> since the last revision: >> >> 8297173: usageTicks and totalTicks should be volatile > > src/jdk.management/unix/classes/com/sun/management/internal/Operati

Re: RFR: 8297173: usageTicks and totalTicks should be volatile to ensure that different threads get the latest ticks [v2]

2022-11-17 Thread Poison
> As the title says, add the volatile modifier. Poison has updated the pull request incrementally with one additional commit since the last revision: 8297173: usageTicks and totalTicks should be volatile - Changes: - all: https://git.openjdk.org/jdk/pull/11199/files - new: ht

Re: RFR: 8297173: usageTicks and totalTicks should be volatile to ensure that different threads get the latest ticks

2022-11-17 Thread Alan Bateman
On Thu, 17 Nov 2022 06:28:37 GMT, Poison wrote: > As the title says, add the volatile modifier. src/jdk.management/unix/classes/com/sun/management/internal/OperatingSystemImpl.java line 53: > 51: private abstract class ContainerCpuTicks { > 52: private volatile long usageTicks = 0;

Re: RFR: 8296875: Generational ZGC: Refactor loom code [v3]

2022-11-17 Thread Erik Österlund
On Wed, 16 Nov 2022 15:47:37 GMT, Richard Reingruber wrote: >> Erik Österlund has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Indentation fix > > Hi @fisk, I've skimmed the changes. They look good to me. I do have a few > comments/quest

Re: RFR: 8297173: usageTicks and totalTicks should be volatile to ensure that different threads get the latest ticks

2022-11-17 Thread Severin Gehwolf
On Thu, 17 Nov 2022 06:28:37 GMT, Poison wrote: > As the title says, add the volatile modifier. Please enable testing for your fork. - PR: https://git.openjdk.org/jdk/pull/11199

RFR: 8296324: JVMTI GetStackTrace truncates vthread stack trace for agents loaded into running VM

2022-11-17 Thread Serguei Spitsyn
The `VirtualThread` static field `notifyJvmtiEvents` is not set correctly in cases JVMTI agents are loaded into running VM. It is because an extra call to java_lang_VirtualThread::init_static_notify_jvmti_events() is needed. This function is called once at the VM initialization, so this extra cal

Re: RFR: 8296875: Generational ZGC: Refactor loom code [v4]

2022-11-17 Thread Erik Österlund
> The current loom code makes some assumptions about GC that will not work with > generational ZGC. We should make this code more GC agnostic, and provide a > better interface for talking to the GC. > > In particular, > 1) All GCs have a way of encoding oops inside of the heap differently to oop

Re: RFR: 8297173: usageTicks and totalTicks should be volatile to ensure that different threads get the latest ticks

2022-11-17 Thread Severin Gehwolf
On Thu, 17 Nov 2022 06:28:37 GMT, Poison wrote: > As the title says, add the volatile modifier. Seems OK to me. - Marked as reviewed by sgehwolf (Reviewer). PR: https://git.openjdk.org/jdk/pull/11199

Re: RFR: 8296886: Fix various include sort order issues [v2]

2022-11-17 Thread Stefan Karlsson
On Fri, 11 Nov 2022 21:01:31 GMT, Kim Barrett wrote: >> Stefan Karlsson has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains three commits: >> >> - Cleanups >> - Merge remote-tracking branch 'upstream/master' into >> various_include

Re: RFR: 8296886: Fix various include sort order issues [v2]

2022-11-17 Thread Stefan Karlsson
On Wed, 16 Nov 2022 16:17:48 GMT, Stefan Karlsson wrote: >> The sorted blocks of includes have deteriorated to the point that I felt >> compelled to clean up some of the issues. >> >> One of the more prevalent issues is that files in src/hotspot/share/include >> are not properly sorted. There

Re: RFR: 8296886: Fix various include sort order issues [v2]

2022-11-17 Thread Stefan Karlsson
On Mon, 14 Nov 2022 11:39:10 GMT, Kim Barrett wrote: >> src/hotspot/os/windows/jvm_windows.cpp line 27: >> >>> 25: #include "precompiled.hpp" >>> 26: #include "include/jvm.h" >>> 27: #include "os_windows.hpp" >> >> os_windows should be at the end, included using `OS_HEADER("os")`. > > But shoul