RFR (xs) 8037138: x86: problem with JVMTI breakpoint

Coleen Phillimore coleen.phillimore at oracle.com
Thu Aug 18 14:36:50 UTC 2016



On 8/18/16 9:44 AM, Daniel D. Daugherty wrote:
> On 8/17/16 3:36 PM, Coleen Phillimore wrote:
>> Summary: do aload(0) after rewriting aload bytecodes to fast version 
>> for frequent pairs.
>>
>> This is more of a cleanup since RewriteFrequentPairs is turned off 
>> for breakpoint debugging, because if frequent pairs of bytecodes are 
>> rewritten, you can't set a breakpoint on the second bci of a pair 
>> because it's not executed with this optimization.
>>
>> Now all the platforms are the same as ppc for this.
>>
>> Tested with jprt since aload(0) in the interpreter is executed a many 
>> times.
>>
>> open webrev at http://cr.openjdk.java.net/~coleenp/8037138.01/webrev
>
> src/cpu/aarch64/vm/templateTable_aarch64.cpp
>     No comments.
>
> src/cpu/sparc/vm/templateTable_sparc.cpp
>     No comments.
>
> src/cpu/x86/vm/templateTable_x86.cpp
>     No comments.
>
> Thumbs up.
>
> Just to be clear... this bad oop problem (and the loss of the
> tos value) only happens when -XX:+RewriteFrequentPairs is
> specified on the command line... Do I have this right?

 From the code, can_generate_breakpoint_events *looks like* a capability 
that you can only set in OnLoad phase, even though I don't see it in the 
spec which capabilities you can set when.

http://cr.openjdk.java.net/~coleenp/jvmti.html#AddCapabilities

The flag -XX:+RewriteBytecodes is default in most cases, but when you 
set can_generate_breakpoint_events capability, the vm code does:

   if (avail.can_generate_breakpoint_events) {
     RewriteFrequentPairs = false;
   }


The OnLoad phase SetCapabilities is called before the Interpreter is 
generated.  So this isn't wrong, it's just obscure.

Coleen
>
>
> Dan
>
>
>> bug link https://bugs.openjdk.java.net/browse/JDK-8037138
>>
>>
>> See bug for how this came up on the openjdk thread.
>>
>> Thanks,
>> Coleen
>>
>



More information about the hotspot-runtime-dev mailing list