Skip to content

Commit 4020a60

Browse files
committedSep 9, 2021
8273550: Replace os::cgc_thread/pgc_thread with os::gc_thread
Reviewed-by: stefank, coleenp
1 parent 185eaca commit 4020a60

File tree

5 files changed

+5
-14
lines changed

5 files changed

+5
-14
lines changed
 

‎src/hotspot/os/posix/os_posix.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -979,8 +979,7 @@ size_t os::Posix::get_initial_stack_size(ThreadType thr_type, size_t req_stack_s
979979
_compiler_thread_min_stack_allowed);
980980
break;
981981
case os::vm_thread:
982-
case os::pgc_thread:
983-
case os::cgc_thread:
982+
case os::gc_thread:
984983
case os::watcher_thread:
985984
default: // presume the unknown thr_type is a VM internal
986985
if (req_stack_size == 0 && VMThreadStackSize > 0) {

‎src/hotspot/os/windows/os_windows.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,7 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
712712
} // else fall through:
713713
// use VMThreadStackSize if CompilerThreadStackSize is not defined
714714
case os::vm_thread:
715-
case os::pgc_thread:
716-
case os::cgc_thread:
715+
case os::gc_thread:
717716
case os::asynclog_thread:
718717
case os::watcher_thread:
719718
if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K);

‎src/hotspot/share/gc/shared/concurrentGCThread.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ConcurrentGCThread::ConcurrentGCThread() :
3535
_has_terminated(false) {}
3636

3737
void ConcurrentGCThread::create_and_start(ThreadPriority prio) {
38-
if (os::create_thread(this, os::cgc_thread)) {
38+
if (os::create_thread(this, os::gc_thread)) {
3939
os::set_priority(this, prio);
4040
os::start_thread(this);
4141
}

‎src/hotspot/share/gc/shared/workgroup.cpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -159,19 +159,13 @@ GangWorker* WorkGang::install_worker(uint worker_id) {
159159
}
160160

161161
void WorkGang::add_workers(bool initializing) {
162-
os::ThreadType worker_type;
163-
if (are_ConcurrentGC_threads()) {
164-
worker_type = os::cgc_thread;
165-
} else {
166-
worker_type = os::pgc_thread;
167-
}
168162
uint previous_created_workers = _created_workers;
169163

170164
_created_workers = WorkerManager::add_workers(this,
171165
_active_workers,
172166
_total_workers,
173167
_created_workers,
174-
worker_type,
168+
os::gc_thread,
175169
initializing);
176170
_active_workers = MIN2(_created_workers, _active_workers);
177171

‎src/hotspot/share/runtime/os.hpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,7 @@ class os: AllStatic {
441441

442442
enum ThreadType {
443443
vm_thread,
444-
cgc_thread, // Concurrent GC thread
445-
pgc_thread, // Parallel GC thread
444+
gc_thread, // GC thread
446445
java_thread, // Java, CodeCacheSweeper, JVMTIAgent and Service threads.
447446
compiler_thread,
448447
watcher_thread,

0 commit comments

Comments
 (0)
Please sign in to comment.