Skip to content

Commit 7c40c8a

Browse files
author
Thomas Schatzl
committed
8302312: Make ParGCRareEvent_lock G1 specific
Reviewed-by: sjohanss, kbarrett
1 parent 593bec6 commit 7c40c8a

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/hotspot/share/gc/g1/g1ConcurrentMark.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ class G1ReclaimEmptyRegionsTask : public WorkerTask {
13981398
cl.archive_regions_removed(),
13991399
cl.humongous_regions_removed());
14001400
{
1401-
MutexLocker x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
1401+
MutexLocker x(G1RareEvent_lock, Mutex::_no_safepoint_check_flag);
14021402
_g1h->decrement_summary_bytes(cl.freed_bytes());
14031403

14041404
_cleanup_list->add_ordered(&local_cleanup_list);

src/hotspot/share/gc/g1/g1OopClosures.inline.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ inline void G1VerifyLiveClosure::do_oop_work(T* p) {
291291
bool is_in_heap = _g1h->is_in(obj);
292292

293293
if (!is_in_heap || _g1h->is_obj_dead_cond(obj, _vo)) {
294-
MutexLocker x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
294+
MutexLocker x(G1RareEvent_lock, Mutex::_no_safepoint_check_flag);
295295

296296
if (!has_failures()) {
297297
log.error("----------");

src/hotspot/share/gc/g1/g1YoungCollector.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ class G1PrepareEvacuationTask : public WorkerTask {
424424
G1PrepareRegionsClosure cl(_g1h, this);
425425
_g1h->heap_region_par_iterate_from_worker_offset(&cl, &_claimer, worker_id);
426426

427-
MutexLocker x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
427+
MutexLocker x(G1RareEvent_lock, Mutex::_no_safepoint_check_flag);
428428
_all_card_set_stats.add(cl.card_set_stats());
429429
}
430430

src/hotspot/share/gc/g1/heapRegion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ class VerifyRemSetClosure : public G1VerificationClosure {
496496
Log(gc, verify) log;
497497
LogStream ls(log.error());
498498

499-
MutexLocker x(ParGCRareEvent_lock, Mutex::_no_safepoint_check_flag);
499+
MutexLocker x(G1RareEvent_lock, Mutex::_no_safepoint_check_flag);
500500

501501
if (!has_failures()) {
502502
log.error("----------");

src/hotspot/share/runtime/mutexLocker.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ Mutex* NonJavaThreadsListSync_lock = nullptr;
7878
Monitor* CGC_lock = nullptr;
7979
Monitor* STS_lock = nullptr;
8080
Monitor* G1OldGCCount_lock = nullptr;
81+
Mutex* G1RareEvent_lock = nullptr;
8182
Mutex* G1DetachedRefinementStats_lock = nullptr;
8283
Mutex* MarkStackFreeList_lock = nullptr;
8384
Mutex* MarkStackChunkList_lock = nullptr;
8485
Mutex* MonitoringSupport_lock = nullptr;
85-
Mutex* ParGCRareEvent_lock = nullptr;
8686
Monitor* ConcurrentGCBreakpoints_lock = nullptr;
8787
Mutex* Compile_lock = nullptr;
8888
Monitor* MethodCompileQueue_lock = nullptr;
@@ -359,7 +359,7 @@ void mutex_init() {
359359

360360
if (UseG1GC) {
361361
defl(G1OldGCCount_lock , PaddedMonitor, Threads_lock, true);
362-
defl(ParGCRareEvent_lock , PaddedMutex , Threads_lock, true);
362+
defl(G1RareEvent_lock , PaddedMutex , Threads_lock, true);
363363
}
364364

365365
defl(CompileTaskAlloc_lock , PaddedMutex , MethodCompileQueue_lock);

src/hotspot/share/runtime/mutexLocker.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ extern Monitor* CGC_lock; // used for coordination betwee
6969
// fore- & background GC threads.
7070
extern Monitor* STS_lock; // used for joining/leaving SuspendibleThreadSet.
7171
extern Monitor* G1OldGCCount_lock; // in support of "concurrent" full gc
72+
extern Mutex* G1RareEvent_lock; // Synchronizes (rare) parallel GC operations.
7273
extern Mutex* G1DetachedRefinementStats_lock; // Lock protecting detached refinement stats
7374
extern Mutex* MarkStackFreeList_lock; // Protects access to the global mark stack free list.
7475
extern Mutex* MarkStackChunkList_lock; // Protects access to the global mark stack chunk list.
7576
extern Mutex* MonitoringSupport_lock; // Protects updates to the serviceability memory pools.
76-
extern Mutex* ParGCRareEvent_lock; // Synchronizes various (rare) parallel GC ops.
7777
extern Monitor* ConcurrentGCBreakpoints_lock; // Protects concurrent GC breakpoint management
7878
extern Mutex* Compile_lock; // a lock held when Compilation is updating code (used to block CodeCache traversal, CHA updates, etc)
7979
extern Monitor* MethodCompileQueue_lock; // a lock held when method compilations are enqueued, dequeued

0 commit comments

Comments
 (0)