mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8229377: [JVMCI] Improve InstalledCode.invalidate for large code caches
Reviewed-by: kvn
This commit is contained in:
parent
d8d4cd6508
commit
00ba4ea7b3
3 changed files with 18 additions and 19 deletions
|
@ -814,22 +814,23 @@ class DeoptimizeMarkedClosure : public HandshakeClosure {
|
|||
}
|
||||
};
|
||||
|
||||
void Deoptimization::deoptimize_all_marked() {
|
||||
void Deoptimization::deoptimize_all_marked(nmethod* nmethod_only) {
|
||||
ResourceMark rm;
|
||||
DeoptimizationMarker dm;
|
||||
|
||||
if (SafepointSynchronize::is_at_safepoint()) {
|
||||
DeoptimizeMarkedClosure deopt;
|
||||
// Make the dependent methods not entrant
|
||||
// Make the dependent methods not entrant
|
||||
if (nmethod_only != NULL) {
|
||||
nmethod_only->mark_for_deoptimization();
|
||||
nmethod_only->make_not_entrant();
|
||||
} else {
|
||||
MutexLocker mu(SafepointSynchronize::is_at_safepoint() ? NULL : CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||
CodeCache::make_marked_nmethods_not_entrant();
|
||||
}
|
||||
|
||||
DeoptimizeMarkedClosure deopt;
|
||||
if (SafepointSynchronize::is_at_safepoint()) {
|
||||
Threads::java_threads_do(&deopt);
|
||||
} else {
|
||||
// Make the dependent methods not entrant
|
||||
{
|
||||
MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||
CodeCache::make_marked_nmethods_not_entrant();
|
||||
}
|
||||
DeoptimizeMarkedClosure deopt;
|
||||
Handshake::execute(&deopt);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue