< prev index next >

src/hotspot/share/gc/shared/genCollectedHeap.hpp

Print this page
rev 47476 : 8183542: Factor out serial GC specific code from GenCollectedHeap into its own subclass

*** 81,90 **** --- 81,96 ---- // Collects the given generation. void collect_generation(Generation* gen, bool full, size_t size, bool is_tlab, bool run_verification, bool clear_soft_refs, bool restore_marks_for_biased_locking); + // Reserve aligned space for the heap as needed by the contained generations. + char* allocate(size_t alignment, ReservedSpace* heap_rs); + + // Initialize ("weak") refs processing support + void ref_processing_init(); + protected: // The set of potentially parallel tasks in root scanning. enum GCH_strong_roots_tasks { GCH_PS_Universe_oops_do,
*** 132,166 **** // Does the "cause" of GC indicate that // we absolutely __must__ clear soft refs? bool must_clear_all_soft_refs(); - public: GenCollectedHeap(GenCollectorPolicy *policy); // Returns JNI_OK on success virtual jint initialize(); - // Reserve aligned space for the heap as needed by the contained generations. - char* allocate(size_t alignment, ReservedSpace* heap_rs); - // Does operations required after initialization has been done. void post_initialize(); - virtual void check_gen_kinds(); - - // Initialize ("weak") refs processing support - virtual void ref_processing_init(); - - virtual Name kind() const { - return CollectedHeap::GenCollectedHeap; - } - - virtual const char* name() const { - return "Serial"; - } - Generation* young_gen() const { return _young_gen; } Generation* old_gen() const { return _old_gen; } bool is_young_gen(const Generation* gen) const { return gen == _young_gen; } bool is_old_gen(const Generation* gen) const { return gen == _old_gen; } --- 138,159 ---- // Does the "cause" of GC indicate that // we absolutely __must__ clear soft refs? bool must_clear_all_soft_refs(); GenCollectedHeap(GenCollectorPolicy *policy); + virtual void check_gen_kinds() = 0; + + public: + // Returns JNI_OK on success virtual jint initialize(); // Does operations required after initialization has been done. void post_initialize(); Generation* young_gen() const { return _young_gen; } Generation* old_gen() const { return _old_gen; } bool is_young_gen(const Generation* gen) const { return gen == _young_gen; } bool is_old_gen(const Generation* gen) const { return gen == _old_gen; }
*** 213,227 **** // be expensive to compute in general, so, to prevent // their inadvertent use in product jvm's, we restrict their use to // assertion checking or verification only. bool is_in(const void* p) const; - // override - virtual bool is_in_closed_subset(const void* p) const { - return is_in(p); - } - // Returns true if the reference is to an object in the reserved space // for the young generation. // Assumes the the young gen address range is less than that of the old gen. bool is_in_young(oop p); --- 206,215 ----
*** 284,297 **** // via a TLAB up to the first subsequent safepoint. virtual bool can_elide_tlab_store_barriers() const { return true; } - virtual bool card_mark_must_follow_store() const { - return false; - } - // We don't need barriers for stores to objects in the // young gen and, a fortiori, for initializing stores to // objects therein. This applies to DefNew+Tenured and ParNew+CMS // only and may need to be re-examined in case other // kinds of collectors are implemented in the future. --- 272,281 ----
< prev index next >