8180932: Parallelize safepoint cleanup

Provide infrastructure to do safepoint cleanup tasks using parallel worker threads

Reviewed-by: dholmes, rehn, dcubed, thartmann
This commit is contained in:
Roman Kennke 2017-07-07 12:49:11 +02:00
parent d12604111c
commit 98bd53b5c2
12 changed files with 268 additions and 111 deletions

View file

@ -3385,6 +3385,15 @@ void Threads::threads_do(ThreadClosure* tc) {
// If CompilerThreads ever become non-JavaThreads, add them here
}
void Threads::parallel_java_threads_do(ThreadClosure* tc) {
int cp = Threads::thread_claim_parity();
ALL_JAVA_THREADS(p) {
if (p->claim_oops_do(true, cp)) {
tc->do_thread(p);
}
}
}
// The system initialization in the library has three phases.
//
// Phase 1: java.lang.System class initialization