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

8257668: SA JMap - skip non-java thread stack dump for heap dump #1593

Closed
wants to merge 2 commits into from

Conversation

@linzang
Copy link
Contributor

@linzang linzang commented Dec 3, 2020

when use SA JMap dump commands, such as "jhsdb jmap --binaryheap" or "dump heap" with "jhsdb clhsdb", it keep printing "dumpStack: not java Thread.".
Skip non-java thread stack dump to avoid printing the message.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8257668: SA JMap - skip non-java thread stack dump for heap dump

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1593/head:pull/1593
$ git checkout pull/1593

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Dec 3, 2020

👋 Welcome back lzang! 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.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Dec 3, 2020

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

  • serviceability

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.

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Dec 3, 2020

Webrevs

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Dec 4, 2020

Mailing list message from Hohensee, Paul on serviceability-dev:

Imo this is good idea because it eliminates useless/voluminous output. It's a behavioral change nonetheless, so it would be great for others to weigh in. Code change is fine.

Thanks,
Paul

?-----Original Message-----
From: serviceability-dev <serviceability-dev-retn at openjdk.java.net> on behalf of Lin Zang <lzang at openjdk.java.net>
Date: Thursday, December 3, 2020 at 4:16 AM
To: "serviceability-dev at openjdk.java.net" <serviceability-dev at openjdk.java.net>
Subject: RFR: 8257668: SA JMap - skip non-java thread stack dump for heap dump

when use SA JMap dump commands, such as "jhsdb jmap --binaryheap" or "dump heap" with "jhsdb clhsdb", it keep printing "dumpStack: not java Thread.".
Skip non-java thread stack dump to avoid printing the message.

-------------

Commit messages:
- 8257668: SA JMap - skip non-java thread stack dump for heap dump

Changes: https://git.openjdk.java.net/jdk/pull/1593/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1593&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8257668
Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/1593.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/1593/head:pull/1593

PR: https://git.openjdk.java.net/jdk/pull/1593

Loading

plummercj
Copy link
Contributor

plummercj commented on f4df6c5 Dec 4, 2020

Choose a reason for hiding this comment

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

Given that the only use of HeapHprofBinWriter is to dump a binary heap, I see no purpose in the println. It's not like you are printing all threads for the user to see, and want to call out native threads. So I'm ok with this change.

BTW, nobody uses ThreadStackTrace except for HeapHprofBinWriter, so the println you are avoiding is now essentially dead code, you could instead just remove the println, and that will then make unnecessary the change to avoid calling dumpStack on native threads.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Dec 4, 2020

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

8257668: SA JMap - skip non-java thread stack dump for heap dump

Reviewed-by: cjplummer, sspitsyn, phh

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

  • c4339c3: 8243614: Typo in ReentrantLock's Javadoc
  • d3ac1bf: 8198390: Test MultiResolutionDrawImageWithTransformTest.java fails when -esa is passed
  • 51d325e: 8257633: Missing -mmacosx-version-min=X flag when linking libjvm
  • e27ea4d: 8257750: writeBuffer field of java.io.DataOutputStream should be final
  • dd0b945: 8257531: Super word not applied to a loop of simple Buffer operations
  • d76039d: 8257725: No throws of SSLHandshakeException
  • fcc8479: 8257724: Incorrect package of the linked class in BaseSSLSocketImpl
  • d8ac76f: 8257651: LambdaEagerInit.java test failed in 2 different ways
  • 3eb6946: 8257732: Problem list TestJFRWithJMX for OL 8.2 until the issue is resolved
  • ac54900: 8257401: Use switch expressions in jdk.internal.net.http and java.net.http
  • ... and 38 more: https://git.openjdk.java.net/jdk/compare/4a267f1bc2b025aae2cb9df7283156aeb0282406...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 (@plummercj, @sspitsyn, @phohensee) 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).

Loading

@openjdk openjdk bot added the ready label Dec 4, 2020
Copy link
Contributor

@sspitsyn sspitsyn left a comment

Hi Lin,
It looks good.
Thanks,
Serguei

Loading

@linzang
Copy link
Contributor Author

@linzang linzang commented Dec 5, 2020

@plummercj @phohensee @sspitsyn,
Thanks a lot for your review, I have updated the pr to remove the deadcode as described in Chris'c comments.

BRs,
Lin

Loading

@linzang
Copy link
Contributor Author

@linzang linzang commented Dec 5, 2020

/integrate

Loading

@openjdk openjdk bot added the sponsor label Dec 5, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Dec 5, 2020

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

Loading

@linzang
Copy link
Contributor Author

@linzang linzang commented Dec 7, 2020

Dear all,
Thanks a lot for reviewing, may I ask your help pushing it? Thanks!

Loading

@dholmes-ora
Copy link
Member

@dholmes-ora dholmes-ora commented Dec 7, 2020

/sponsor

Loading

@openjdk openjdk bot closed this Dec 7, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Dec 7, 2020

@dholmes-ora @linzang Since your change was applied there have been 51 commits pushed to the master branch:

  • e590618: 8252505: C1/C2 compiler support for blackholes
  • 972bc3b: 8256167: Convert JDK use of Reference::get to Reference::refersTo
  • 78be334: 8242332: Add SHA3 support to SunPKCS11 provider
  • c4339c3: 8243614: Typo in ReentrantLock's Javadoc
  • d3ac1bf: 8198390: Test MultiResolutionDrawImageWithTransformTest.java fails when -esa is passed
  • 51d325e: 8257633: Missing -mmacosx-version-min=X flag when linking libjvm
  • e27ea4d: 8257750: writeBuffer field of java.io.DataOutputStream should be final
  • dd0b945: 8257531: Super word not applied to a loop of simple Buffer operations
  • d76039d: 8257725: No throws of SSLHandshakeException
  • fcc8479: 8257724: Incorrect package of the linked class in BaseSSLSocketImpl
  • ... and 41 more: https://git.openjdk.java.net/jdk/compare/4a267f1bc2b025aae2cb9df7283156aeb0282406...master

Your commit was automatically rebased without conflicts.

Pushed as commit 29a09c8.

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

Loading

@linzang linzang deleted the skip-threaddump branch Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants