RFR: JDK-8287061: Support for rematerializing scalar replaced objects participating in allocation merges [v14]

Cesar Soares Lucas cslucas at openjdk.org
Mon Jun 5 21:13:06 UTC 2023


On Mon, 5 Jun 2023 20:27:48 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>>>  If you mean the tabs on lines 303/304/306/307
>> 
>> Yes, it confused me. As an alternative, you could put selector and merge_pointer-related statements on the same line, but I'm not sure how much it improves readability:
>> 
>>   st->print(", selector=""); _selector->print_on(st); st->print(""");
>
> A couple of suggestions about the output:
> * `merge`: it's clearer to call it `merge_obj`
> * `obj` vs `merge` output: obj output is duplicated in ScopeDesc entries and Objects sections; before it was a short version printed in Locals/Expressions and all the details were included in Objects; I like to see field locations in the short version, but including everything looks way too much IMO;
> * it makes sense to include selector and merge_pointer info in short version, but `is_root` can be omitted

Thanks @iwanowww . Does the output below look good to you? It prints ObjectValue in the same format as it was before this PR and only print details of the merge in the "Objects" section. Is there other output section that you think needs to be adjusted?


Compiled method (c2)     436   24             TestMultiSFO::test (48 bytes)
 total in heap  [0x00007f1df5155590,0x00007f1df5155850] = 704
 relocation     [0x00007f1df5155700,0x00007f1df5155718] = 24
 main code      [0x00007f1df5155720,0x00007f1df5155788] = 104
 stub code      [0x00007f1df5155788,0x00007f1df51557a0] = 24
 oops           [0x00007f1df51557a0,0x00007f1df51557b0] = 16
 metadata       [0x00007f1df51557b0,0x00007f1df51557b8] = 8
 scopes data    [0x00007f1df51557b8,0x00007f1df51557f8] = 64
 scopes pcs     [0x00007f1df51557f8,0x00007f1df5155848] = 80
 dependencies   [0x00007f1df5155848,0x00007f1df5155850] = 8
scopes:
ScopeDesc(pc=0x00007f1df515573a offset=1a):
   TestMultiSFO::test at -1 (line 12)
ScopeDesc(pc=0x00007f1df515575c offset=3c):
   TestMultiSFO::test at 28 (line 19)
   Locals
    - l0: empty
    - l1: empty
    - l2: empty
    - l3: merge_obj[14]
    - l4: obj[15]

   Objects
    - merge_obj[14], selector="reg rbp [10],int", merge_pointer="nullptr", candidate_objs=[15, 16]
    - obj[15], is_root=1, klass: TestMultiSFO$Point 
	  Fields: stack[12], stack[8]
    - obj[16], is_root=0, klass: TestMultiSFO$Point 
	  Fields: stack[8], stack[12]

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

PR Review Comment: https://git.openjdk.org/jdk/pull/12897#discussion_r1218596666



More information about the security-dev mailing list