[jdk16] RFR: 8259765: ZGC: Handle incorrect processor id reported by the operating system [v2]

Per Liden pliden at openjdk.java.net
Tue Jan 19 08:35:46 UTC 2021


On Fri, 15 Jan 2021 21:59:56 GMT, Per Liden <pliden at openjdk.org> wrote:

>> src/hotspot/os/linux/os_linux.cpp line 4749:
>> 
>>> 4747: }
>>> 4748: 
>>> 4749: static volatile int warn_invalid_processor_id = 1;
>> 
>> Maybe moving this var into the function, since it's only used inside it.
>
> Doing so will come with the cost of always having to run a pthread_once() in function entry.

I'm was wrong here. Since the initialization if effectively const/constexp, there will not be any "pthread_once" overhead here. Moved the static variable inside the function in the latest commit.

-------------

PR: https://git.openjdk.java.net/jdk16/pull/124



More information about the hotspot-gc-dev mailing list