mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
8234020: Remove FullGCCount_lock
Reviewed-by: kbarrett
This commit is contained in:
parent
4785e112ae
commit
468c847cc8
4 changed files with 0 additions and 24 deletions
|
@ -254,28 +254,9 @@ size_t GenCollectedHeap::max_capacity() const {
|
||||||
// Update the _full_collections_completed counter
|
// Update the _full_collections_completed counter
|
||||||
// at the end of a stop-world full GC.
|
// at the end of a stop-world full GC.
|
||||||
unsigned int GenCollectedHeap::update_full_collections_completed() {
|
unsigned int GenCollectedHeap::update_full_collections_completed() {
|
||||||
MonitorLocker ml(FullGCCount_lock, Mutex::_no_safepoint_check_flag);
|
|
||||||
assert(_full_collections_completed <= _total_full_collections,
|
assert(_full_collections_completed <= _total_full_collections,
|
||||||
"Can't complete more collections than were started");
|
"Can't complete more collections than were started");
|
||||||
_full_collections_completed = _total_full_collections;
|
_full_collections_completed = _total_full_collections;
|
||||||
ml.notify_all();
|
|
||||||
return _full_collections_completed;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update the _full_collections_completed counter, as appropriate,
|
|
||||||
// at the end of a concurrent GC cycle. Note the conditional update
|
|
||||||
// below to allow this method to be called by a concurrent collector
|
|
||||||
// without synchronizing in any manner with the VM thread (which
|
|
||||||
// may already have initiated a STW full collection "concurrently").
|
|
||||||
unsigned int GenCollectedHeap::update_full_collections_completed(unsigned int count) {
|
|
||||||
MonitorLocker ml(FullGCCount_lock, Mutex::_no_safepoint_check_flag);
|
|
||||||
assert((_full_collections_completed <= _total_full_collections) &&
|
|
||||||
(count <= _total_full_collections),
|
|
||||||
"Can't complete more collections than were started");
|
|
||||||
if (count > _full_collections_completed) {
|
|
||||||
_full_collections_completed = count;
|
|
||||||
ml.notify_all();
|
|
||||||
}
|
|
||||||
return _full_collections_completed;
|
return _full_collections_completed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -281,8 +281,6 @@ public:
|
||||||
|
|
||||||
// Update above counter, as appropriate, at the end of a stop-world GC cycle
|
// Update above counter, as appropriate, at the end of a stop-world GC cycle
|
||||||
unsigned int update_full_collections_completed();
|
unsigned int update_full_collections_completed();
|
||||||
// Update above counter, as appropriate, at the end of a concurrent GC cycle
|
|
||||||
unsigned int update_full_collections_completed(unsigned int count);
|
|
||||||
|
|
||||||
// Update the gc statistics for each generation.
|
// Update the gc statistics for each generation.
|
||||||
void update_gc_stats(Generation* current_generation, bool full) {
|
void update_gc_stats(Generation* current_generation, bool full) {
|
||||||
|
|
|
@ -72,7 +72,6 @@ Mutex* NonJavaThreadsList_lock = NULL;
|
||||||
Mutex* NonJavaThreadsListSync_lock = NULL;
|
Mutex* NonJavaThreadsListSync_lock = NULL;
|
||||||
Monitor* CGC_lock = NULL;
|
Monitor* CGC_lock = NULL;
|
||||||
Monitor* STS_lock = NULL;
|
Monitor* STS_lock = NULL;
|
||||||
Monitor* FullGCCount_lock = NULL;
|
|
||||||
Monitor* G1OldGCCount_lock = NULL;
|
Monitor* G1OldGCCount_lock = NULL;
|
||||||
Mutex* Shared_DirtyCardQ_lock = NULL;
|
Mutex* Shared_DirtyCardQ_lock = NULL;
|
||||||
Mutex* G1DetachedRefinementStats_lock = NULL;
|
Mutex* G1DetachedRefinementStats_lock = NULL;
|
||||||
|
@ -212,7 +211,6 @@ void mutex_init() {
|
||||||
def(CGC_lock , PaddedMonitor, special, true, _safepoint_check_never); // coordinate between fore- and background GC
|
def(CGC_lock , PaddedMonitor, special, true, _safepoint_check_never); // coordinate between fore- and background GC
|
||||||
def(STS_lock , PaddedMonitor, leaf, true, _safepoint_check_never);
|
def(STS_lock , PaddedMonitor, leaf, true, _safepoint_check_never);
|
||||||
|
|
||||||
def(FullGCCount_lock , PaddedMonitor, leaf, true, _safepoint_check_never); // in support of ExplicitGCInvokesConcurrent
|
|
||||||
if (UseG1GC) {
|
if (UseG1GC) {
|
||||||
def(G1OldGCCount_lock , PaddedMonitor, leaf, true, _safepoint_check_always);
|
def(G1OldGCCount_lock , PaddedMonitor, leaf, true, _safepoint_check_always);
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,6 @@ extern Mutex* NonJavaThreadsListSync_lock; // a lock for NonJavaThreads li
|
||||||
extern Monitor* CGC_lock; // used for coordination between
|
extern Monitor* CGC_lock; // used for coordination between
|
||||||
// fore- & background GC threads.
|
// fore- & background GC threads.
|
||||||
extern Monitor* STS_lock; // used for joining/leaving SuspendibleThreadSet.
|
extern Monitor* STS_lock; // used for joining/leaving SuspendibleThreadSet.
|
||||||
extern Monitor* FullGCCount_lock; // in support of "concurrent" full gc
|
|
||||||
extern Monitor* G1OldGCCount_lock; // in support of "concurrent" full gc
|
extern Monitor* G1OldGCCount_lock; // in support of "concurrent" full gc
|
||||||
extern Mutex* Shared_DirtyCardQ_lock; // Lock protecting dirty card
|
extern Mutex* Shared_DirtyCardQ_lock; // Lock protecting dirty card
|
||||||
// queue shared by
|
// queue shared by
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue