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

Paul Hohensee phh at openjdk.org
Wed May 24 16:54:11 UTC 2023


On Tue, 23 May 2023 18:25:26 GMT, Mandy Chung <mchung at openjdk.org> 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/ThreadAllocatedMemory.java line 160:
> 
>> 158:         try {
>> 159:             curThread.join();
>> 160:         } catch (InterruptedException e) {
> 
> should it just let `InterruptedException` be thrown rather than swallowing it?  This pattern appears multiple places in this test and ThreadAllocatedMemoryArray.java test.

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, ThreadAllocatedMemory.java doesn't do that, but ThreadAllocatedMemoryArray.java does.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1204504529


More information about the jmx-dev mailing list