src/share/vm/runtime/vm_operations.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/vm_operations.cpp

Print this page




 100     target->send_thread_stop(throwable());
 101   }
 102 }
 103 
 104 void VM_Deoptimize::doit() {
 105   // We do not want any GCs to happen while we are in the middle of this VM operation
 106   ResourceMark rm;
 107   DeoptimizationMarker dm;
 108 
 109   // Deoptimize all activations depending on marked nmethods
 110   Deoptimization::deoptimize_dependents();
 111 
 112   // Make the dependent methods not entrant
 113   CodeCache::make_marked_nmethods_not_entrant();
 114 }
 115 
 116 void VM_MarkActiveNMethods::doit() {
 117   NMethodSweeper::mark_active_nmethods();
 118 }
 119 
 120 VM_DeoptimizeFrame::VM_DeoptimizeFrame(JavaThread* thread, intptr_t* id) {
 121   _thread = thread;
 122   _id     = id;

 123 }
 124 
 125 
 126 void VM_DeoptimizeFrame::doit() {
 127   Deoptimization::deoptimize_frame_internal(_thread, _id);

 128 }
 129 
 130 
 131 #ifndef PRODUCT
 132 
 133 void VM_DeoptimizeAll::doit() {
 134   DeoptimizationMarker dm;
 135   // deoptimize all java threads in the system
 136   if (DeoptimizeALot) {
 137     for (JavaThread* thread = Threads::first(); thread != NULL; thread = thread->next()) {
 138       if (thread->has_last_Java_frame()) {
 139         thread->deoptimize();
 140       }
 141     }
 142   } else if (DeoptimizeRandom) {
 143 
 144     // Deoptimize some selected threads and frames
 145     int tnum = os::random() & 0x3;
 146     int fnum =  os::random() & 0x3;
 147     int tcount = 0;




 100     target->send_thread_stop(throwable());
 101   }
 102 }
 103 
 104 void VM_Deoptimize::doit() {
 105   // We do not want any GCs to happen while we are in the middle of this VM operation
 106   ResourceMark rm;
 107   DeoptimizationMarker dm;
 108 
 109   // Deoptimize all activations depending on marked nmethods
 110   Deoptimization::deoptimize_dependents();
 111 
 112   // Make the dependent methods not entrant
 113   CodeCache::make_marked_nmethods_not_entrant();
 114 }
 115 
 116 void VM_MarkActiveNMethods::doit() {
 117   NMethodSweeper::mark_active_nmethods();
 118 }
 119 
 120 VM_DeoptimizeFrame::VM_DeoptimizeFrame(JavaThread* thread, intptr_t* id, int reason) {
 121   _thread = thread;
 122   _id     = id;
 123   _reason = reason;
 124 }
 125 
 126 
 127 void VM_DeoptimizeFrame::doit() {
 128   assert(_reason > Deoptimization::Reason_none && _reason < Deoptimization::Reason_LIMIT, "invalid deopt reason");
 129   Deoptimization::deoptimize_frame_internal(_thread, _id, (Deoptimization::DeoptReason)_reason);
 130 }
 131 
 132 
 133 #ifndef PRODUCT
 134 
 135 void VM_DeoptimizeAll::doit() {
 136   DeoptimizationMarker dm;
 137   // deoptimize all java threads in the system
 138   if (DeoptimizeALot) {
 139     for (JavaThread* thread = Threads::first(); thread != NULL; thread = thread->next()) {
 140       if (thread->has_last_Java_frame()) {
 141         thread->deoptimize();
 142       }
 143     }
 144   } else if (DeoptimizeRandom) {
 145 
 146     // Deoptimize some selected threads and frames
 147     int tnum = os::random() & 0x3;
 148     int fnum =  os::random() & 0x3;
 149     int tcount = 0;


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