RFR: 8319876: Reduce memory consumption of VM_ThreadDump::doit [v2]
David Holmes
dholmes at openjdk.org
Mon Nov 20 08:02:43 UTC 2023
On Fri, 17 Nov 2023 08:10:21 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> 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.
In runtime, we prefer to always use an available reference to the current thread than look it up via `Thread::current()`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16598#discussion_r1398776709
More information about the serviceability-dev
mailing list