< prev index next >

src/hotspot/share/runtime/javaThread.cpp

Print this page

1322         trace_stack();
1323       }
1324       Deoptimization::deoptimize(this, *fst.current());
1325     }
1326   }
1327 
1328   if (DebugDeoptimization && deopt) {
1329     tty->print_cr("[AFTER Deoptimization]");
1330     trace_frames();
1331   }
1332 }
1333 
1334 
1335 // Make zombies
1336 void JavaThread::make_zombies() {
1337   for (StackFrameStream fst(this, true /* update */, true /* process_frames */); !fst.is_done(); fst.next()) {
1338     if (fst.current()->can_be_deoptimized()) {
1339       // it is a Java nmethod
1340       nmethod* nm = CodeCache::find_nmethod(fst.current()->pc());
1341       assert(nm != nullptr, "did not find nmethod");
1342       nm->make_not_entrant("zombie");
1343     }
1344   }
1345 }
1346 #endif // PRODUCT
1347 
1348 
1349 void JavaThread::deoptimize_marked_methods() {
1350   if (!has_last_Java_frame()) return;
1351   StackFrameStream fst(this, false /* update */, true /* process_frames */);
1352   for (; !fst.is_done(); fst.next()) {
1353     if (fst.current()->should_be_deoptimized()) {
1354       Deoptimization::deoptimize(this, *fst.current());
1355     }
1356   }
1357 }
1358 
1359 #ifdef ASSERT
1360 void JavaThread::verify_frame_info() {
1361   assert((!has_last_Java_frame() && java_call_counter() == 0) ||
1362          (has_last_Java_frame() && java_call_counter() > 0),

1322         trace_stack();
1323       }
1324       Deoptimization::deoptimize(this, *fst.current());
1325     }
1326   }
1327 
1328   if (DebugDeoptimization && deopt) {
1329     tty->print_cr("[AFTER Deoptimization]");
1330     trace_frames();
1331   }
1332 }
1333 
1334 
1335 // Make zombies
1336 void JavaThread::make_zombies() {
1337   for (StackFrameStream fst(this, true /* update */, true /* process_frames */); !fst.is_done(); fst.next()) {
1338     if (fst.current()->can_be_deoptimized()) {
1339       // it is a Java nmethod
1340       nmethod* nm = CodeCache::find_nmethod(fst.current()->pc());
1341       assert(nm != nullptr, "did not find nmethod");
1342       nm->make_not_entrant(nmethod::InvalidationReason::ZOMBIE);
1343     }
1344   }
1345 }
1346 #endif // PRODUCT
1347 
1348 
1349 void JavaThread::deoptimize_marked_methods() {
1350   if (!has_last_Java_frame()) return;
1351   StackFrameStream fst(this, false /* update */, true /* process_frames */);
1352   for (; !fst.is_done(); fst.next()) {
1353     if (fst.current()->should_be_deoptimized()) {
1354       Deoptimization::deoptimize(this, *fst.current());
1355     }
1356   }
1357 }
1358 
1359 #ifdef ASSERT
1360 void JavaThread::verify_frame_info() {
1361   assert((!has_last_Java_frame() && java_call_counter() == 0) ||
1362          (has_last_Java_frame() && java_call_counter() > 0),
< prev index next >