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

8280131: jcmd reports "Module jdk.jfr not found." when "jdk.management.jfr" is missing #10723

Closed
wants to merge 4 commits into from

Conversation

egahlin
Copy link
Member

@egahlin egahlin commented Oct 17, 2022

Could I have a review of a PR that ensures JFR can be used when only the jdk.jfr module is present in an image.

The behavior is similar to how -javaagent adds the java.instrument module and "jcmd PID ManagementAgent.status" loads the jdk.management.agent module.

TestJfrJavaBase.java is replaced with TestModularImage.java. The former test could not be used since the jdk.jfr module is now added to the module graph when -XX:StartFlightRecording is specified.

Testing: tier1-3 + test/jdk/jdk/jfr

Thanks
Erik


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-8280131: jcmd reports "Module jdk.jfr not found." when "jdk.management.jfr" is missing

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10723

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 17, 2022

👋 Welcome back egahlin! 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 Oct 17, 2022

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

  • hotspot

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 hotspot-dev@openjdk.org label Oct 17, 2022
@mgronlun
Copy link

/label remove hotspot

@openjdk openjdk bot removed the hotspot hotspot-dev@openjdk.org label Oct 17, 2022
@openjdk
Copy link

openjdk bot commented Oct 17, 2022

@mgronlun
The hotspot label was successfully removed.

@mgronlun
Copy link

/label add hotspot

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Oct 17, 2022
@openjdk
Copy link

openjdk bot commented Oct 17, 2022

@mgronlun
The hotspot label was successfully added.

@egahlin egahlin marked this pull request as ready for review October 17, 2022 14:06
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 17, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 17, 2022

Webrevs

@openjdk
Copy link

openjdk bot commented Oct 18, 2022

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

8280131: jcmd reports "Module jdk.jfr not found." when "jdk.management.jfr" is missing

Reviewed-by: mgronlun, 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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 the ready Pull request is ready to be integrated label Oct 18, 2022
@@ -72,7 +68,28 @@ static bool is_disabled(outputStream* output) {

static bool invalid_state(outputStream* out, TRAPS) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look okay to me except that "invalid_state" isn't a clear name for function that tries to ensure that the jdk.jfr module is loaded. Up to you, but I think it would be clear if it were renamed load_jfr that returns disabled when disabled or the jdk.jfr module cannot be loaded.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I have a large refactoring of jfrDcmd.cpp coming up. I will clean up names and logic in that PR.

@egahlin
Copy link
Member Author

egahlin commented Oct 21, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Oct 21, 2022

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

  • ef62b61: 8295703: RISC-V: Remove implicit noreg temp register arguments in MacroAssembler
  • 6240431: 8295697: Resolve conflicts between serviceability/jvmti and nsk/jvmti shared code
  • 1164258: 8295124: Atomic::add to pointer type may return wrong value
  • d3eba85: 8295414: [Aarch64] C2: assert(false) failed: bad AD file
  • 028e8b3: 8137022: Concurrent refinement thread adjustment and (de-)activation suboptimal
  • faa6b66: 8295715: Minimize disabled warnings in serviceability libs
  • de1e0c5: 8295719: Remove unneeded disabled warnings in jdk.sctp
  • 9612cf9: 8295529: Add link to JBS to README.md
  • b37421e: 8295564: Norwegian Nynorsk Locale is missing formatting
  • 6707bfb: 8029633: Raw inner class constructor ref should not perform diamond inference
  • ... and 3 more: https://git.openjdk.org/jdk/compare/78dc4977863a92f990b355f6b4d2609a674ab19b...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 21, 2022

@egahlin Pushed as commit a345df2.

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

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
3 participants