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

Tobias Hartmann thartmann at openjdk.java.net
Tue Sep 8 14:37:37 UTC 2020


On Tue, 8 Sep 2020 14:29:19 GMT, Vladimir Ivanov <vlivanov 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
>
> Looks good and trivial.

Thanks Vladimir!

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

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


More information about the hotspot-compiler-dev mailing list