1268 // At least one nmethod has been marked for deoptimization
1269
1270 // All this already happens inside a VM_Operation, so we'll do all the work here.
1271 // Stuff copied from VM_Deoptimize and modified slightly.
1272
1273 // We do not want any GCs to happen while we are in the middle of this VM operation
1274 ResourceMark rm;
1275 DeoptimizationMarker dm;
1276
1277 // Deoptimize all activations depending on marked nmethods
1278 Deoptimization::deoptimize_dependents();
1279
1280 // Make the dependent methods not entrant
1281 make_marked_nmethods_not_entrant();
1282 }
1283 }
1284 #endif // HOTSWAP
1285
1286
1287 // Flushes compiled methods dependent on dependee
1288 void CodeCache::flush_dependents_on_method(methodHandle m_h) {
1289 // --- Compile_lock is not held. However we are at a safepoint.
1290 assert_locked_or_safepoint(Compile_lock);
1291
1292 // CodeCache can only be updated by a thread_in_VM and they will all be
1293 // stopped dring the safepoint so CodeCache will be safe to update without
1294 // holding the CodeCache_lock.
1295
1296 // Compute the dependent nmethods
1297 if (mark_for_deoptimization(m_h()) > 0) {
1298 // At least one nmethod has been marked for deoptimization
1299
1300 // All this already happens inside a VM_Operation, so we'll do all the work here.
1301 // Stuff copied from VM_Deoptimize and modified slightly.
1302
1303 // We do not want any GCs to happen while we are in the middle of this VM operation
1304 ResourceMark rm;
1305 DeoptimizationMarker dm;
1306
1307 // Deoptimize all activations depending on marked nmethods
1308 Deoptimization::deoptimize_dependents();
|
1268 // At least one nmethod has been marked for deoptimization
1269
1270 // All this already happens inside a VM_Operation, so we'll do all the work here.
1271 // Stuff copied from VM_Deoptimize and modified slightly.
1272
1273 // We do not want any GCs to happen while we are in the middle of this VM operation
1274 ResourceMark rm;
1275 DeoptimizationMarker dm;
1276
1277 // Deoptimize all activations depending on marked nmethods
1278 Deoptimization::deoptimize_dependents();
1279
1280 // Make the dependent methods not entrant
1281 make_marked_nmethods_not_entrant();
1282 }
1283 }
1284 #endif // HOTSWAP
1285
1286
1287 // Flushes compiled methods dependent on dependee
1288 void CodeCache::flush_dependents_on_method(const methodHandle& m_h) {
1289 // --- Compile_lock is not held. However we are at a safepoint.
1290 assert_locked_or_safepoint(Compile_lock);
1291
1292 // CodeCache can only be updated by a thread_in_VM and they will all be
1293 // stopped dring the safepoint so CodeCache will be safe to update without
1294 // holding the CodeCache_lock.
1295
1296 // Compute the dependent nmethods
1297 if (mark_for_deoptimization(m_h()) > 0) {
1298 // At least one nmethod has been marked for deoptimization
1299
1300 // All this already happens inside a VM_Operation, so we'll do all the work here.
1301 // Stuff copied from VM_Deoptimize and modified slightly.
1302
1303 // We do not want any GCs to happen while we are in the middle of this VM operation
1304 ResourceMark rm;
1305 DeoptimizationMarker dm;
1306
1307 // Deoptimize all activations depending on marked nmethods
1308 Deoptimization::deoptimize_dependents();
|