Withdrawn: 8351925: JFR: Microsecond time format precision for JFR tool
Aleksey Shipilev
shade at openjdk.org
Mon Apr 7 08:47:58 UTC 2025
On Thu, 13 Mar 2025 10:24:08 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Currently, JFR tool formats the times with millisecond precision:
>
>
> jdk.ThreadSleep {
> startTime = 10:48:56.668 (2025-03-13)
> duration = 100 ms
> time = 100 ms
> eventThread = "main" (javaThreadId = 3)
> stackTrace = [...]
> }
>
>
> In modern world, a lot can happen within a millisecond. So it would be better to default to microsecond precision. Both timesources supported by JFR (RDTSC and os::elapsed_counter()) have enough enough precision to satisfy microsecond output, so microseconds are meaningful.
>
> After the patch:
>
>
> jdk.ThreadSleep {
> startTime = 11:23:32.314580 (2025-03-13)
> duration = 100 ms
> time = 100 ms
> eventThread = "main" (javaThreadId = 3)
> stackTrace = [...]
> }
>
>
> I think durations should also be more precise -- for example to compute the endTime precisely from (startTime+duration), but that is a more controversial/style question, so I would like to handle it separately.
This pull request has been closed without being integrated.
-------------
PR: https://git.openjdk.org/jdk/pull/24029
More information about the hotspot-jfr-dev
mailing list