On Tue, 9 May 2023 01:23:23 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/services/threadService.cpp line 224:

> 222: 
> 223:   decrement_thread_counts(jt, daemon);
> 224:   
> ThreadService::incr_exited_allocated_bytes(jt->cooked_allocated_bytes());

Again this is too soon. This should be deferred until after the thread has 
removed itself from the threads-list.

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

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

Reply via email to