Re: RFR: 8303242: ThreadMXBean issues with virtual threads

2023-02-28 Thread Mandy Chung
On Mon, 27 Feb 2023 12:23:09 GMT, Alan Bateman wrote: > This PR covers a number of issues with j.l.management.ThreadMXBean, and the > JDK-specific extension c.s.management.ThreadMXBean, when there are virtual > threads in use. > > As background, ThreadMXBean was re-specified in Java 19 to supp

Re: RFR: 8303242: ThreadMXBean issues with virtual threads [v3]

2023-03-01 Thread Mandy Chung
On Wed, 1 Mar 2023 12:39:52 GMT, Alan Bateman wrote: >> This PR covers a number of issues with j.l.management.ThreadMXBean, and the >> JDK-specific extension c.s.management.ThreadMXBean, when there are virtual >> threads in use. >> >> As background, ThreadMXBean was re-specified in Java 19 to

Re: RFR: 8303242: ThreadMXBean issues with virtual threads [v3]

2023-03-01 Thread Mandy Chung
On Wed, 1 Mar 2023 11:40:26 GMT, Alan Bateman wrote: >> test/jdk/java/lang/management/ThreadMXBean/VirtualThreads.java line 258: >> >>> 256: long tid = Thread.currentThread().threadId(); >>> 257: long cpuTime = bean.getThreadCpuTime(tid); >>> 258: assertEquals

Re: RFR: 8303242: ThreadMXBean issues with virtual threads [v3]

2023-03-01 Thread Mandy Chung
On Wed, 1 Mar 2023 12:39:52 GMT, Alan Bateman wrote: >> This PR covers a number of issues with j.l.management.ThreadMXBean, and the >> JDK-specific extension c.s.management.ThreadMXBean, when there are virtual >> threads in use. >> >> As background, ThreadMXBean was re-specified in Java 19 to

Re: RFR: 8303242: ThreadMXBean issues with virtual threads [v4]

2023-03-02 Thread Mandy Chung
On Thu, 2 Mar 2023 08:18:03 GMT, Alan Bateman wrote: >> This PR covers a number of issues with j.l.management.ThreadMXBean, and the >> JDK-specific extension c.s.management.ThreadMXBean, when there are virtual >> threads in use. >> >> As background, ThreadMXBean was re-specified in Java 19 to

Re: RFR: 8298966: Deprecate JMX Subject Delegation and the method JMXConnector.getMBeanServerConnection(Subject) for removal. [v2]

2023-03-13 Thread Mandy Chung
On Fri, 3 Mar 2023 11:46:49 GMT, Kevin Walls wrote: >> Deprecate the Java Management Extension (JMX) Subject Delegation feature for >> removal in a future release. >> >> Given no known usage, there is no replacement feature for JMX Subject >> Delegation. >> >> CSR is https://bugs.openjdk.org/

RFR: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library

2023-03-17 Thread Mandy Chung
`ModuleInfoWriter` is not used by the runtime. Move it to the test library as `jdk.test.lib.util.ModuleInfoWriter`. The tests are updated to use the test library instead. `ModuleInfoWriter` depends on `jdk.internal.module` types and the Classfile API. Hence `@modules java.base/jdk.intern

Re: RFR: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library [v2]

2023-03-18 Thread Mandy Chung
ce `@modules > java.base/jdk.internal.classfile` and other classfile subpackages are added. Mandy Chung has updated the pull request incrementally with one additional commit since the last revision: move @library after @modules per the recommended ordering - Changes: - all: https://git.

Re: RFR: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library

2023-03-18 Thread Mandy Chung
On Fri, 17 Mar 2023 22:01:46 GMT, Mandy Chung wrote: > `ModuleInfoWriter` is not used by the runtime. Move it to the test library > as `jdk.test.lib.util.ModuleInfoWriter`. The tests are updated to use the > test library instead. `ModuleInfoWriter` depends on `jdk.intern

Re: RFR: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library [v2]

2023-03-20 Thread Mandy Chung
On Mon, 20 Mar 2023 06:57:32 GMT, Jaikiran Pai wrote: >> test/jdk/java/lang/ModuleTests/AnnotationsTest.java line 61: >> >>> 59: * java.base/jdk.internal.module >>> 60: * @library /test/lib >>> 61: * @build jdk.test.lib.util.ModuleInfoWriter >> >> You don't need to build library cla

Integrated: JDK-8304163: Move jdk.internal.module.ModuleInfoWriter to the test library

2023-03-20 Thread Mandy Chung
On Fri, 17 Mar 2023 22:01:46 GMT, Mandy Chung wrote: > `ModuleInfoWriter` is not used by the runtime. Move it to the test library > as `jdk.test.lib.util.ModuleInfoWriter`. The tests are updated to use the > test library instead. `ModuleInfoWriter` depends on `jdk.intern

Re: RFR: 8304919: Implementation of Virtual Threads [v4]

2023-03-29 Thread Mandy Chung
On Wed, 29 Mar 2023 08:00:36 GMT, Alan Bateman wrote: >> JEP 444 proposes to make virtual threads a permanent feature in Java 21. The >> APIs that were preview APIs in Java 19/20 are changed to permanent and their >> `@since`/equivalent are changed to 21 (as per the guidance in JEP 12). The >>

Re: RFR: 8304074: [JMX] Add an approximation of total bytes allocated on the Java heap by the JVM [v23]

2023-05-23 Thread Mandy Chung
On Fri, 19 May 2023 13:54:13 GMT, Paul Hohensee wrote: >> Please review this addition to com.sun.management.ThreadMXBean that returns >> the total number of bytes allocated on the Java heap since JVM launch by >> both terminated and live threads. >> >> Because this PR adds a new interface meth

Re: RFR: 8304074: [JMX] Add an approximation of total bytes allocated on the Java heap by the JVM [v23]

2023-05-25 Thread Mandy Chung
On Wed, 24 May 2023 16:50:59 GMT, Paul Hohensee wrote: >> test/jdk/com/sun/management/ThreadMXBean/ThreadAllocatedMemory.java line 160: >> >>> 158: try { >>> 159: curThread.join(); >>> 160: } catch (InterruptedException e) { >> >> should it just let `InterruptedExcep

Re: RFR: 8304074: [JMX] Add an approximation of total bytes allocated on the Java heap by the JVM [v28]

2023-05-26 Thread Mandy Chung
On Fri, 26 May 2023 16:41:32 GMT, Paul Hohensee wrote: >> Please review this addition to com.sun.management.ThreadMXBean that returns >> the total number of bytes allocated on the Java heap since JVM launch by >> both terminated and live threads. >> >> Because this PR adds a new interface meth

Re: RFR: 8309406: Change jdk.trackAllThreads to default to true

2023-06-05 Thread Mandy Chung
On Sat, 3 Jun 2023 13:41:53 GMT, Alan Bateman wrote: > Virtual threads created directly with the Thread API are not included in the > new thread dump by default. This was a source of confusion in JDK 19/20 when > virtual threads were in preview. We have decided to switch the default so > that

Re: RFR: 8304478: Initial nroff manpage generation for JDK 22

2023-06-14 Thread Mandy Chung
On Wed, 14 Jun 2023 04:53:58 GMT, David Holmes wrote: > Updated the version to 22-ea and year to 2024. > > The following unpublished changes will also be included in this update: > - [JDK-8290626](https://bugs.openjdk.org/browse/JDK-8290626): keytool manpage > contains a special character > - [

Re: RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks

2023-06-22 Thread Mandy Chung
On Thu, 22 Jun 2023 10:10:07 GMT, Kevin Walls wrote: > JNI calls were identified, where we do not check for a pending Exception > afterwards. > > (JDK-8162530 cleaned up up some of these kind of issues some years back, but > more were found.) > > I tested a code change to manually create an E

Re: RFR: 8310628: GcInfoBuilder.c missing JNI Exception checks

2023-06-23 Thread Mandy Chung
On Thu, 22 Jun 2023 10:10:07 GMT, Kevin Walls wrote: > JNI calls were identified, where we do not check for a pending Exception > afterwards. > > (JDK-8162530 cleaned up up some of these kind of issues some years back, but > more were found.) > > I tested a code change to manually create an E

Re: RFR: 8310816: GcInfoBuilder float/double signature mismatch

2023-06-23 Thread Mandy Chung
On Fri, 23 Jun 2023 18:10:59 GMT, Kevin Walls wrote: > Simple typo in a signature which is passed to JNU_NewObjectByName. The > method clearly intentds to pass Float, but uses Double. > > This code is probably not invoked, unless there is a GC MXBean with such > fields. I see no straightforw

Re: [jdk19] RFR: 8290562: ThreadMXBean.getThread{Cpu, User}Time fails with -XX:-VMContinuations [v2]

2022-08-03 Thread Mandy Chung
On Wed, 3 Aug 2022 14:37:52 GMT, Alan Bateman wrote: >> ThreadMXBean.getThread{Cpu,User}Time is specified to return -1L when invoked >> with the id of a virtual thread. This isn't so when running with >> -XX:-VMContinuations (or ports without support for continuations in the VM) >> as it retur

Re: RFR: 8289610: Degrade Thread.stop

2022-09-13 Thread Mandy Chung
On Fri, 9 Sep 2022 12:44:31 GMT, Alan Bateman wrote: > Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for > removal, and remove the remaining special handling of ThreadDeath from the > JDK. > > Thread.stop is inherently unsafe and has been deprecated since JDK 1.2 (199

Re: RFR: 8289610: Degrade Thread.stop [v2]

2022-09-14 Thread Mandy Chung
On Wed, 14 Sep 2022 14:09:52 GMT, Alan Bateman wrote: >> Degrade Thread.stop to throw UOE unconditionally, deprecate ThreadDeath for >> removal, and remove the remaining special handling of ThreadDeath from the >> JDK. >> >> Thread.stop is inherently unsafe and has been deprecated since JDK 1.

Re: RFR: 8293810: Remove granting of RuntimePermission("stopThread") from tests

2022-10-05 Thread Mandy Chung
On Wed, 5 Oct 2022 15:01:15 GMT, Alan Bateman wrote: > This is a test only change to remove the granting of > RuntimePermission("stopThread") from the tests. With Thread.stop changed to > throw UOE it means there is nothing that requires this permission. LGTM - Marked as reviewed

Re: [jdk21] RFR: 8300937: Update nroff pages in JDK 21 before RC

2023-07-31 Thread Mandy Chung
On Mon, 31 Jul 2023 08:33:07 GMT, David Holmes wrote: > Main changes are to use 21 instead of 21-ea. In addition the following files > contain additional updates from the closed sources: > > - src/java.base/share/man/java.1 > > [JDK-8273131](https://bugs.openjdk.org/browse/JDK-8273131): Updat

Re: Question on why sun.management MBeans are not exported?

2023-09-06 Thread mandy . chung
On 9/6/23 8:17 AM, Volker Simonis wrote: Anyway, if you classify the MBeans in "sun.management" as non-critical internal APIs (with respect to JEP 260) but without any "internal" usage, than we should really remove them, right, because an internal API without any internal usage doesn't make any

Re: Question on why sun.management MBeans are not exported?

2023-09-07 Thread mandy . chung
What we're referring to is to remove sun.management.Hotspot*, the internal MBeans which are never exposed and registered in the platform MBeanServer.   The internal metrics in HotSpot VM should be retained as they are exposed through other ways like jstat, GC logs, etc. Mandy On 9/6/23 11:27

Re: RFR: 8315702: jcmd Thread.dump_to_file slow with millions of virtual threads

2023-09-07 Thread Mandy Chung
On Wed, 6 Sep 2023 07:02:53 GMT, Alan Bateman wrote: > `HotSpotDiagnosticMXBean.dumpThreads` and `jcmd Thread.dump_to_file` are slow > when there is a large number of threads. > > The thread dump can be sped up significantly with some small changes: > - Using println rather than format when pri

Re: RFR: 8320652: ThreadInfo.isInNative needs to be updated to say what executing native code means

2023-11-27 Thread Mandy Chung
On Thu, 23 Nov 2023 10:25:31 GMT, Alan Bateman wrote: > This is a docs only change to j.l.management.ThreadInfo::isInNative. > > The method currently specifies that it tests if the thread is "executing > native code via the Java Native Interface (JNI)". It would be clearer to say > that it

Re: RFR: 8320652: ThreadInfo.isInNative needs to be updated to say what executing native code means [v2]

2023-11-27 Thread Mandy Chung
On Mon, 27 Nov 2023 20:38:03 GMT, Bernd wrote: >> src/java.management/share/classes/java/lang/management/ThreadInfo.java line >> 552: >> >>> 550: * java.lang.invoke.MethodHandle method handle} obtained from the >>> 551: * {@linkplain java.lang.foreign.Linker native linker}. >>> 552:

Re: RFR: 8320652: ThreadInfo.isInNative needs to be updated to say what executing native code means [v2]

2023-11-27 Thread Mandy Chung
On Mon, 27 Nov 2023 20:31:23 GMT, Alan Bateman wrote: >> This is a docs only change to j.l.management.ThreadInfo::isInNative. >> >> The method currently specifies that it tests if the thread is "executing >> native code via the Java Native Interface (JNI)". It would be clearer to >> say tha

Re: RFR: 8320652: ThreadInfo.isInNative needs to be updated to say what executing native code means [v3]

2023-12-01 Thread Mandy Chung
On Fri, 1 Dec 2023 12:16:29 GMT, Alan Bateman wrote: >> This is a docs only change to j.l.management.ThreadInfo::isInNative. >> >> The method currently specifies that it tests if the thread is "executing >> native code via the Java Native Interface (JNI)". It would be clearer to >> say that

Re: RFR: 8324845: management.properties text "interface name" is misleading [v2]

2024-01-31 Thread Mandy Chung
On Wed, 31 Jan 2024 21:29:14 GMT, Kevin Walls wrote: >> We have the text "host-or-interface-name" describing the >> com.sun.management.jmxremote.host property in management.properties, but >> interface names (like "eth0" or "lo", or "ens3"...) are not what it accepts. >> It should just say it

Re: RFR: 8326666: Remove the Java Management Extension (JMX) Subject Delegation feature [v7]

2024-03-11 Thread Mandy Chung
On Mon, 11 Mar 2024 10:09:28 GMT, Kevin Walls wrote: >> The deprecated Subject Delegation feature in JMX will be removed. >> >> This was marked in JDK 21 as deprecated for removal (JDK-8298966). > > Kevin Walls has updated the pull request incrementally with one additional > commit since the la

Re: RFR: 8326666: Remove the Java Management Extension (JMX) Subject Delegation feature [v7]

2024-03-11 Thread Mandy Chung
On Mon, 11 Mar 2024 18:49:43 GMT, Daniel Fuchs wrote: >> I was wondering if we should add a note at the class-level API documentation >> to say that subject delegation has been removed (or is no longer supported), >> and that methods will throw UOE if a non-null delegation subject is passed. >

Re: RFR: 8326666: Remove the Java Management Extension (JMX) Subject Delegation feature [v10]

2024-03-13 Thread Mandy Chung
On Tue, 12 Mar 2024 19:58:24 GMT, Kevin Walls wrote: >> The deprecated Subject Delegation feature in JMX will be removed. >> >> This was marked in JDK 21 as deprecated for removal (JDK-8298966). > > Kevin Walls has updated the pull request incrementally with one additional > commit since the la

Re: RFR: 8326666: Remove the Java Management Extension (JMX) Subject Delegation feature [v12]

2024-03-14 Thread Mandy Chung
On Thu, 14 Mar 2024 12:23:09 GMT, Kevin Walls wrote: >> The deprecated Subject Delegation feature in JMX will be removed. >> >> This was marked in JDK 21 as deprecated for removal (JDK-8298966). > > Kevin Walls has updated the pull request incrementally with one additional > commit since the la

Re: RFD: Remove Hotspot-internal MBeans from sun.management

2024-03-19 Thread mandy . chung
Would a PR to remove these APIs be welcome? Good with me. Mandy On 3/19/24 9:41 AM, Eirik Bjørsnøs wrote: Hi, Last September, Volker shared the observation that we have Hotspot-internal MBeans in sun.management which are strongly encapsulated and not used internally by OpenJDK besides th

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v2]

2024-10-22 Thread Mandy Chung
On Fri, 18 Oct 2024 19:03:30 GMT, Sean Mullan wrote: >> This is the implementation of JEP 486: Permanently Disable the Security >> Manager. See [JEP 486](https://openjdk.org/jeps/486) for more details. The >> [CSR](https://bugs.openjdk.org/browse/JDK-8338412) describes in detail the >> main ch

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager [v6]

2024-10-31 Thread Mandy Chung
On Wed, 30 Oct 2024 19:28:32 GMT, Sean Mullan wrote: >> This is the implementation of JEP 486: Permanently Disable the Security >> Manager. See [JEP 486](https://openjdk.org/jeps/486) for more details. The >> [CSR](https://bugs.openjdk.org/browse/JDK-8338412) describes in detail the >> main ch

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v10]

2024-10-25 Thread Mandy Chung
On Fri, 25 Oct 2024 13:17:23 GMT, Patricio Chilano Mateo wrote: >> This is the implementation of JEP 491: Synchronize Virtual Threads without >> Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for >> further details. >> >> In order to make the code review easier the change

Re: RFR: 8338411: Implement JEP 486: Permanently Disable the Security Manager

2024-10-15 Thread Mandy Chung
On Mon, 14 Oct 2024 13:52:24 GMT, Sean Mullan wrote: > This is the implementation of JEP 486: Permanently Disable the Security > Manager. See [JEP 486](https://openjdk.org/jeps/486) for more details. The > [CSR](https://bugs.openjdk.org/browse/JDK-8338412) describes in detail the > main change

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning

2024-11-06 Thread Mandy Chung
On Thu, 17 Oct 2024 14:28:30 GMT, Patricio Chilano Mateo wrote: > This is the implementation of JEP 491: Synchronize Virtual Threads without > Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for > further details. > > In order to make the code review easier the changes hav

Re: RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714 [v2]

2024-12-05 Thread Mandy Chung
On Thu, 5 Dec 2024 20:44:59 GMT, Chen Liang wrote: >> Remove the redundant `@enablePreview` and `--enable-preview` flags for >> enabling ClassFile API in the tests. The remainder of these flags in all >> tests seem to serve preview APIs (such as ScopedValue) or language features >> (primitive

Re: RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714 [v2]

2024-12-05 Thread Mandy Chung
On Thu, 5 Dec 2024 20:44:59 GMT, Chen Liang wrote: >> Remove the redundant `@enablePreview` and `--enable-preview` flags for >> enabling ClassFile API in the tests. The remainder of these flags in all >> tests seem to serve preview APIs (such as ScopedValue) or language features >> (primitive

Re: [jdk24] RFR: 8334733: Remove obsolete @enablePreview from tests after JDK-8334714

2024-12-09 Thread Mandy Chung
> This is a test-only change so it is eligible for backport; in addition, this > change is logically part of the Class-File API finalized in JDK 24. > > The commit being backported was authored by Chen Liang on 6 Dec 2024 and was > reviewed by Mandy Chung and Adam Sotona. > >

Re: RFR: 8345984: Remove redundant checkXXX methods from java.management Util class [v2]

2024-12-11 Thread Mandy Chung
On Wed, 11 Dec 2024 13:04:51 GMT, Kevin Walls wrote: >> A post-SecurityManager removal cleanup task, to remove checkAccess(), >> checkMonitorAccess() and checkControlAccess() from >> src/java.management/share/classes/sun/management/Util.java (methods are >> already no-ops). >> >> While here,