On Mon, 8 May 2023 23:13:05 GMT, Paul Hohensee <p...@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: > > Implement 32-bit linux Atomic::add() src/hotspot/share/runtime/atomic.hpp line 310: > 308: > 309: // Platform-specific implementation of add. Support for sizes of 4 > 310: // and 8 bytes are required. The class must be default constructable, Comment change seems unnecessary. src/hotspot/share/services/management.cpp line 2107: > 2105: // when result is initialized. The iterator is created and > initialized > 2106: // before the call to exited_allocated_bytes to ensure we don't miss > 2107: // accounting for threads that are just about to terminate. Sorry this is only accurate if a thread updates `exited_allocated_bytes` after it removes itself from the Threads-list. src/jdk.management/share/classes/com/sun/management/ThreadMXBean.java line 119: > 117: * @implSpec The default implementation throws > UnsupportedOperationException > 118: * if the Java virtual machine implementation does not support thread > 119: * memory allocation measuremust, and otherwise acts as though thread Typo: measuremust ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1188021732 PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1188023201 PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1188022520