src/share/vm/c1/c1_Runtime1.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6767587 Sdiff src/share/vm/c1

src/share/vm/c1/c1_Runtime1.cpp

Print this page




 825           klassOop resolved = caller_method->constants()->klass_at(cc->index(), CHECK);
 826           // ldc wants the java mirror.
 827           k = resolved->klass_part()->java_mirror();
 828         }
 829         break;
 830       default: Unimplemented();
 831     }
 832     // convert to handle
 833     load_klass = Handle(THREAD, k);
 834   } else {
 835     ShouldNotReachHere();
 836   }
 837 
 838   if (deoptimize_for_volatile) {
 839     // At compile time we assumed the field wasn't volatile but after
 840     // loading it turns out it was volatile so we have to throw the
 841     // compiled code out and let it be regenerated.
 842     if (TracePatching) {
 843       tty->print_cr("Deoptimizing for patching volatile field reference");
 844     }







 845     VM_DeoptimizeFrame deopt(thread, caller_frame.id());
 846     VMThread::execute(&deopt);
 847 
 848     // Return to the now deoptimized frame.
 849   }
 850 
 851 
 852   // Now copy code back
 853 
 854   {
 855     MutexLockerEx ml_patch (Patching_lock, Mutex::_no_safepoint_check_flag);
 856     //
 857     // Deoptimization may have happened while we waited for the lock.
 858     // In that case we don't bother to do any patching we just return
 859     // and let the deopt happen
 860     if (!caller_is_deopted()) {
 861       NativeGeneralJump* jump = nativeGeneralJump_at(caller_frame.pc());
 862       address instr_pc = jump->jump_destination();
 863       NativeInstruction* ni = nativeInstruction_at(instr_pc);
 864       if (ni->is_jump() ) {




 825           klassOop resolved = caller_method->constants()->klass_at(cc->index(), CHECK);
 826           // ldc wants the java mirror.
 827           k = resolved->klass_part()->java_mirror();
 828         }
 829         break;
 830       default: Unimplemented();
 831     }
 832     // convert to handle
 833     load_klass = Handle(THREAD, k);
 834   } else {
 835     ShouldNotReachHere();
 836   }
 837 
 838   if (deoptimize_for_volatile) {
 839     // At compile time we assumed the field wasn't volatile but after
 840     // loading it turns out it was volatile so we have to throw the
 841     // compiled code out and let it be regenerated.
 842     if (TracePatching) {
 843       tty->print_cr("Deoptimizing for patching volatile field reference");
 844     }
 845     // It's possible the nmethod was invalidated in the last
 846     // safepoint, but if it's still alive then make it not_entrant.
 847     nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
 848     if (nm != NULL) {
 849       nm->make_not_entrant();
 850     }
 851 
 852     VM_DeoptimizeFrame deopt(thread, caller_frame.id());
 853     VMThread::execute(&deopt);
 854 
 855     // Return to the now deoptimized frame.
 856   }
 857 
 858 
 859   // Now copy code back
 860 
 861   {
 862     MutexLockerEx ml_patch (Patching_lock, Mutex::_no_safepoint_check_flag);
 863     //
 864     // Deoptimization may have happened while we waited for the lock.
 865     // In that case we don't bother to do any patching we just return
 866     // and let the deopt happen
 867     if (!caller_is_deopted()) {
 868       NativeGeneralJump* jump = nativeGeneralJump_at(caller_frame.pc());
 869       address instr_pc = jump->jump_destination();
 870       NativeInstruction* ni = nativeInstruction_at(instr_pc);
 871       if (ni->is_jump() ) {


src/share/vm/c1/c1_Runtime1.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File