RFR: JDK-8305506: Add support for fractional values of SafepointTimeoutDelay

Martin Doerr mdoerr at openjdk.org
Fri Apr 21 10:34:43 UTC 2023


On Thu, 6 Apr 2023 13:23:40 GMT, Wojciech Kudla <duke at openjdk.org> wrote:

> As stated in https://bugs.openjdk.org/browse/JDK-8305506 this change replaces SafepointTimeoutDelay as integer value with a floating point type to support sub-millisecond SafepointTimeout thresholds.
> This is immensely useful for investigating time-to-safepoint issues in low latency space.

Changing the type of a product flag requires a CSR (https://wiki.openjdk.org/display/csr/CSR+FAQs).

src/hotspot/share/runtime/safepoint.cpp line 382:

> 380:     // Set the limit time, so that it can be compared to see if this has taken
> 381:     // too long to complete.
> 382:     safepoint_limit_time = SafepointTracing::start_of_safepoint() + (jlong)SafepointTimeoutDelay * NANOSECS_PER_MILLISEC;

I think it should be `(SafepointTimeoutDelay * NANOSECS_PER_MILLISEC)` before converting to jlong.

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

PR Review: https://git.openjdk.org/jdk/pull/13373#pullrequestreview-1395517750
PR Review Comment: https://git.openjdk.org/jdk/pull/13373#discussion_r1173610701


More information about the hotspot-dev mailing list