On Tue, 15 Jun 2021 17:19:26 GMT, Denghui Dong <dd...@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@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. Marked as reviewed by dcubed (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/4495