RFR: 8372584: [Linux]: Replace reading proc to get thread user CPU time with clock_gettime [v3]
Jonas Norlinder
jnorlinder at openjdk.org
Mon Dec 1 11:45:49 UTC 2025
On Mon, 1 Dec 2025 04:04:19 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Jonas Norlinder has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove unused imports
>
> src/hotspot/os/linux/os_linux.cpp line 4968:
>
>> 4966: // POSIX.1-2024/IEEE Std 1003.1-2024 §3.90.
>> 4967: static clockid_t get_thread_clockid(Thread* thread, bool total, bool* success) {
>> 4968: constexpr clockid_t CLOCK_TYPE_MASK = 3;
>
> Shouldn't the mask be covering 3-bits?
No we should not touch bit 3 which encodes if the clock is for a thread of process. See here https://elixir.bootlin.com/linux/v6.17.9/source/include/linux/posix-timers_types.h#L9-L19.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28556#discussion_r2576734534
More information about the hotspot-runtime-dev
mailing list