380 increment_total_full_collections(); 381 } 382 } 383 384 void increment_total_full_collections() { _total_full_collections++; } 385 386 // Return the SoftRefPolicy for the heap; 387 virtual SoftRefPolicy* soft_ref_policy() = 0; 388 389 virtual MemoryUsage memory_usage(); 390 virtual GrowableArray<GCMemoryManager*> memory_managers() = 0; 391 virtual GrowableArray<MemoryPool*> memory_pools() = 0; 392 393 // Iterate over all objects, calling "cl.do_object" on each. 394 virtual void object_iterate(ObjectClosure* cl) = 0; 395 396 virtual ParallelObjectIterator* parallel_object_iterator(uint thread_num) { 397 return NULL; 398 } 399 400 // FIXME: G1 already have a run_task returning Tickspan - adapting for now. 401 virtual Tickspan run_task(AbstractGangTask* task); 402 403 // Keep alive an object that was loaded with AS_NO_KEEPALIVE. 404 virtual void keep_alive(oop obj) {} 405 406 // Returns the longest time (in ms) that has elapsed since the last 407 // time that any part of the heap was examined by a garbage collection. 408 virtual jlong millis_since_last_gc() = 0; 409 410 // Perform any cleanup actions necessary before allowing a verification. 411 virtual void prepare_for_verify() = 0; 412 413 // Generate any dumps preceding or following a full gc 414 private: 415 void full_gc_dump(GCTimer* timer, bool before); 416 417 virtual void initialize_serviceability() = 0; 418 419 public: 420 void pre_full_gc_dump(GCTimer* timer); 421 void post_full_gc_dump(GCTimer* timer); | 380 increment_total_full_collections(); 381 } 382 } 383 384 void increment_total_full_collections() { _total_full_collections++; } 385 386 // Return the SoftRefPolicy for the heap; 387 virtual SoftRefPolicy* soft_ref_policy() = 0; 388 389 virtual MemoryUsage memory_usage(); 390 virtual GrowableArray<GCMemoryManager*> memory_managers() = 0; 391 virtual GrowableArray<MemoryPool*> memory_pools() = 0; 392 393 // Iterate over all objects, calling "cl.do_object" on each. 394 virtual void object_iterate(ObjectClosure* cl) = 0; 395 396 virtual ParallelObjectIterator* parallel_object_iterator(uint thread_num) { 397 return NULL; 398 } 399 400 // Run given task, parallelly if possible. 401 virtual Tickspan run_task(AbstractGangTask* task) = 0; 402 403 // Keep alive an object that was loaded with AS_NO_KEEPALIVE. 404 virtual void keep_alive(oop obj) {} 405 406 // Returns the longest time (in ms) that has elapsed since the last 407 // time that any part of the heap was examined by a garbage collection. 408 virtual jlong millis_since_last_gc() = 0; 409 410 // Perform any cleanup actions necessary before allowing a verification. 411 virtual void prepare_for_verify() = 0; 412 413 // Generate any dumps preceding or following a full gc 414 private: 415 void full_gc_dump(GCTimer* timer, bool before); 416 417 virtual void initialize_serviceability() = 0; 418 419 public: 420 void pre_full_gc_dump(GCTimer* timer); 421 void post_full_gc_dump(GCTimer* timer); |