Integrated: 8327799: JFR view: the "Park Until" field of jdk.ThreadPark is invalid if the parking method is not absolute
Long Yang
lyang at openjdk.org
Thu Mar 14 11:29:43 UTC 2024
On Tue, 12 Mar 2024 06:27:56 GMT, Long Yang <lyang at openjdk.org> wrote:
> Hi all
>
> Could I have a review of this patch for [JDK-8327799](https://bugs.openjdk.org/browse/JDK-8327799)?
>
>
> UNSAFE.park(true, System.currentTimeMillis() + 1000);
> UNSAFE.park(false, 2000L * 1000 * 1000);
>
>
>
> jfr view jdk.ThreadPark test.jfr
>
> Java Thread Park
> Start Time Duration Event Thread Stack Trace Class Parked On Park Timeout Park Until Address of Object Pa...
> ---------- -------- ------------ ----------------------- --------------- ------------ ---------- -----------------------
> 20:13:21 1.00 s main jdk.internal.misc.Un... N/A N/A 20:13:22 0x00000000
> 20:13:22 2.00 s main jdk.internal.misc.Un... N/A 2.00 s 08:05:43 0x00000000
>
>
> If the parking method is not absolute (the second event), the real value of "until" in JFR event is `Long.MIN_VALUE`, which will be convert back to `java.time.Instant.MIN`, but `JFR view` displays this value as '08:05:43' of my timezone. This is somewhat misleading, better to show as `N/A`, just like what `jfr print --events` does.
>
> Testing:
> test/jdk/jdk/jfr/tool/TestView.java
> test/jdk/jdk/jfr/jcmd/TestJcmdView.java
>
> All passed.
>
> Thanks
This pull request has now been integrated.
Changeset: 6f8b0a33
Author: Long Yang <lyang at openjdk.org>
Committer: Denghui Dong <ddong at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/6f8b0a33fa15f1dfc8b0c116375df0f90d9d8759
Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod
8327799: JFR view: the "Park Until" field of jdk.ThreadPark is invalid if the parking method is not absolute
Reviewed-by: egahlin
-------------
PR: https://git.openjdk.org/jdk/pull/18214
More information about the hotspot-jfr-dev
mailing list