< prev index next >

src/share/vm/gc/shared/collectorPolicy.hpp

Print this page
rev 10911 : 8154467: Cleanup initialization of GCPolicyCounters
Reviewed-by:

*** 56,67 **** class GCPolicyCounters; class MarkSweepPolicy; class CollectorPolicy : public CHeapObj<mtGC> { protected: - GCPolicyCounters* _gc_policy_counters; - virtual void initialize_alignments() = 0; virtual void initialize_flags(); virtual void initialize_size_info(); DEBUG_ONLY(virtual void assert_flags();) --- 56,65 ----
*** 147,165 **** MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data, size_t size, Metaspace::MetadataType mdtype); - // Performance Counter support - GCPolicyCounters* counters() { return _gc_policy_counters; } - - // Create the jstat counters for the GC policy. By default, policy's - // don't have associated counters, and we complain if this is invoked. - virtual void initialize_gc_policy_counters() { - ShouldNotReachHere(); - } - // Do any updates required to global flags that are due to heap initialization // changes virtual void post_heap_initialize() = 0; }; --- 145,154 ----
*** 195,204 **** --- 184,195 ---- size_t _gen_alignment; GenerationSpec* _young_gen_spec; GenerationSpec* _old_gen_spec; + GCPolicyCounters* _gc_policy_counters; + // Return true if an allocation should be attempted in the older generation // if it fails in the younger generation. Return false, otherwise. virtual bool should_try_older_generation_allocation(size_t word_size) const; void initialize_flags();
*** 241,250 **** --- 232,250 ---- GenerationSpec* old_gen_spec() const { assert(_old_gen_spec != NULL, "_old_gen_spec should have been initialized"); return _old_gen_spec; } + // Performance Counter support + GCPolicyCounters* counters() { return _gc_policy_counters; } + + // Create the jstat counters for the GC policy. By default, policies + // don't have associated counters, and we complain if this is invoked. + virtual void initialize_gc_policy_counters() { + ShouldNotReachHere(); + } + virtual GenCollectorPolicy* as_generation_policy() { return this; } virtual void initialize_generations() { }; virtual void initialize_all() {
< prev index next >