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

8302615: make JVMTI thread cpu time functions optional for virtual threads #12604

Closed
wants to merge 1 commit into from

Conversation

sspitsyn
Copy link
Contributor

@sspitsyn sspitsyn commented Feb 16, 2023

This is a minor JVM TI spec update for two timer functions GetCurrentThreadCpuTime and GetThreadCpuTime to allow implementations to support virtual threads.

The CSR is:
JDK-8302616: make JVMTI thread cpu time functions optional for virtual threads

No testing is needed.


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
  • Change requires CSR request JDK-8302616 to be approved

Issues

  • JDK-8302615: make JVMTI thread cpu time functions optional for virtual threads
  • JDK-8302616: make JVMTI thread cpu time functions optional for virtual threads (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12604

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 16, 2023

👋 Welcome back sspitsyn! 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 Feb 16, 2023
@openjdk
Copy link

openjdk bot commented Feb 16, 2023

@sspitsyn The following labels will be automatically applied to this pull request:

  • hotspot
  • serviceability

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

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org csr Pull request needs approved CSR before integration labels Feb 16, 2023
@mlbridge
Copy link

mlbridge bot commented Feb 16, 2023

Webrevs

@AlanBateman
Copy link
Contributor

I assume we'll rev the JVMTI version at some point in 21.

The change looks fine. It might be that we'll need to add a new capacity or add a field to jvmtiTimerInfo to say whether the implementation supports CPU time for virtual threads, but what we have now is okay.

@sspitsyn
Copy link
Contributor Author

Thank you for review, Alan.

@openjdk
Copy link

openjdk bot commented Feb 17, 2023

@sspitsyn 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:

8302615: make JVMTI thread cpu time functions optional for virtual threads

Reviewed-by: alanb

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

  • a917fb3: 7033677: potential cast error in MemberEnter
  • 6120319: 8302226: failure_handler native.core should wait for coredump to finish
  • fef3eab: 8302734: Parallel: Remove unused LGRPSpace::_invalid_region
  • ea5bfea: 8302661: Parallel: Remove PSVirtualSpace::is_aligned
  • edf238b: 8302635: Race condition in HttpBodySubscriberWrapper when cancelling request
  • cd77fcf: 8290822: C2: assert in PhaseIdealLoop::do_unroll() is subject to undefined behavior
  • 57c9bc3: 8302335: IGV: Bytecode not showing
  • 57fde75: 8302113: Improve CRC32 intrinsic with crypto pmull on AArch64
  • b8c9d6c: 8302158: PPC: test/jdk/jdk/internal/vm/Continuation/Fuzz.java: AssertionError: res: false shouldPin: false
  • dc55a7f: 8302202: Incorrect desugaring of null-allowed nested patterns
  • ... and 61 more: https://git.openjdk.org/jdk/compare/13b1ebba276940ff83e53b8ec3659280b3574204...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Feb 17, 2023
@sspitsyn
Copy link
Contributor Author

I will integrate this as a trivial fix.

@sspitsyn
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Feb 17, 2023

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

  • 7c60b9c: 8302358: Behavior of adler32 changes after JDK-8300208
  • 86b9fce: 8301992: Embed SymbolTable CHT node
  • 03d613b: 8294402: Add diagnostic logging to VMProps.checkDockerSupport
  • a263f28: 8302777: CDS should not relocate heap if mapping fails
  • a917fb3: 7033677: potential cast error in MemberEnter
  • 6120319: 8302226: failure_handler native.core should wait for coredump to finish
  • fef3eab: 8302734: Parallel: Remove unused LGRPSpace::_invalid_region
  • ea5bfea: 8302661: Parallel: Remove PSVirtualSpace::is_aligned
  • edf238b: 8302635: Race condition in HttpBodySubscriberWrapper when cancelling request
  • cd77fcf: 8290822: C2: assert in PhaseIdealLoop::do_unroll() is subject to undefined behavior
  • ... and 65 more: https://git.openjdk.org/jdk/compare/13b1ebba276940ff83e53b8ec3659280b3574204...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 17, 2023
@openjdk openjdk bot closed this Feb 17, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 17, 2023
@openjdk
Copy link

openjdk bot commented Feb 17, 2023

@sspitsyn Pushed as commit 6b082fb.

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

@sspitsyn sspitsyn deleted the br23 branch February 22, 2023 10:49
@AlanBateman
Copy link
Contributor

I've just spotted that we missed some text:

GetCurrentThreadCpuTime has "The current thread may not be a virtual thread".

GetThreadCpuTime has "The thread may not be a virtual thread".

The changes that have been integrated allow these functions to support CPU time measurement so I think we will need to adjust both of these sentences in a follow up issue.

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