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

8261269: When using clhsdb to "inspect" a java object, clhsdb prints "Oop for..." twice #2582

Closed
wants to merge 4 commits into from

Conversation

plummercj
Copy link
Contributor

@plummercj plummercj commented Feb 16, 2021

See CR for details. In brief, fixed the inspect command to remove duplicate output:

hsdb> inspect 0x00000007fef00770
instance of Oop for java/lang/Class @ 0x00000007fef00770 @ 0x00000007fef00770 (size = 160)
in: Oop for java/io/BufferedInputStream @ 0x0000000082005b08 Oop for java/io/BufferedInputStream @ 0x0000000082005b08
out: Oop for java/io/PrintStream @ 0x0000000082007b60 Oop for java/io/PrintStream @ 0x0000000082007b60
err: Oop for java/io/PrintStream @ 0x000000008200e0c8 Oop for java/io/PrintStream @ 0x000000008200e0c8 

It should be:

hsdb> inspect 0x00000007fef00770
instance of Oop for java/lang/Class @ 0x00000007fef00770 (size = 160)
in: Oop for java/io/BufferedInputStream @ 0x0000000082005b08
out: Oop for java/io/PrintStream @ 0x0000000082007b60
err: Oop for java/io/PrintStream @ 0x000000008200e0c8

Progress

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

Issue

  • JDK-8261269: When using clhsdb to "inspect" a java object, clhsdb prints "Oop for..." twice

Reviewers

Download

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

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 16, 2021

👋 Welcome back cjplummer! 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, 2021
@openjdk
Copy link

openjdk bot commented Feb 16, 2021

@plummercj 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.

@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label Feb 16, 2021
@mlbridge
Copy link

mlbridge bot commented Feb 16, 2021

Webrevs

Copy link
Contributor

@sspitsyn sspitsyn left a comment

Choose a reason for hiding this comment

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

It looks good to me.
One side comment about the test. It is not easy to read the code with the same pattern (e.g. "Oop for java/io/BufferedInputStream") repeated several times. I understand, you prefer to make it more explicit but it'd be more readable if a predefined pattern is used like below:

    String pattern = "Oop for java/io/BufferedInputStream";
+            expStrMap.put(cmd, List.of("instance of Oop for java/lang/Class @ " + examineResult,
+                                       "in: " + pattern + @"));
. . .
+            unexpStrMap.put(cmd, List.of(
+                    "instance of Oop for java/lang/Class @ "  + examineResult + " @ " + examineResult,
+                    "in: " + pattern + " .* " + pattern));

Just an opinion with no pressure. It is up to you.

Thanks,
Serguei

@openjdk
Copy link

openjdk bot commented Feb 17, 2021

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

8261269: When using clhsdb to "inspect" a java object, clhsdb prints "Oop for..." twice

Reviewed-by: sspitsyn, kevinw

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

  • 419717d: 8261803: Remove unused TaskTerminator in g1 full gc ref proc executor
  • 011f5a5: 8261799: Remove unnecessary cast in psParallelCompact.hpp
  • e9d7c07: 8248318: Remove superfluous use of boxing in ObjectStreamClass
  • 6b7575b: 8228748: Remove GCLocker::_doing_gc
  • c20fb5d: 8261448: Preserve GC stack watermark across safepoints in StackWalk
  • 26c1db9: 8254239: G1ConcurrentMark.hpp unnecessarily disables MSVC++ warning 4522.
  • 0c21dd0: 6206189: Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method
  • 2b55501: 8261949: fileStream::readln returns incorrect line string
  • 539c80b: 8261702: ClhsdbFindPC can fail due to PointerFinder incorrectly thinking an address is in a .so
  • 564011c: 8261290: Improve error message for NumberFormatException on null input
  • ... and 71 more: https://git.openjdk.java.net/jdk/compare/34ae7aeb64db90dcb4d2f3d4acb16c714a32824f...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 Feb 17, 2021
@plummercj
Copy link
Contributor Author

Good idea. I've added the pattern strings. Thanks!

@kevinjwalls
Copy link
Contributor

That's great, much more readable output!
Looks good.

@plummercj
Copy link
Contributor Author

Thanks Serguei and Kevin!

@plummercj
Copy link
Contributor Author

/integrate

@openjdk openjdk bot closed this Feb 22, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 22, 2021
@openjdk
Copy link

openjdk bot commented Feb 22, 2021

@plummercj Since your change was applied there have been 90 commits pushed to the master branch:

  • a7e2e80: 8260695: The java.awt.color.ICC_Profile#getData/getData(int) are not thread safe
  • a30fb4f: 8255867: SignatureScheme JSSE property does not preserve ordering in handshake messages
  • a867288: 8211227: Inconsistent TLS protocol version in debug output
  • 7b924d8: 8261973: Shenandoah: Cleanup/simplify root verifier
  • 63f8fc8: 8259662: Don't wrap SocketExceptions into SSLExceptions in SSLSocketImpl
  • cf0019d: 8259942: Enable customizations in CompileJavaModules.gmk and Main.gmk
  • a6a7e43: 8242032: G1 region remembered sets may contain non-coarse level PRTs for already coarsened regions
  • d7eebda: 8261391: ZGC crash - SEGV in RevokeOneBias::do_thread
  • 5b7b18c: 8259800: timeout in tck test testForkJoin(ForkJoinPool8Test)
  • 419717d: 8261803: Remove unused TaskTerminator in g1 full gc ref proc executor
  • ... and 80 more: https://git.openjdk.java.net/jdk/compare/34ae7aeb64db90dcb4d2f3d4acb16c714a32824f...master

Your commit was automatically rebased without conflicts.

Pushed as commit aea474c.

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

@plummercj plummercj deleted the 8261269-oops2x branch March 12, 2021 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants