< prev index next >
src/hotspot/share/runtime/sweeper.cpp
Print this page
rev 57137 : imported patch 8234796-v2
@@ -195,28 +195,28 @@
}
bool NMethodSweeper::wait_for_stack_scanning() {
return _current.end();
}
-class NMethodMarkingThreadClosure : public ThreadClosure {
+class NMethodMarkingClosure : public HandshakeClosure {
private:
CodeBlobClosure* _cl;
public:
- NMethodMarkingThreadClosure(CodeBlobClosure* cl) : _cl(cl) {}
+ NMethodMarkingClosure(CodeBlobClosure* cl) : HandshakeClosure("NMethodMarking"), _cl(cl) {}
void do_thread(Thread* thread) {
if (thread->is_Java_thread() && ! thread->is_Code_cache_sweeper_thread()) {
JavaThread* jt = (JavaThread*) thread;
jt->nmethods_do(_cl);
}
}
};
class NMethodMarkingTask : public AbstractGangTask {
private:
- NMethodMarkingThreadClosure* _cl;
+ NMethodMarkingClosure* _cl;
public:
- NMethodMarkingTask(NMethodMarkingThreadClosure* cl) :
+ NMethodMarkingTask(NMethodMarkingClosure* cl) :
AbstractGangTask("Parallel NMethod Marking"),
_cl(cl) {
Threads::change_thread_claim_token();
}
@@ -237,11 +237,11 @@
void NMethodSweeper::mark_active_nmethods() {
CodeBlobClosure* cl = prepare_mark_active_nmethods();
if (cl != NULL) {
WorkGang* workers = Universe::heap()->get_safepoint_workers();
if (workers != NULL) {
- NMethodMarkingThreadClosure tcl(cl);
+ NMethodMarkingClosure tcl(cl);
NMethodMarkingTask task(&tcl);
workers->run_task(&task);
} else {
Threads::nmethods_do(cl);
}
@@ -322,12 +322,12 @@
{
MutexLocker ccl(CodeCache_lock, Mutex::_no_safepoint_check_flag);
code_cl = prepare_mark_active_nmethods();
}
if (code_cl != NULL) {
- NMethodMarkingThreadClosure tcl(code_cl);
- Handshake::execute(&tcl);
+ NMethodMarkingClosure nm_cl(code_cl);
+ Handshake::execute(&nm_cl);
}
} else {
VM_MarkActiveNMethods op;
VMThread::execute(&op);
}
< prev index next >