On Fri, 17 Nov 2023 08:10:21 GMT, Stefan Karlsson <stef...@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