UseACmpProfile question.
Sergey Kuksenko
sergey.kuksenko at oracle.com
Wed Nov 25 03:04:24 UTC 2020
Thank you. It's better, but not end.
How to turn off null values profiling?
I run with -XX:-UseACmpProfile -XX:-UseCompressedOops
-XX:-UseTypeSpeculation
Here the code where there are no null values in acmp:
19.43% │ │││ 0x00007fc1b8127fd1: cmp %rcx,%rbx
│╭│││ 0x00007fc1b8127fd4: je 0x00007fc1b812801d
2.66% │││││ 0x00007fc1b8127fd6: mov $0x5,%r11d
13.61% │││││ 0x00007fc1b8127fdc: and (%rcx),%r11
; implicit exception: dispatches to 0x00007fc1b812808c
3.56% │││││ 0x00007fc1b8127fdf: cmp $0x5,%r11
││╰││ 0x00007fc1b8127fe3: jne 0x00007fc1b8127fc0
││ ││ 0x00007fc1b8127fe5: mov 0x8(%rbx),%r8d
; implicit exception: dispatches to 0x00007fc1b81280ac
││ ││ 0x00007fc1b8127fe9: mov 0x8(%rcx),%r11d
││ ││ 0x00007fc1b8127fed: cmp %r11d,%r8d
││ ╰│ 0x00007fc1b8127ff0: jne 0x00007fc1b8127fc0
;*if_acmpne {reexecute=0 rethrow=0 return_oop=0 return_vt=0}
││
│ ; -
org.openjdk.bench.valhalla.sandbox.acmp.array.CompIdentityStates::comp0 at 33
(line 33)
There are no explicit null checks here.
The same code when there are null values:
10.70% │ │││││ 0x00007f5998127ad1: cmp %rbx,%r11
│╭│││││ 0x00007f5998127ad4: je 0x00007f5998127b25
6.50% │││││││ 0x00007f5998127ad6: test %rbx,%rbx
││╰││││ 0x00007f5998127ad9: je 0x00007f5998127ac0
6.74% ││ ││││ 0x00007f5998127adb: mov $0x5,%r10d
6.16% ││ ││││ 0x00007f5998127ae1: and (%rbx),%r10
16.20% ││ ││││ 0x00007f5998127ae4: cmp $0x5,%r10
││ ╰│││ 0x00007f5998127ae8: jne 0x00007f5998127ac0
││ │││ 0x00007f5998127aea: test %r11,%r11
││ ╰││ 0x00007f5998127aed: je 0x00007f5998127ac0
││ ││ 0x00007f5998127aef: mov 0x8(%r11),%r10d
││ ││ 0x00007f5998127af3: mov 0x8(%rbx),%r8d
││ ││ 0x00007f5998127af7: cmp %r8d,%r10d
││ ╰│ 0x00007f5998127afa: jne
0x00007f5998127ac0 ;*if_acmpne {reexecute=0 rethrow=0
return_oop=0 return_vt=0}
││
│ ; -
org.openjdk.bench.valhalla.sandbox.acmp.array.CompIdentityStates::comp0 at 33
(line 33)
Explicit null checks are here.
I just want to compare performance of code generated with type and null
profiles vs generic without any profile.
On 11/24/20 4:52 AM, Roland Westrelin wrote:
> Hi Sergey,
>
>> How to disable type checks for "amp" completely?
> Can you try -XX:-UseTypeSpeculation?
>
> Roland.
>
More information about the valhalla-dev
mailing list