RFR: 8317453: NMT: Performance benchmarks are needed to measure speed and memory [v10]
Gerard Ziemski
gziemski at openjdk.org
Wed May 7 16:10:45 UTC 2025
On Mon, 5 May 2025 13:11:57 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> Gerard Ziemski has updated the pull request incrementally with one additional commit since the last revision:
>>
>> use permit_forbidden_function for realloc
>
> src/hotspot/share/nmt/memLogRecorder.cpp line 155:
>
>> 153: // TODO: NMT_LogRecorder::thread_name
>> 154: #endif
>> 155: }
>
> `Thread::current()->name()`
`Thread::current()->name()` has different semantics. It uses names for partially constructed threads, like `<no-name - thread is attaching>`, and `Unknown thread`, and since we save the thread name the 1st time, we currently get a name and we will be stuck with it forever.
On the other hand, when `pthread_getname_np()` returns a string, we get a real final value.
To go with `Thread::current()->name()` I need to check for those special temp names and skip those, but I agree, it is worth to use platform independent API here.
I will make a change.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23786#discussion_r2077998763
More information about the hotspot-dev
mailing list