Re: RFR: 8296472: Remove ObjectLocker around appendToClassPathForInstrumentation call [v3]

2022-11-08 Thread Alan Bateman
On Tue, 8 Nov 2022 04:23:13 GMT, David Holmes wrote: > Note the loader involved need not be our own default platform loader and we > don't know how a custom system loader might operate. The specification for > this says nothing about thread-safety, nor that the VM will do any locking, > so I t

Re: RFR: JDK-8293450 Convert test/closed/sun/management/ shell tests to Java version

2022-11-08 Thread Serguei Spitsyn
On Mon, 7 Nov 2022 19:23:05 GMT, Bill Huang wrote: > There is no new changes in the open portion of JDK, but extracting common > functionalities in bootstrap Utils to test/lib/Utils which can be used in the > closed part. test/lib/jdk/test/lib/Utils.java line 980: > 978:

Re: RFR: JDK-8293450 Convert test/closed/sun/management/ shell tests to Java version

2022-11-08 Thread Serguei Spitsyn
On Mon, 7 Nov 2022 19:23:05 GMT, Bill Huang wrote: > There is no new changes in the open portion of JDK, but extracting common > functionalities in bootstrap Utils to test/lib/Utils which can be used in the > closed part. I've placed a couple of comments. Otherwise, it looks okay to me. Thanks

Re: RFR: JDK-8293450 Convert test/closed/sun/management/ shell tests to Java version

2022-11-08 Thread Serguei Spitsyn
On Mon, 7 Nov 2022 19:23:05 GMT, Bill Huang wrote: > There is no new changes in the open portion of JDK, but extracting common > functionalities in bootstrap Utils to test/lib/Utils which can be used in the > closed part. test/lib/jdk/test/lib/Utils.java line 1007: > 1005:

Re: RFR: 8296492: Remove ObjectLocker in JVMTI get_subgroups call

2022-11-08 Thread Serguei Spitsyn
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 looks nice in general. But I will make another pass.

Re: RFR: 8295303: cleanup debug agent's confusing use of EI_GC_FINISH [v3]

2022-11-08 Thread Serguei Spitsyn
On Tue, 8 Nov 2022 02:30:19 GMT, Chris Plummer wrote: >> This PR renamed EI_GC_FINISH to EI_CLASS_UNLOAD and does some other minor >> cleanups related to EI_GC_FINISH. >> >> The debug agent deals with 3 types of events: JVMTI (per the spec), JDWP >> (per the spec), and an event indexing that t

Re: RFR: 8296492: Remove ObjectLocker in JVMTI get_subgroups call

2022-11-08 Thread Alan Bateman
On Tue, 8 Nov 2022 04:45:17 GMT, David Holmes wrote: > This is a nice simplification of the VM side of the code! I do have to wonder > why this was implemented the way it was rather than doing the simple upcall > as you now do, but I suspect it was just performance, I don't think JVMTI GetThre

Re: RFR: 8296492: Remove ObjectLocker in JVMTI get_subgroups call

2022-11-08 Thread Alan Bateman
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. src/java.base/share/classes/java/lang/ThreadGroup.java lin

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

2022-11-08 Thread Maurizio Cimadamore
> 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://openjdk.org/jeps/434 Maurizio Cimadamore has updated the pull request incr

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

2022-11-08 Thread Alan Bateman
On Mon, 7 Nov 2022 15:00:02 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://openjdk

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

2022-11-08 Thread Maurizio Cimadamore
> 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://openjdk.org/jeps/434 Maurizio Cimadamore has updated the pull request incr

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

2022-11-08 Thread Alan Bateman
On Tue, 8 Nov 2022 10:42:13 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://openjdk

Re: RFR: 8296492: Remove ObjectLocker in JVMTI get_subgroups call

2022-11-08 Thread Coleen Phillimore
On Tue, 8 Nov 2022 10:05:34 GMT, Alan Bateman 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. > > src/java.base/share/classes/java/lang/ThreadGroup.java li

Re: RFR: 8296492: Remove ObjectLocker in JVMTI get_subgroups call

2022-11-08 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. Thanks Alan for your comment - yes, I think doing upcalls

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

2022-11-08 Thread Coleen Phillimore
> 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 incrementally with one additional commit since the last revision: H

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

2022-11-08 Thread Coleen Phillimore
On Tue, 8 Nov 2022 04:35:48 GMT, David Holmes wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Handle non OOM exceptions and rename subgroupsAsArray. > > src/hotspot/share/prims/jvmtiEnvBase.cpp line 810: > >>

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

2022-11-08 Thread Alan Bateman
On Tue, 8 Nov 2022 12:30: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 incre

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

2022-11-08 Thread Coleen Phillimore
> 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 incrementally with one additional commit since the last revision: f

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

2022-11-08 Thread Coleen Phillimore
On Tue, 8 Nov 2022 12:48:01 GMT, Alan Bateman wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Handle non OOM exceptions and rename subgroupsAsArray. > > src/java.base/share/classes/java/lang/ThreadGroup.java l

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

2022-11-08 Thread Maurizio Cimadamore
> 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://openjdk.org/jeps/434 Maurizio Cimadamore has updated the pull request incr

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

2022-11-08 Thread Alan Bateman
On Tue, 8 Nov 2022 13:06:50 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 incre

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

2022-11-08 Thread Coleen Phillimore
On Tue, 8 Nov 2022 12:47:29 GMT, Alan Bateman wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Handle non OOM exceptions and rename subgroupsAsArray. > > I wonder if the intermediate resource array is needed no

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

2022-11-08 Thread Coleen Phillimore
> 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 incrementally with one additional commit since the last revision: C

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

2022-11-08 Thread Coleen Phillimore
> 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 incrementally with one additional commit since the last revision: F

Re: RFR: 8296472: Remove ObjectLocker around appendToClassPathForInstrumentation call [v3]

2022-11-08 Thread Alan Bateman
On Mon, 7 Nov 2022 20:40:33 GMT, Coleen Phillimore wrote: >> This patch moves the acquisition of the boot class loader lock out of the >> JVM and into the Java function. >> Tested with tier1-4, and jvmti and jdi tests locally. > > Coleen Phillimore has updated the pull request incrementally with

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

2022-11-08 Thread Jorn Vernee
On Tue, 8 Nov 2022 13:28:58 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://openjdk

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

2022-11-08 Thread Maurizio Cimadamore
> 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://openjdk.org/jeps/434 Maurizio Cimadamore has updated the pull request incr

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

2022-11-08 Thread Jorn Vernee
On Mon, 7 Nov 2022 15:00:02 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://openjdk

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

2022-11-08 Thread Jorn Vernee
On Tue, 8 Nov 2022 16:30:14 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://openjdk

Re: RFR: 8296472: Remove ObjectLocker around appendToClassPathForInstrumentation call [v3]

2022-11-08 Thread Coleen Phillimore
On Mon, 7 Nov 2022 20:40:33 GMT, Coleen Phillimore wrote: >> This patch moves the acquisition of the boot class loader lock out of the >> JVM and into the Java function. >> Tested with tier1-4, and jvmti and jdi tests locally. > > Coleen Phillimore has updated the pull request incrementally with

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

2022-11-08 Thread Maurizio Cimadamore
> 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://openjdk.org/jeps/434 Maurizio Cimadamore has updated the pull request incr

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

2022-11-08 Thread Jorn Vernee
On Tue, 8 Nov 2022 18:14:21 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://openjdk

Re: RFR: JDK-8293450 Convert test/sun/management/ shell tests to Java version [v2]

2022-11-08 Thread Bill Huang
> There is no new changes in the open portion of JDK, but extracting common > functionalities in bootstrap Utils to test/lib/Utils which can be used in the > closed part. Bill Huang has updated the pull request incrementally with one additional commit since the last revision: Implemented rev

Re: RFR: JDK-8293450 Convert test/sun/management/ shell tests to Java version

2022-11-08 Thread Bill Huang
On Tue, 8 Nov 2022 08:39:39 GMT, Serguei Spitsyn wrote: >> There is no new changes in the open portion of JDK, but extracting common >> functionalities in bootstrap Utils to test/lib/Utils which can be used in >> the closed part. > > test/lib/jdk/test/lib/Utils.java line 1007: > >> 1005:

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

2022-11-08 Thread Maurizio Cimadamore
> 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://openjdk.org/jeps/434 Maurizio Cimadamore has updated the pull request incr

Re: RFR: 8295303: cleanup debug agent's confusing use of EI_GC_FINISH [v3]

2022-11-08 Thread Chris Plummer
On Tue, 8 Nov 2022 09:27:33 GMT, Serguei Spitsyn wrote: >> Chris Plummer has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains four commits: >> >> - merge >> - Fixed ei range check logic errors. >> - fix extra whitespace >> - Rename

Re: RFR: 8296472: Remove ObjectLocker around appendToClassPathForInstrumentation call [v3]

2022-11-08 Thread Alan Bateman
On Tue, 8 Nov 2022 17:03:05 GMT, Coleen Phillimore wrote: > Can one create a class loader to override this function, and does one expect > the JVM to synchronize it on the system class loader object (returned by > getSystemClassLoader)? This feels too remote to try to explain in a CSR. > > I'l

Re: RFR: 8295303: cleanup debug agent's confusing use of EI_GC_FINISH [v3]

2022-11-08 Thread Alex Menkov
On Tue, 8 Nov 2022 02:30:19 GMT, Chris Plummer wrote: >> This PR renamed EI_GC_FINISH to EI_CLASS_UNLOAD and does some other minor >> cleanups related to EI_GC_FINISH. >> >> The debug agent deals with 3 types of events: JVMTI (per the spec), JDWP >> (per the spec), and an event indexing that t

Integrated: 8295303: cleanup debug agent's confusing use of EI_GC_FINISH

2022-11-08 Thread Chris Plummer
On Thu, 27 Oct 2022 18:06:38 GMT, Chris Plummer wrote: > This PR renamed EI_GC_FINISH to EI_CLASS_UNLOAD and does some other minor > cleanups related to EI_GC_FINISH. > > The debug agent deals with 3 types of events: JVMTI (per the spec), JDWP (per > the spec), and an event indexing that the d

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

2022-11-08 Thread Maurizio Cimadamore
> 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://openjdk.org/jeps/434 Maurizio Cimadamore has updated the pull request incr

Re: RFR: 8295303: cleanup debug agent's confusing use of EI_GC_FINISH [v3]

2022-11-08 Thread Chris Plummer
On Tue, 8 Nov 2022 02:30:19 GMT, Chris Plummer wrote: >> This PR renamed EI_GC_FINISH to EI_CLASS_UNLOAD and does some other minor >> cleanups related to EI_GC_FINISH. >> >> The debug agent deals with 3 types of events: JVMTI (per the spec), JDWP >> (per the spec), and an event indexing that t

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

2022-11-08 Thread Maurizio Cimadamore
> 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://openjdk.org/jeps/434 Maurizio Cimadamore has updated the pull request incr

Re: RFR: 8296472: Remove ObjectLocker around appendToClassPathForInstrumentation call [v3]

2022-11-08 Thread Coleen Phillimore
On Mon, 7 Nov 2022 20:40:33 GMT, Coleen Phillimore wrote: >> This patch moves the acquisition of the boot class loader lock out of the >> JVM and into the Java function. >> Tested with tier1-4, and jvmti and jdi tests locally. > > Coleen Phillimore has updated the pull request incrementally with

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

2022-11-08 Thread David Holmes
On Tue, 8 Nov 2022 14:55:17 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 incre

Re: RFR: 8296472: Remove ObjectLocker around appendToClassPathForInstrumentation call [v3]

2022-11-08 Thread David Holmes
On Tue, 8 Nov 2022 22:08:06 GMT, Coleen Phillimore wrote: > in the custom class loader must synchronize appending to the class path I would say: "in the custom class loader must append to the class path in a thread-safe manner." - PR: https://git.openjdk.org/jdk/pull/11023

Re: RFR: 8296089: Remove debug agent code for special handling of Thread.resume() [v2]

2022-11-08 Thread Chris Plummer
> The debug agent sets a breakpoint in Thread.resume() so it can prevent the > debugger from suspending threads while in the resume call: > > /* > * Track the resuming thread by marking it as being within > * a resume and by setting up for notification on

Re: RFR: 8296089: Remove debug agent code for special handling of Thread.resume() [v2]

2022-11-08 Thread Chris Plummer
On Wed, 9 Nov 2022 05:57:32 GMT, Chris Plummer wrote: >> The debug agent sets a breakpoint in Thread.resume() so it can prevent the >> debugger from suspending threads while in the resume call: >> >> /* >> * Track the resuming thread by marking it as being within >>