mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
7036199: Adding a notification to the implementation of GarbageCollectorMXBeans
Add a notification to the GarbageCollectorMXBeans Reviewed-by: acorn, mchung
This commit is contained in:
parent
d2ab644ad1
commit
b38843c8d9
18 changed files with 395 additions and 29 deletions
|
@ -166,6 +166,7 @@ private:
|
|||
Mutex* _last_gc_lock;
|
||||
GCStatInfo* _current_gc_stat;
|
||||
int _num_gc_threads;
|
||||
volatile bool _notification_enabled;
|
||||
public:
|
||||
GCMemoryManager();
|
||||
~GCMemoryManager();
|
||||
|
@ -181,7 +182,7 @@ public:
|
|||
void gc_begin(bool recordGCBeginTime, bool recordPreGCUsage,
|
||||
bool recordAccumulatedGCTime);
|
||||
void gc_end(bool recordPostGCUsage, bool recordAccumulatedGCTime,
|
||||
bool recordGCEndTime, bool countCollection);
|
||||
bool recordGCEndTime, bool countCollection, GCCause::Cause cause);
|
||||
|
||||
void reset_gc_stat() { _num_collections = 0; _accumulated_timer.reset(); }
|
||||
|
||||
|
@ -189,6 +190,8 @@ public:
|
|||
// the collection count. Zero signifies no gc has taken place.
|
||||
size_t get_last_gc_stat(GCStatInfo* dest);
|
||||
|
||||
void set_notification_enabled(bool enabled) { _notification_enabled = enabled; }
|
||||
bool is_notification_enabled() { return _notification_enabled; }
|
||||
virtual MemoryManager::Name kind() = 0;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue