Skip to content

8268780: Use 'print_cr' instead of 'print' for the message 'eliminated <owner is scalar replaced>' #4495

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

D-D-H
Copy link
Contributor

@D-D-H D-D-H commented Jun 15, 2021

Hi,

Cound I have a review of this small fix that adds a line feed for the message 'eliminated '.

When we run the following code and run jstack <pid>

    public static void main(String[] args) {
        for (int i = 0; i < 200000000; i++) {
            try {
                test();
            } catch (Exception e) {
            }
        }
    }

    private static void test() throws Exception {
        Object obj = new Object();
        synchronized (obj) {
            throw new Exception();
        }
    }

We could find that a frame that does not wrap properly.

"main" #1 prio=5 os_prio=0 cpu=53202.88ms elapsed=54.10s tid=0x00007f8c2c022550 nid=0x4743 runnable  [0x00007f8c35ac2000]
   java.lang.Thread.State: RUNNABLE
        at java.lang.Throwable.fillInStackTrace(java.base@17-internal/Native Method)
        at java.lang.Throwable.fillInStackTrace(java.base@17-internal/Throwable.java:798)
        - locked <0x00000000f3b00340> (a java.lang.Exception)
        at java.lang.Throwable.<init>(java.base@17-internal/Throwable.java:256)
        at java.lang.Exception.<init>(java.base@17-internal/Exception.java:55)
        at Test.test(Test.java:14)
        - eliminated <owner is scalar replaced> (a java.lang.Object)    at Test.main(Test.java:5)

Also, I noticed that this message has a correct line feed in the implementation of JavaVFrame.java.


Progress

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

Issue

  • JDK-8268780: Use 'print_cr' instead of 'print' for the message 'eliminated '

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4495

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 15, 2021

👋 Welcome back ddong! 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 Jun 15, 2021
@D-D-H
Copy link
Contributor Author

D-D-H commented Jun 15, 2021

/label add hotspot

@openjdk
Copy link

openjdk bot commented Jun 15, 2021

@D-D-H The following label will be automatically applied to this pull request:

  • hotspot

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 hotspot-dev@openjdk.org label Jun 15, 2021
@openjdk
Copy link

openjdk bot commented Jun 15, 2021

@D-D-H The hotspot label was already applied.

@D-D-H
Copy link
Contributor Author

D-D-H commented Jun 15, 2021

/label add serviceability

@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label Jun 15, 2021
@openjdk
Copy link

openjdk bot commented Jun 15, 2021

@D-D-H
The serviceability label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Jun 15, 2021

Webrevs

Copy link
Contributor

@zhengyu123 zhengyu123 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 and trivial

@openjdk
Copy link

openjdk bot commented Jun 15, 2021

@D-D-H 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:

8268780: Use 'print_cr' instead of 'print' for the message 'eliminated <owner is scalar replaced>'

Reviewed-by: cjplummer, zgu, dcubed

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 18 new commits pushed to 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.

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, @zhengyu123, @dcubed-ojdk) 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).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 15, 2021
@D-D-H
Copy link
Contributor Author

D-D-H commented Jun 16, 2021

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jun 16, 2021
@openjdk
Copy link

openjdk bot commented Jun 16, 2021

@D-D-H
Your change (at version 97f77ec) is now ready to be sponsored by a Committer.

@y1yang0
Copy link
Member

y1yang0 commented Jun 16, 2021

/sponsor

@openjdk
Copy link

openjdk bot commented Jun 16, 2021

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

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jun 16, 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 sponsor Pull request is ready to be sponsored labels Jun 16, 2021
@openjdk
Copy link

openjdk bot commented Jun 16, 2021

@kelthuzadx @D-D-H Pushed as commit 48d4562.

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

@D-D-H D-D-H deleted the JDK-8268780 branch June 16, 2021 03:32
@D-D-H D-D-H restored the JDK-8268780 branch June 17, 2021 05:02
@D-D-H D-D-H deleted the JDK-8268780 branch June 17, 2021 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

5 participants