mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
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:
parent
d12604111c
commit
98bd53b5c2
12 changed files with 268 additions and 111 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue