RFR: 8354969: Add strdup function for ResourceArea [v5]
Anton Artemov
duke at openjdk.org
Fri May 16 13:05:55 UTC 2025
On Fri, 16 May 2025 06:31:28 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8354969: Fixed new lines
>
> src/hotspot/os/windows/perfMemory_windows.cpp line 1610:
>
>> 1608: //
>> 1609: char* rfilename = ResourceArea::strdup(filename);
>> 1610: char* robjectname = ResourceArea::strdup(objectname);
>
> As we have `TRAPS` available we could use the thread taking variant and save the call to `Thread::current`
Thanks, if I understand what TRAPS is and how it works correctly, reducing to a single thread-taking method would require multiple changes in multiple source files, just to propagate TRAPS -> THREAD sequences to the right place. I think it is better just to have 2 methods.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24998#discussion_r2093008878
More information about the hotspot-dev
mailing list