src/cpu/x86/vm/sharedRuntime_x86_32.cpp

changeset 6429
606acabe7b5c
parent 6198
55fb97c4c58d
child 6518
62c54fcc0a35
     1.1 --- a/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Sat Mar 22 00:26:48 2014 +0400
     1.2 +++ b/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Thu Mar 20 17:49:27 2014 -0700
     1.3 @@ -1815,6 +1815,13 @@
     1.4    // Frame is now completed as far as size and linkage.
     1.5    int frame_complete = ((intptr_t)__ pc()) - start;
     1.6  
     1.7 +  if (UseRTMLocking) {
     1.8 +    // Abort RTM transaction before calling JNI
     1.9 +    // because critical section will be large and will be
    1.10 +    // aborted anyway. Also nmethod could be deoptimized.
    1.11 +    __ xabort(0);
    1.12 +  }
    1.13 +
    1.14    // Calculate the difference between rsp and rbp,. We need to know it
    1.15    // after the native call because on windows Java Natives will pop
    1.16    // the arguments and it is painful to do rsp relative addressing
    1.17 @@ -3168,6 +3175,12 @@
    1.18    };
    1.19  
    1.20    address start = __ pc();
    1.21 +
    1.22 +  if (UseRTMLocking) {
    1.23 +    // Abort RTM transaction before possible nmethod deoptimization.
    1.24 +    __ xabort(0);
    1.25 +  }
    1.26 +
    1.27    // Push self-frame.
    1.28    __ subptr(rsp, return_off*wordSize);     // Epilog!
    1.29  
    1.30 @@ -3353,6 +3366,14 @@
    1.31    address call_pc = NULL;
    1.32    bool cause_return = (poll_type == POLL_AT_RETURN);
    1.33    bool save_vectors = (poll_type == POLL_AT_VECTOR_LOOP);
    1.34 +
    1.35 +  if (UseRTMLocking) {
    1.36 +    // Abort RTM transaction before calling runtime
    1.37 +    // because critical section will be large and will be
    1.38 +    // aborted anyway. Also nmethod could be deoptimized.
    1.39 +    __ xabort(0);
    1.40 +  }
    1.41 +
    1.42    // If cause_return is true we are at a poll_return and there is
    1.43    // the return address on the stack to the caller on the nmethod
    1.44    // that is safepoint. We can leave this return on the stack and

mercurial