Skip to content

8277102: Dubious PrintCompilation output #6386

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 1 commit into from

Conversation

y1yang0
Copy link
Member

@y1yang0 y1yang0 commented Nov 15, 2021

The output of PrintCompilation is ill-formed:

     22 1 3 java.lang.Object::<init> (1 bytes)
     25 2 3 java.lang.String::hashCode (60 bytes)
     25 3 3 java.lang.String::coder (15 bytes)
     27 4 3 Reduced::foo (12 bytes)
     27 5 3 java.lang.Boolean::valueOf (14 bytes)
     27 6 3 java.lang.Boolean::hashCode (8 bytes)
     27 8 4 Reduced::foo (12 bytes)
     27 7 2 java.lang.Boolean::hashCode (14 bytes)
   4 3 Reduced::foo (12 bytes) made not entrant
     29 9 % 3 Reduced::main @ 4 (33 bytes)
     29 10 3 Reduced::main (33 bytes)
     29 11 % 4 Reduced::main @ 4 (33 bytes)
   9 % 3 Reduced::main @ 4 (33 bytes) made not entrant
  11 % 4 Reduced::main @ 4 (33 bytes) made not entrant

This seems related to JDK-8272586, which print timestamp optionally. As #5446 mentioned, printing timestamp would break DisassembleCodeBlobTest.java since it expects disassembling a given nmethod twice to produce the same result. Maybe we should fix DisassembleCodeBlobTest.java.


Progress

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

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6386/head:pull/6386
$ git checkout pull/6386

Update a local copy of the PR:
$ git checkout pull/6386
$ git pull https://git.openjdk.java.net/jdk pull/6386/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 6386

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6386.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 15, 2021

👋 Welcome back yyang! 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 Nov 15, 2021

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

  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org label Nov 15, 2021
@y1yang0 y1yang0 force-pushed the illformed_printtcompilation branch from fed7e1c to e65e749 Compare November 16, 2021 02:18
@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 16, 2021
@mlbridge
Copy link

mlbridge bot commented Nov 16, 2021

Webrevs

// <empty-line>
// Compiled method (c2) 310 463 4 compiler.jvmci.compilerToVM.CompileCodeTestCase$Dummy::staticMethod (1 bytes)
for (int i = 2; i < str2Lines.length; i++) {
Asserts.assertEQ(str2Lines[i], str3Lines[i],
Copy link
Member

Choose a reason for hiding this comment

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

Splitting the entire string by lines seems like a bit of an overhead. What about something like that (not tested)?

int idx = str2.indexOf(System.lineSeparator());
idx = str2.indexOf(System.lineSeparator(), idx + 1);
str2 = str2.substring(idx + 1);

Copy link
Member

Choose a reason for hiding this comment

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

Doing it by lines will actually provide a more focused error message if there's a problem and I cannot image the overhead matters for a test like this.

Copy link
Member

Choose a reason for hiding this comment

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

Right, good point.

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me but a second review (@dougxc?) would be good.

@TobiHartmann
Copy link
Member

/reviewers 2

@openjdk
Copy link

openjdk bot commented Nov 18, 2021

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

8277102: Dubious PrintCompilation output

Reviewed-by: thartmann, dnsimon

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

  • db55f92: 8277343: dynamicArchive/SharedArchiveFileOption.java failed: '-XX:+RecordDynamicDumpInfo is unsupported when a dynamic CDS archive is specified in -XX:SharedArchiveFile:' missing
  • 2f4b540: 8276314: [JVMCI] check alignment of call displacement during code installation
  • 9160743: 8276058: Some swing test fails on specific CI macos system
  • 8193800: 8274179: AArch64: Support SVE operations with encodable immediates
  • b8453eb: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales
  • 231fb61: 8276970: Default charset for PrintWriter that wraps PrintStream
  • 29e552c: 8272358: Some tests may fail when executed with other locales than the US
  • ce4471f: 8277346: ProblemList 7 serviceability/sa tests on macosx-x64
  • 45a60db: 8277045: G1: Remove unnecessary set_concurrency call in G1ConcurrentMark::weak_refs_work
  • 6bb0462: 8277224: sun.security.pkcs.PKCS9Attributes.toString() throws NPE
  • ... and 45 more: https://git.openjdk.java.net/jdk/compare/ca2efb73f59112d9be2ec29db405deb4c58dd435...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 Nov 18, 2021
@openjdk
Copy link

openjdk bot commented Nov 18, 2021

@TobiHartmann
The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Nov 18, 2021
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 18, 2021
@y1yang0
Copy link
Member Author

y1yang0 commented Nov 19, 2021

Thanks @TobiHartmann and @dougxc for reviews!

@y1yang0
Copy link
Member Author

y1yang0 commented Nov 19, 2021

/integrate

@openjdk
Copy link

openjdk bot commented Nov 19, 2021

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

  • 839033b: 8276976: Rename LIR_OprDesc to LIR_Opr
  • 89b125f: 8275527: Refactor forward pointer access
  • 36bd4a3: 8277404: Test VMDeprecatedOptions.java failing with Unable to create shared archive file
  • 57eb864: 8276927: [PPC64] Port shenandoahgc to linux on ppc64le
  • 8db0c36: 8277414: ProblemList runtime/CommandLine/VMDeprecatedOptions.java on windows-x64
  • 03473b4: 8270874: JFrame paint artifacts when dragged from standard monitor to HiDPI monitor
  • ce0f00f: 8276093: Improve naming in closures to iterate over card sets
  • 5d249c4: 8275071: [macos] A11y cursor gets stuck when combobox is closed
  • 354a34e: 8277336: Improve CollectedHeap::safepoint_workers comments
  • 276bfcd: 8277407: javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java fails to compile after JDK-8276058
  • ... and 63 more: https://git.openjdk.java.net/jdk/compare/ca2efb73f59112d9be2ec29db405deb4c58dd435...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Nov 19, 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 Nov 19, 2021
@openjdk
Copy link

openjdk bot commented Nov 19, 2021

@kelthuzadx Pushed as commit 2f0bde1.

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

@y1yang0 y1yang0 deleted the illformed_printtcompilation branch November 19, 2021 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants