< prev index next >
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp
Print this page
rev 7474 : imported patch separateCardGeneration
rev 7476 : imported patch expand_for_gc_cause
rev 7477 : imported patch move_stuff_up
*** 1,7 ****
/*
! * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 31,40 ****
--- 31,41 ----
#include "gc_implementation/shared/gcWhen.hpp"
#include "gc_implementation/shared/generationCounters.hpp"
#include "memory/cardGeneration.hpp"
#include "memory/freeBlockDictionary.hpp"
#include "memory/iterator.hpp"
+ #include "memory/space.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/virtualspace.hpp"
#include "services/memoryService.hpp"
#include "utilities/bitMap.inline.hpp"
#include "utilities/stack.inline.hpp"
*** 1029,1038 ****
--- 1030,1042 ----
// accessors
void set_expansion_cause(CMSExpansionCause::Cause v) { _expansion_cause = v;}
CMSExpansionCause::Cause expansion_cause() const { return _expansion_cause; }
+ // Accessing spaces
+ CompactibleSpace* space() const { return (CompactibleSpace*)_cmsSpace; }
+
private:
// For parallel young-gen GC support.
CMSParGCThreadState** _par_gc_thread_states;
// Reason generation was expanded
*** 1062,1071 ****
--- 1066,1079 ----
// getter and initializer for _initiating_occupancy field.
double initiating_occupancy() const { return _initiating_occupancy; }
void init_initiating_occupancy(intx io, uintx tr);
+ void expand_for_gc_cause(size_t bytes, size_t expand_bytes, CMSExpansionCause::Cause cause);
+
+ void assert_correct_size_change_locking();
+
public:
ConcurrentMarkSweepGeneration(ReservedSpace rs, size_t initial_byte_size,
int level, CardTableRS* ct,
bool use_adaptive_freelists,
FreeBlockDictionary<FreeChunk>::DictionaryChoice);
*** 1098,1138 ****
}
// Override
virtual void ref_processor_init();
- // Grow generation by specified size (returns false if unable to grow)
- bool grow_by(size_t bytes);
- // Grow generation to reserved size.
- bool grow_to_reserved();
-
void clear_expansion_cause() { _expansion_cause = CMSExpansionCause::_no_expansion; }
// Space enquiries
- size_t capacity() const;
- size_t used() const;
- size_t free() const;
double occupancy() const { return ((double)used())/((double)capacity()); }
size_t contiguous_available() const;
size_t unsafe_max_alloc_nogc() const;
// over-rides
- MemRegion used_region() const;
MemRegion used_region_at_save_marks() const;
// Does a "full" (forced) collection invoked on this generation collect
// all younger generations as well? Note that the second conjunct is a
// hack to allow the collection of the younger gen first if the flag is
// set.
virtual bool full_collects_younger_generations() const {
return !ScavengeBeforeFullGC;
}
- void space_iterate(SpaceClosure* blk, bool usedOnly = false);
-
- // Support for compaction
- CompactibleSpace* first_compaction_space() const;
// Adjust quantities in the generation affected by
// the compaction.
void reset_after_compaction();
// Allocation support
--- 1106,1133 ----
*** 1188,1209 ****
void update_time_of_last_gc(jlong now) {
collector()-> update_time_of_last_gc(now);
}
// Allocation failure
- void expand(size_t bytes, size_t expand_bytes,
- CMSExpansionCause::Cause cause);
- virtual bool expand(size_t bytes, size_t expand_bytes);
void shrink(size_t bytes);
- void shrink_by(size_t bytes);
HeapWord* expand_and_par_lab_allocate(CMSParGCThreadState* ps, size_t word_sz);
bool expand_and_ensure_spooling_space(PromotionInfo* promo);
// Iteration support and related enquiries
void save_marks();
bool no_allocs_since_save_marks();
- void younger_refs_iterate(OopsInGenClosure* cl);
// Iteration support specific to CMS generations
void save_sweep_limit();
// More iteration support
--- 1183,1199 ----
< prev index next >