RFR: 8307766: Linux: Provide the option to override the timer slack [v2]

Aleksey Shipilev shade at openjdk.org
Mon May 22 09:10:28 UTC 2023


On Mon, 22 May 2023 01:31:06 GMT, David Holmes <dholmes at openjdk.org> wrote:

> If this is really of use to people then I expect it would also be useful to know what the current setting is for a thread - perhaps either logged at thread creation, or perhaps included in one of the thread `print_on` functions?

Yes, that would be a good thing to add, see new commit. I tried to limit the fan-out for this change by printing the timer slack in Linux-specific thread init block, near the stack printing.

> src/hotspot/os/linux/os_linux.cpp line 4650:
> 
>> 4648:   }
>> 4649: 
>> 4650:   // Override the timer slack value if needed.
> 
> This needs more explanation. This is a per-thread setting, so by doing it here we change the main JVM thread so that subsequent threads created by this thread will also inherit the new value. Any native threads attaching to the JVM will have their own values.

Done.

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

PR Comment: https://git.openjdk.org/jdk/pull/13889#issuecomment-1556837422
PR Review Comment: https://git.openjdk.org/jdk/pull/13889#discussion_r1200219055


More information about the hotspot-runtime-dev mailing list