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 #18214

Closed
wants to merge 1 commit into from

Conversation

yanglong1010
Copy link
Contributor

@yanglong1010 yanglong1010 commented Mar 12, 2024

Hi all

Could I have a review of this patch for 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


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

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

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18214/head:pull/18214
$ git checkout pull/18214

Update a local copy of the PR:
$ git checkout pull/18214
$ git pull https://git.openjdk.org/jdk.git pull/18214/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18214

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18214.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 12, 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 openjdk bot added the rfr Pull request is ready for review label Mar 12, 2024
@openjdk
Copy link

openjdk bot commented Mar 12, 2024

@yanglong1010 The following label will be automatically applied to this pull request:

  • hotspot-jfr

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-jfr hotspot-jfr-dev@openjdk.org label Mar 12, 2024
@mlbridge
Copy link

mlbridge bot commented Mar 12, 2024

Webrevs

@openjdk
Copy link

openjdk bot commented Mar 12, 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

Reviewed-by: egahlin

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 64 new commits pushed to the master branch:

  • ad0f329: 8327787: Convert javax/swing/border/Test4129681.java applet test to main
  • a43c3cc: 8327826: Convert javax/swing/border/Test4243289.java applet test to main
  • 11a3673: 8328110: Allow simultaneous use of PassFailJFrame with split UI and additional windows
  • 1281e18: 8325613: CTW: Stale method cleanup requires GC after Sweeper removal
  • 49ce85f: 8327874: Convert javax/swing/JTree/4314199/bug4314199.java applet test to main
  • 481c866: 8327468: Do not restart close if errno is EINTR [macOS/linux]
  • 44aef38: 8327045: Consolidate -fvisibility=hidden as a basic flag for all compilation
  • fcf746d: 8328106: COMPARE_BUILD improvements
  • fadc4b1: 8327423: C2 remove_main_post_loops: check if main-loop belongs to pre-loop, not just assert
  • cff0747: 8326204: yield statements doesn't allow cast expressions with more than 1 type arguments
  • ... and 54 more: https://git.openjdk.org/jdk/compare/e21da4caacb464827270d20b8fc62a50a1706316...master

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. Possible candidates are the reviewers of this PR (@egahlin) but any other Committer may sponsor as well.

➡️ 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 added the ready Pull request is ready to be integrated label Mar 12, 2024
@egahlin
Copy link
Member

egahlin commented Mar 12, 2024

I can sponsor change.

@yanglong1010
Copy link
Contributor Author

/integrate

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

openjdk bot commented Mar 12, 2024

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

@yanglong1010
Copy link
Contributor Author

@egahlin Please help sponsor when it's convenient for you. Thanks.

@D-D-H
Copy link
Contributor

D-D-H commented Mar 14, 2024

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 14, 2024

Going to push as commit 6f8b0a3.
Since your change was applied there have been 66 commits pushed to the master branch:

  • 1d34b74: 8321021: RISC-V: C2 VectorUCastB2X
  • 3b9255e: 8325851: Hide PassFailJFrame.Builder constructor
  • ad0f329: 8327787: Convert javax/swing/border/Test4129681.java applet test to main
  • a43c3cc: 8327826: Convert javax/swing/border/Test4243289.java applet test to main
  • 11a3673: 8328110: Allow simultaneous use of PassFailJFrame with split UI and additional windows
  • 1281e18: 8325613: CTW: Stale method cleanup requires GC after Sweeper removal
  • 49ce85f: 8327874: Convert javax/swing/JTree/4314199/bug4314199.java applet test to main
  • 481c866: 8327468: Do not restart close if errno is EINTR [macOS/linux]
  • 44aef38: 8327045: Consolidate -fvisibility=hidden as a basic flag for all compilation
  • fcf746d: 8328106: COMPARE_BUILD improvements
  • ... and 56 more: https://git.openjdk.org/jdk/compare/e21da4caacb464827270d20b8fc62a50a1706316...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 14, 2024
@openjdk openjdk bot closed this Mar 14, 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 14, 2024
@openjdk
Copy link

openjdk bot commented Mar 14, 2024

@D-D-H @yanglong1010 Pushed as commit 6f8b0a3.

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

@yanglong1010
Copy link
Contributor Author

Thank you all.

@egahlin
Copy link
Member

egahlin commented Mar 14, 2024

I was running the tests with your change. I had not received the result for macosx-aarch64, but OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants