RFR: 8319876: Reduce memory consumption of VM_ThreadDump::doit [v2]

Stefan Karlsson stefank at openjdk.org
Fri Nov 17 08:13:37 UTC 2023


On Mon, 13 Nov 2023 02:01:09 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Long Yang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   move ResourceMark to before start_vf
>
> src/hotspot/share/services/threadService.cpp line 698:
> 
>> 696:                         RegisterMap::ProcessFrames::include,
>> 697:                         RegisterMap::WalkContinuation::skip);
>> 698:     ResourceMark rm;
> 
> Nit: Use `rm(VMThread::vm_thread());` to avoid the need to call `Thread::current()`.

FWIW, I don't see the appeal to micro optimize away one call to Thread::current() in a function that performs a massive amount of work.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16598#discussion_r1396841591


More information about the serviceability-dev mailing list