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

2023-05-19 Thread Paul Hohensee
> 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 method, I've updated the JMM_VERSION to > 4, but would be happy t

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

2023-05-21 Thread David Holmes
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-22 Thread Paul Hohensee
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-22 Thread David Holmes
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-22 Thread David Holmes
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-22 Thread David Holmes
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-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-24 Thread Paul Hohensee
On Tue, 23 May 2023 18:21:18 GMT, Mandy Chung wrote: >> Paul Hohensee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8304074: atomic load needed in exited_allocated_bytes > > src/jdk.management/share/classes/com/sun/management/ThreadMXB

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

2023-05-24 Thread Paul Hohensee
On Tue, 23 May 2023 18:25:26 GMT, Mandy Chung wrote: >> Paul Hohensee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8304074: atomic load needed in exited_allocated_bytes > > test/jdk/com/sun/management/ThreadMXBean/ThreadAllocatedMemor

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

2023-05-25 Thread Kevin Walls
On Tue, 23 May 2023 02:29:19 GMT, David Holmes wrote: >> Paul Hohensee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8304074: atomic load needed in exited_allocated_bytes > > src/hotspot/share/services/management.cpp line 2104: > >> 2

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 [v23]

2023-05-26 Thread Paul Hohensee
On Thu, 25 May 2023 09:01:14 GMT, Kevin Walls wrote: >> src/hotspot/share/services/management.cpp line 2104: >> >>> 2102: // the final result can only be short due to (1) threads that >>> start after >>> 2103: // the TLH is created, or (2) terminating threads that escape TLH >>> creati

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

2023-05-26 Thread Paul Hohensee
On Thu, 25 May 2023 16:38:43 GMT, Mandy Chung wrote: >> The original implementation grabbed this code from, e.g., >> test/jdk/java/lang/management/ThreadMXBean/ThreadUserTime.java. In the >> latter, InterruptedException causes the test to fail, but for some reason >> now lost, ThreadAllocatedM

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

2023-05-30 Thread Volker Simonis
On Fri, 26 May 2023 16:35:32 GMT, Paul Hohensee wrote: >> The tests and all apps might thank us for keeping last known value, and not >> returning anything lower, ensuring montonicity. > > Fixed using a high water mark. A simple fix for guaranteeing monotonicity, would be to add another field (

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

2023-05-30 Thread Paul Hohensee
On Tue, 30 May 2023 14:20:12 GMT, Volker Simonis wrote: >> Fixed using a high water mark. > > A simple fix for guaranteeing monotonicity, would be to add another field > (e.g. `max_allocated_bytes`) which keeps the last result returned by > `getTotalThreadAllocatedBytes()` and the latter would