RFR: 8268780: Use 'print_cr' instead of 'print' for the message 'eliminated <owner is scalar replaced>'
Chris Plummer
cjplummer at openjdk.java.net
Tue Jun 15 18:32:42 UTC 2021
On Tue, 15 Jun 2021 17:19:26 GMT, Denghui Dong <ddong at openjdk.org> wrote:
> Hi,
>
> Cound I have a review of this small fix that adds a line feed for the message 'eliminated <owner is scalar replaced>'.
>
> 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 at 17-internal/Native Method)
> at java.lang.Throwable.fillInStackTrace(java.base at 17-internal/Throwable.java:798)
> - locked <0x00000000f3b00340> (a java.lang.Exception)
> at java.lang.Throwable.<init>(java.base at 17-internal/Throwable.java:256)
> at java.lang.Exception.<init>(java.base at 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.
Marked as reviewed by cjplummer (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/4495
More information about the serviceability-dev
mailing list