RFR: 8317453: NMT: Performance benchmarks are needed to measure speed and memory [v15]
Johan Sjölen
jsjolen at openjdk.org
Tue May 20 08:58:53 UTC 2025
On Thu, 8 May 2025 14:29:27 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:
>> src/hotspot/share/nmt/memLogRecorder.hpp line 67:
>>
>>> 65: protected:
>>> 66: volatile size_t _threads_names_size = 0;
>>> 67: typedef struct thread_name_info {
>>
>> Remove the `typedef`, not necessary in C++.
>
> Hmm, without it, I get a `must use 'struct' tag to refer to type 'thread_name_info' in this scope` error here:
>
> ` thread_name_info* _threads_names = nullptr;
> `
>
> I could fix it by putting `struct` in front of `thread_name_info` every time I use, but I'd rather keeep:
>
> `typedef struct thread_name_info {`
>
> and not worry anymore about it.
Please don't resolve conversations too early, it's hard to find your comments when the conversations are resolved!
That's strange, did you remove the trailing `thread_name_info` as well?
```c++
struct thread_name_info {
char name[MAXTHREADNAMESIZE];
long int thread;
};
This should not be an issue in C++, are you using `thread_name_info` in some other place?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23786#discussion_r2097404317
More information about the hotspot-dev
mailing list