UseACmpProfile question.

Sergey Kuksenko sergey.kuksenko at oracle.com
Tue Nov 24 00:35:21 UTC 2020


Hi Roland and Tobias.

I am trying to evaluate UseACmpProfile option behavior. Rough results 
are quite controversial. There are scenarios where +UseACmpProfile is 
faster than -UseACmpProfile and vice versa.

In order to understand the difference I am digging into generated code. 
I found that even having -XX:-UseACmpProfile (turn off cmp profile) type 
checks are still generated:

   0.67%  ││││││││  ↗│    0x00007faef4126e00:   mov 
0x10(%rbx,%r12,8),%r10       ;*aaload {reexecute=0 rethrow=0 
return_oop=0 return_vt=0}
          ││││││││ ││ ; - 
org.openjdk.bench.valhalla.sandbox.acmp.array.CompIdentityStates::comp0 at 32 
(line 33)
   0.65%  ││││││││  ││    0x00007faef4126e05:   mov 
0x10(%rcx,%r12,8),%rbp       ;*aaload {reexecute=0 rethrow=0 
return_oop=0 return_vt=0}
          ││││││││ ││ ; - 
org.openjdk.bench.valhalla.sandbox.acmp.array.CompIdentityStates::comp0 at 28 
(line 33)
  12.69%  ││││││││  ││    0x00007faef4126e0a:   cmp %r10,%rbp
          ││││││││╭ ││    0x00007faef4126e0d:   je 0x00007faef4126e65
   0.88%  │││││││││ ││    0x00007faef4126e0f:   mov 
0x8(%rbp),%r11d              ; implicit exception: dispatches to 
0x00007faef4126f45
   8.74%  │││││││││ ││    0x00007faef4126e13:   cmp 
$0x20554e,%r11d              ; 
{metadata('org/openjdk/bench/valhalla/types/R64long')}
          │││││││││ ││    0x00007faef4126e1a:   jne 
0x00007faef4126ef8           ;*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)


Am I right?

How to disable type checks for "amp" completely?

Best regards,

Sergey Kuksenko.



More information about the valhalla-dev mailing list