Integrated: 8252916: Newline in object field values list of ScopeDesc should be removed

Tobias Hartmann thartmann at openjdk.java.net
Wed Sep 9 06:00:31 UTC 2020


On Tue, 8 Sep 2020 14:06:48 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

> Given the following test:
> 
> public class Test {
> 
>     static class MyClass {
>         Object o1 = null;
>         Object o2 = new Integer(42);
>     }
> 
>     static Object test(boolean trap) {
>         MyClass obj = new MyClass();
>         if (trap) { }
>         return obj.o1;
>     }
> 
>     public static void main(String[] args) {
>         for (int i = 0; i < 100_000; ++i) {
>             test(false);
>         }
>     }
> }
> 
> The ScopeDesc for the uncommon trap in C2 compiled 'test' is printed like this:
> 
> ScopeDesc(pc=0x00007f52a5160144 offset=84):
>    Test::test at 9 (line 11) reexecute=true
>    Locals
>     - l0: empty
>     - l1: obj[52]
>    Expression stack
>     - @0: reg rbp [10],int
>    Objects
>     - 52: Test$MyClass NULL
> , stack[0],oop
> 
> There should be no newline after "NULL".
> 
> This is a regression from [JDK-8202171](https://bugs.openjdk.java.net/browse/JDK-8202171) in JDK 12. The fix is to no
> print a new line in to be consistent with 'print_value_on'.
> Thanks,
> Tobias

This pull request has now been integrated.

Changeset: c655b703
Author:    Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/c655b703
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8252916: Newline in object field values list of ScopeDesc should be removed

Reviewed-by: vlivanov

-------------

PR: https://git.openjdk.java.net/jdk/pull/75


More information about the hotspot-compiler-dev mailing list