mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8234796: Refactor Handshake::execute to take a more complex type than ThreadClosure
Reviewed-by: dholmes, pliden, coleenp
This commit is contained in:
parent
095d77acf0
commit
21e03e71aa
36 changed files with 95 additions and 50 deletions
|
@ -805,10 +805,10 @@ JRT_LEAF(BasicType, Deoptimization::unpack_frames(JavaThread* thread, int exec_m
|
|||
return bt;
|
||||
JRT_END
|
||||
|
||||
class DeoptimizeMarkedTC : public ThreadClosure {
|
||||
class DeoptimizeMarkedClosure : public HandshakeClosure {
|
||||
public:
|
||||
virtual void do_thread(Thread* thread) {
|
||||
assert(thread->is_Java_thread(), "must be");
|
||||
DeoptimizeMarkedClosure() : HandshakeClosure("Deoptimize") {}
|
||||
void do_thread(Thread* thread) {
|
||||
JavaThread* jt = (JavaThread*)thread;
|
||||
jt->deoptimize_marked_methods();
|
||||
}
|
||||
|
@ -819,7 +819,7 @@ void Deoptimization::deoptimize_all_marked() {
|
|||
DeoptimizationMarker dm;
|
||||
|
||||
if (SafepointSynchronize::is_at_safepoint()) {
|
||||
DeoptimizeMarkedTC deopt;
|
||||
DeoptimizeMarkedClosure deopt;
|
||||
// Make the dependent methods not entrant
|
||||
CodeCache::make_marked_nmethods_not_entrant();
|
||||
Threads::java_threads_do(&deopt);
|
||||
|
@ -829,7 +829,7 @@ void Deoptimization::deoptimize_all_marked() {
|
|||
MutexLocker mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||
CodeCache::make_marked_nmethods_not_entrant();
|
||||
}
|
||||
DeoptimizeMarkedTC deopt;
|
||||
DeoptimizeMarkedClosure deopt;
|
||||
Handshake::execute(&deopt);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue