RFR: 8301403: Eliminate memory allocations in JVMFlag::printFlags during signal handling [v5]
Johan Sjölen
jsjolen at openjdk.org
Mon Jul 22 19:17:32 UTC 2024
On Sun, 21 Jul 2024 22:32:05 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> src/hotspot/share/runtime/flags/jvmFlag.cpp line 710:
>>
>>> 708: size_t best_i = 0;
>>> 709: for (size_t i = 0; i < length; i++) {
>>> 710: if (!iteratorMarkers.at(i) && flagTable[i].is_unlocked() && !(skipDefaults && flagTable[i].is_default())) {
>>
>> Why does `!(skipDefaults && flagTable[i].is_default())` compute `flagTable[i].is_default()` if `skipDefaults = true`?
>
> Because if they are both true we negate and skip. ???
I missed that this is pre-existent. Now that I read it, I get it, it really didn't click yesterday. "Check if it's default, and if we should skip defaults then skip it."
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20202#discussion_r1687033640
More information about the hotspot-runtime-dev
mailing list