RFR: 8304074: [JMX] Add an approximation of total bytes allocated on the Java heap by the JVM [v18]
David Holmes
dholmes at openjdk.org
Mon May 15 08:47:55 UTC 2023
On Sun, 14 May 2023 22:50:03 GMT, Paul Hohensee <phh at openjdk.org> 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 method, I've updated the JMM_VERSION to 4, but would be happy to update it to 3_1 instead.
>
> Paul Hohensee has updated the pull request incrementally with one additional commit since the last revision:
>
> 8304704: In getTotalThreadAllocatedBytes javadoc, 'launched' -> 'started'
Sorry to be a pain but can you split the Atomic changes out of this PR into their own issue please.
Though having said that, now that you call incr_exited_allocayed_bytes() where you do, it is protected by the Threads_lock so no atomic add is needed now.
src/hotspot/share/services/#allocationSite.hpp# line 1:
> (failed to retrieve contents of file, check the PR for context)
Shouldn't be here.
src/hotspot/share/services/.#allocationSite.hpp line 1:
> (failed to retrieve contents of file, check the PR for context)
Shouldn't be here.
src/hotspot/share/services/threadService.hpp line 65:
> 63:
> 64: // As could this...
> 65: // Number of heap bytes allocated by termianted threads.
typo: termianted
-------------
Changes requested by dholmes (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13814#pullrequestreview-1426048798
PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1193513616
PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1193513762
PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1193518539
More information about the hotspot-runtime-dev
mailing list