Skip to content

8073464: GC workers do not have thread names #184

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

Closed
wants to merge 2 commits into from

Conversation

simonis
Copy link
Member

@simonis simonis commented Nov 17, 2022

This is a backport of "JDK-8073464: GC workers do not have thread names" which I request for parity with Oracle JDK 8 where it was downported to 8u351 (see JDK-8285732). This downport depends on "JDK-6885993: Named Thread: introduce print() and print_on(outputStream* st) methods" for which a pull request already exists.

Both of these changes are required to fix the native names of internal threads like for example GC threads. This does not only simplify debugging, but also helps observability tools. Finally, these two changes fix the "sun.management.HotspotInternal" MxBean which returns the "InternalThreadCpuTimes". The "InternalThreadCpuTimes" attribute returns a map with a thread-name to thread-cpu-time mapping but is currently broken in JDK 8 because internal threads without native names (e.g. GC threads) are all mapped to the same entry (i.e. "Unknown").

The patch applies cleanly except for two copyright year mismatches in concurrentGCThread.cpp and thread.hpp. I've attached a diff of this patch compared to the original JDK 9 patch to this PR for your convenience (see 8073464-jdk8-vs-jdk9.txt)


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

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 184

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 17, 2022

👋 Welcome back simonis! A progress list of the required criteria for merging this PR into pr/183 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 changed the title Backport a827cdfa1047ee0af30bb454aad2067420103bae 8073464: GC workers do not have thread names Nov 17, 2022
@openjdk
Copy link

openjdk bot commented Nov 17, 2022

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

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Nov 17, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 17, 2022

Webrevs

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

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

Lgtm.

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@openjdk-notifier openjdk-notifier bot changed the base branch from pr/183 to master November 25, 2022 11:19
@openjdk-notifier
Copy link

The parent pull request that this pull request depends on has now been integrated and the target branch of this pull request has been updated. This means that changes from the dependent pull request can start to show up as belonging to this pull request, which may be confusing for reviewers. To remedy this situation, simply merge the latest changes from the new target branch into this pull request by running commands similar to these in the local repository for your personal fork:

git checkout JDK-8073464
git fetch https://git.openjdk.org/jdk8u-dev master
git merge FETCH_HEAD
# if there are conflicts, follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk
Copy link

openjdk bot commented Nov 25, 2022

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

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

8073464: GC workers do not have thread names

Reviewed-by: phh, andrew

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

  • 9f2f0c2: 6885993: Named Thread: introduce print() and print_on(outputStream* st) methods
  • c501bfa: 8269039: Disable SHA-1 Signed JARs
  • 5a32484: 8297141: Fix hotspot/test/runtime/SharedArchiveFile/DefaultUseWithClient.java for 8u
  • da0c382: 8241086: Test runtime/NMT/HugeArenaTracking.java is failing on 32bit Windows
  • 91d8b89: 8129827: [TEST_BUG] Test java/awt/Robot/RobotWheelTest/RobotWheelTest.java fails
  • 9cb8752: 8079255: [TEST_BUG] [macosx] Test closed/java/awt/Robot/RobotWheelTest/RobotWheelTest fails for Mac only

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.

➡️ 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 Nov 25, 2022
@simonis
Copy link
Member Author

simonis commented Nov 25, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Nov 25, 2022

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

  • 9f2f0c2: 6885993: Named Thread: introduce print() and print_on(outputStream* st) methods
  • c501bfa: 8269039: Disable SHA-1 Signed JARs
  • 5a32484: 8297141: Fix hotspot/test/runtime/SharedArchiveFile/DefaultUseWithClient.java for 8u
  • da0c382: 8241086: Test runtime/NMT/HugeArenaTracking.java is failing on 32bit Windows
  • 91d8b89: 8129827: [TEST_BUG] Test java/awt/Robot/RobotWheelTest/RobotWheelTest.java fails
  • 9cb8752: 8079255: [TEST_BUG] [macosx] Test closed/java/awt/Robot/RobotWheelTest/RobotWheelTest fails for Mac only

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 25, 2022

@simonis Pushed as commit df44cbf.

💡 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
backport integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants