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

JDK-8298255: JFR provide information about dynamization of number of compiler threads #11563

Closed
wants to merge 3 commits into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Dec 7, 2022

The JVM supports both dynamic GC threads, and dynamic Compiler threads.
While the GCConfiguration JFR event (see https://sap.github.io/SapMachine/jfrevents/#gcconfiguration ) seems to have at least some info about dynamization of GC threads ( field usesDynamicGCThreads), the JIT CompilerConfiguration event seems to miss this info (about JIT compiler threads dynamization), this should be added; currently the impression is given that the number is static but this is often not the case.
As an extension, the dynamization process of adding / removing threads could be added as well to the JFR events but I am not sure if this is desired so I just started with a very simple patch.


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-8298255: JFR provide information about dynamization of number of compiler threads

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11563

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 7, 2022

👋 Welcome back mbaesken! 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 Dec 7, 2022
@openjdk
Copy link

openjdk bot commented Dec 7, 2022

@MBaesken 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 Dec 7, 2022
@mlbridge
Copy link

mlbridge bot commented Dec 7, 2022

Webrevs

Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

Seems reasonable, seeing that we do the same for GC. Good assuming tests are green.

@openjdk
Copy link

openjdk bot commented Dec 7, 2022

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

8298255: JFR provide information about dynamization of number of compiler threads

Reviewed-by: stuefe, mgronlun, 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 34 new commits pushed to the master branch:

  • e555d54: 8298383: JFR: GenerateJfrFiles.java lacks copyright header
  • c084431: 8298379: JFR: Some UNTIMED events only sets endTime
  • ea108f5: 8298129: Let checkpoint event sizes grow beyond u4 limit
  • 165dcdd: 8297718: Make NMT free:ing protocol more granular
  • fbe7b00: 8298173: GarbageCollectionNotificationContentTest test failed: no decrease in Eden usage
  • d8ef60b: 8298272: Clean up ProblemList
  • 9353899: 8298175: JFR: Common timestamp for periodic events
  • 94575d1: 8295116: C2: assert(dead->outcnt() == 0 && !dead->is_top()) failed: node must be dead
  • 49b8622: 8290850: C2: create_new_if_for_predicate() does not clone pinned phi input nodes resulting in a broken graph
  • 2f426cd: 8298375: Bad copyright header in test/jdk/java/lang/Character/Supplementary.java
  • ... and 24 more: https://git.openjdk.org/jdk/compare/cf63f2e3ea93cf339d08e2865034e128d683e515...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 the ready Pull request is ready to be integrated label Dec 7, 2022
@mgronlun
Copy link

mgronlun commented Dec 8, 2022

@MBaesken Please put this back before UTC 16.00 today :)

@MBaesken
Copy link
Member Author

MBaesken commented Dec 8, 2022

Hi Markus and Thomas, unfortunately I learned that the event field names must not be longer than 32 chars.
Otherwise test jdk/jfr/event/metadata/TestEventMetadata.java fails with

java.lang.RuntimeException: Name should not exceed 32 characters: expected true, was false
at jdk.test.lib.Asserts.fail(Asserts.java:594)
at jdk.test.lib.Asserts.assertTrue(Asserts.java:486)
at jdk.jfr.event.metadata.TestEventMetadata.verifyName(TestEventMetadata.java:149)
at jdk.jfr.event.metadata.TestEventMetadata.verifyValueDescriptor(TestEventMetadata.java:130)
at jdk.jfr.event.metadata.TestEventMetadata.verifyValueDesscriptors(TestEventMetadata.java:125)
at jdk.jfr.event.metadata.TestEventMetadata.main(TestEventMetadata.java:101)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1623)

So I shortened the field name (and fixed a test typo while at it) - are you still good with the latest version ?

@@ -52,6 +52,7 @@ public static void main(String[] args) throws Exception {
System.out.println("Event:" + event);
Events.assertField(event, "threadCount").atLeast(0);
Events.assertField(event, "tieredCompilation");
Events.assertField(event, "usesDynamicNrOfCompilerThreads");
Copy link
Member

Choose a reason for hiding this comment

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

"NrOf" looks strange. Can we come up with a better name?

Copy link
Member Author

Choose a reason for hiding this comment

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

would you be okay with usesDynamicCompilerThreadCount ? Sounds maybe a bit nicer .

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps "dynamicCompilerThreadCount". It's a boolean so use may not be needed.

@MBaesken
Copy link
Member Author

MBaesken commented Dec 8, 2022

Hi Erik, I renamed the field to dynamicCompilerThreadCount.

@mgronlun
Copy link

mgronlun commented Dec 8, 2022

Yep, good :)

@MBaesken
Copy link
Member Author

MBaesken commented Dec 8, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Dec 8, 2022

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

  • e555d54: 8298383: JFR: GenerateJfrFiles.java lacks copyright header
  • c084431: 8298379: JFR: Some UNTIMED events only sets endTime
  • ea108f5: 8298129: Let checkpoint event sizes grow beyond u4 limit
  • 165dcdd: 8297718: Make NMT free:ing protocol more granular
  • fbe7b00: 8298173: GarbageCollectionNotificationContentTest test failed: no decrease in Eden usage
  • d8ef60b: 8298272: Clean up ProblemList
  • 9353899: 8298175: JFR: Common timestamp for periodic events
  • 94575d1: 8295116: C2: assert(dead->outcnt() == 0 && !dead->is_top()) failed: node must be dead
  • 49b8622: 8290850: C2: create_new_if_for_predicate() does not clone pinned phi input nodes resulting in a broken graph
  • 2f426cd: 8298375: Bad copyright header in test/jdk/java/lang/Character/Supplementary.java
  • ... and 24 more: https://git.openjdk.org/jdk/compare/cf63f2e3ea93cf339d08e2865034e128d683e515...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 8, 2022

@MBaesken Pushed as commit fc52f21.

💡 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-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated
4 participants