On Tue, 9 May 2023 01:04:02 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Do you mean something like:
>> 
>>     JavaThreadIteratorWithHandle jtiwh;
>>     jlong result = ThreadService::exited_allocated_bytes();
>>     while (JavaThread *thread = jtiwh.next()) {
>>       ...
>> 
>> That would be fine for me. Otherwise I agree with the current compromise 
>> between accuracy and speed.
>
> Yes. Though I realize my comment needed to make clear that you need a thread 
> to update the count after it has removed itself from the thread-list, for 
> this to be an improvement.

Done as Volker suggests.

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

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

Reply via email to