src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
Print this page
rev 4773 : 8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
*** 23,34 ****
--- 23,36 ----
*/
#ifndef SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CONCURRENTMARKSWEEPGENERATION_HPP
#define SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CONCURRENTMARKSWEEPGENERATION_HPP
+ #include "gc_implementation/shared/gcHeapSummary.hpp"
#include "gc_implementation/shared/gSpaceCounters.hpp"
#include "gc_implementation/shared/gcStats.hpp"
+ #include "gc_implementation/shared/gcWhen.hpp"
#include "gc_implementation/shared/generationCounters.hpp"
#include "memory/freeBlockDictionary.hpp"
#include "memory/generation.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/virtualspace.hpp"
*** 51,68 ****
--- 53,73 ----
// means of a sliding mark-compact.
class CMSAdaptiveSizePolicy;
class CMSConcMarkingTask;
class CMSGCAdaptivePolicyCounters;
+ class CMSTracer;
+ class ConcurrentGCTimer;
class ConcurrentMarkSweepGeneration;
class ConcurrentMarkSweepPolicy;
class ConcurrentMarkSweepThread;
class CompactibleFreeListSpace;
class FreeChunk;
class PromotionInfo;
class ScanMarkedObjectsAgainCarefullyClosure;
class TenuredGeneration;
+ class SerialOldTracer;
// A generic CMS bit map. It's the basis for both the CMS marking bit map
// as well as for the mod union table (in each case only a subset of the
// methods are used). This is essentially a wrapper around the BitMap class,
// with one bit per (1<<_shifter) HeapWords. (i.e. for the marking bit map,
*** 566,575 ****
--- 571,581 ----
// Initialization Errors
bool _completed_initialization;
// In support of ExplicitGCInvokesConcurrent
static bool _full_gc_requested;
+ static GCCause::Cause _full_gc_cause;
unsigned int _collection_count_start;
// Should we unload classes this concurrent cycle?
bool _should_unload_classes;
unsigned int _concurrent_cycles_since_last_unload;
*** 607,616 ****
--- 613,636 ----
elapsedTimer _intra_sweep_timer; // time _in_ sweeps
// padded decaying average estimates of the above
AdaptivePaddedAverage _inter_sweep_estimate;
AdaptivePaddedAverage _intra_sweep_estimate;
+ CMSTracer* _gc_tracer_cm;
+ ConcurrentGCTimer* _gc_timer_cm;
+
+ bool _cms_start_registered;
+
+ GCHeapSummary _last_heap_summary;
+ MetaspaceSummary _last_metaspace_summary;
+
+ void register_foreground_gc_start(GCCause::Cause cause);
+ void register_gc_start(GCCause::Cause cause);
+ void register_gc_end();
+ void save_heap_summary();
+ void report_heap_summary(GCWhen::Type when);
+
protected:
ConcurrentMarkSweepGeneration* _cmsGen; // old gen (CMS)
MemRegion _span; // span covering above two
CardTableRS* _ct; // card table
*** 825,834 ****
--- 845,858 ----
// a mark-sweep, after taking over from a possibly on-going
// concurrent mark-sweep collection.
void do_mark_sweep_work(bool clear_all_soft_refs,
CollectorState first_state, bool should_start_over);
+ // Work methods for reporting concurrent mode interruption or failure
+ bool is_external_interruption();
+ void report_concurrent_mode_interruption();
+
// If the backgrould GC is active, acquire control from the background
// GC and do the collection.
void acquire_control_and_collect(bool full, bool clear_all_soft_refs);
// For synchronizing passing of control from background to foreground
*** 874,888 ****
void collect(bool full,
bool clear_all_soft_refs,
size_t size,
bool tlab);
! void collect_in_background(bool clear_all_soft_refs);
! void collect_in_foreground(bool clear_all_soft_refs);
// In support of ExplicitGCInvokesConcurrent
! static void request_full_gc(unsigned int full_gc_count);
// Should we unload classes in a particular concurrent cycle?
bool should_unload_classes() const {
return _should_unload_classes;
}
void update_should_unload_classes();
--- 898,912 ----
void collect(bool full,
bool clear_all_soft_refs,
size_t size,
bool tlab);
! void collect_in_background(bool clear_all_soft_refs, GCCause::Cause cause);
! void collect_in_foreground(bool clear_all_soft_refs, GCCause::Cause cause);
// In support of ExplicitGCInvokesConcurrent
! static void request_full_gc(unsigned int full_gc_count, GCCause::Cause cause);
// Should we unload classes in a particular concurrent cycle?
bool should_unload_classes() const {
return _should_unload_classes;
}
void update_should_unload_classes();