Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8327799: JFR view: the "Park Until" field of jdk.ThreadPark is invalid if the parking method is not absolute #366

Closed
wants to merge 1 commit into from

Conversation

yanglong1010
Copy link

@yanglong1010 yanglong1010 commented Mar 15, 2024

Hi, all

Could I have a review of this backport ? I would be very grateful.

This pull request contains a backport of commit 6f8b0a33fa15f1dfc8b0c116375df0f90d9d8759 from the openjdk/jdk repository.

This backport is clean.

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:11:10     1.00 s main         jdk.internal.misc.Un... N/A                      N/A 20:11:11   0x00000000
20:11:11     1.00 s main         jdk.internal.misc.Un... N/A                   1.00 s 08:05:43   0x00000000

If the parking method is not absolute (the second line of the Java code above), the real value of until field in JFR's jdk.ThreadPark 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 (the Park Until column above). This is somewhat misleading, better to show N/A.

Testing:
test/jdk/jdk/jfr/tool/TestView.java
test/jdk/jdk/jfr/jcmd/TestJcmdView.java

All passed.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8327799 needs maintainer approval

Issue

  • JDK-8327799: JFR view: the "Park Until" field of jdk.ThreadPark is invalid if the parking method is not absolute (Bug - P4 - Approved)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/366/head:pull/366
$ git checkout pull/366

Update a local copy of the PR:
$ git checkout pull/366
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/366/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 366

View PR using the GUI difftool:
$ git pr show -t 366

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/366.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 15, 2024

👋 Welcome back lyang! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Mar 15, 2024

@yanglong1010 This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8327799: JFR view: the "Park Until" field of jdk.ThreadPark is invalid if the parking method is not absolute

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1 new commit pushed to the master branch:

  • d1af31b: 8318757: VM_ThreadDump asserts in interleaved ObjectMonitor::deflate_monitor calls

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot changed the title Backport 6f8b0a33fa15f1dfc8b0c116375df0f90d9d8759 8327799: JFR view: the "Park Until" field of jdk.ThreadPark is invalid if the parking method is not absolute Mar 15, 2024
@openjdk
Copy link

openjdk bot commented Mar 15, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk
Copy link

openjdk bot commented Mar 15, 2024

⚠️ @yanglong1010 This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 15, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 15, 2024

Webrevs

@yanglong1010
Copy link
Author

/approval request The JFR view is a new command line tool to parse JFR files, it is a good and convenient alternative to the desktop program JDK Mission Control. The bug of this tool will display java.time.Instant.MIN to java.time.LocalTime 08:05:43 of my timezone, which is not right, better to show "N/A", just as what "jfr print --events jdk.ThreadPark test.jfr" does. I would like to backport this fix to jdk21u-dev.
Low risk: This patch only affects the display of the jfr view command
Testing: I ran test/jdk/jdk/jfr/tool/TestView.java, test/jdk/jdk/jfr/jcmd/TestJcmdView.java, all passed.

@openjdk
Copy link

openjdk bot commented Mar 15, 2024

@yanglong1010
8327799: The approval request has been created successfully.

@openjdk openjdk bot added the approval label Mar 15, 2024
@GoeLin
Copy link
Member

GoeLin commented Mar 19, 2024

Thanks for this well documented backport!!

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed approval labels Mar 19, 2024
@yanglong1010
Copy link
Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 19, 2024
@openjdk
Copy link

openjdk bot commented Mar 19, 2024

@yanglong1010
Your change (at version 2502c01) is now ready to be sponsored by a Committer.

@DamonFool
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 19, 2024

Going to push as commit 2de8cfa.
Since your change was applied there has been 1 commit pushed to the master branch:

  • d1af31b: 8318757: VM_ThreadDump asserts in interleaved ObjectMonitor::deflate_monitor calls

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 19, 2024
@openjdk openjdk bot closed this Mar 19, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Mar 19, 2024
@openjdk
Copy link

openjdk bot commented Mar 19, 2024

@DamonFool @yanglong1010 Pushed as commit 2de8cfa.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@yanglong1010
Copy link
Author

Thank you all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport clean integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants