src/share/vm/memory/collectorPolicy.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/memory/collectorPolicy.hpp Wed Apr 30 00:14:06 2014
--- new/src/share/vm/memory/collectorPolicy.hpp Wed Apr 30 00:14:06 2014
*** 45,55 ****
--- 45,54 ----
// behavior that requires global attention. The correct place
// to deal with those issues is this class.
// Forward declarations.
class GenCollectorPolicy;
class TwoGenerationCollectorPolicy;
class AdaptiveSizePolicy;
#if INCLUDE_ALL_GCS
class ConcurrentMarkSweepPolicy;
class G1CollectorPolicy;
#endif // INCLUDE_ALL_GCS
*** 112,122 ****
--- 111,121 ----
size_t max_heap_byte_size() { return _max_heap_byte_size; }
size_t min_heap_byte_size() { return _min_heap_byte_size; }
enum Name {
CollectorPolicyKind,
! TwoGenerationCollectorPolicyKind,
! GenCollectorPolicyKind,
ConcurrentMarkSweepPolicyKind,
ASConcurrentMarkSweepPolicyKind,
G1CollectorPolicyKind
};
*** 133,151 ****
--- 132,148 ----
// that the request in _should_clear_all_soft_refs has been fulfilled.
void cleared_all_soft_refs();
// Identification methods.
virtual GenCollectorPolicy* as_generation_policy() { return NULL; }
virtual TwoGenerationCollectorPolicy* as_two_generation_policy() { return NULL; }
virtual MarkSweepPolicy* as_mark_sweep_policy() { return NULL; }
#if INCLUDE_ALL_GCS
virtual ConcurrentMarkSweepPolicy* as_concurrent_mark_sweep_policy() { return NULL; }
virtual G1CollectorPolicy* as_g1_policy() { return NULL; }
#endif // INCLUDE_ALL_GCS
// Note that these are not virtual.
bool is_generation_policy() { return as_generation_policy() != NULL; }
bool is_two_generation_policy() { return as_two_generation_policy() != NULL; }
bool is_mark_sweep_policy() { return as_mark_sweep_policy() != NULL; }
#if INCLUDE_ALL_GCS
bool is_concurrent_mark_sweep_policy() { return as_concurrent_mark_sweep_policy() != NULL; }
bool is_g1_policy() { return as_g1_policy() != NULL; }
#else // INCLUDE_ALL_GCS
*** 223,232 ****
--- 220,232 ----
friend class TestGenCollectorPolicy;
protected:
size_t _min_gen0_size;
size_t _initial_gen0_size;
size_t _max_gen0_size;
+ size_t _min_gen1_size;
+ size_t _initial_gen1_size;
+ size_t _max_gen1_size;
// _gen_alignment and _space_alignment will have the same value most of the
// time. When using large pages they can differ.
size_t _gen_alignment;
*** 262,273 ****
--- 262,276 ----
// Accessors
size_t min_gen0_size() { return _min_gen0_size; }
size_t initial_gen0_size() { return _initial_gen0_size; }
size_t max_gen0_size() { return _max_gen0_size; }
size_t gen_alignment() { return _gen_alignment; }
+ size_t min_gen1_size() { return _min_gen1_size; }
+ size_t initial_gen1_size() { return _initial_gen1_size; }
+ size_t max_gen1_size() { return _max_gen1_size; }
virtual int number_of_generations() = 0;
+ int number_of_generations() { return 2; }
virtual GenerationSpec **generations() {
assert(_generations != NULL, "Sanity check");
return _generations;
}
*** 295,345 ****
--- 298,316 ----
size_t init_survivor_size);
virtual void post_heap_initialize() {
assert(_max_gen0_size == MaxNewSize, "Should be taken care of by initialize_size_info");
}
};
// All of hotspot's current collectors are subtypes of this
// class. Currently, these collectors all use the same gen[0],
// but have different gen[1] types. If we add another subtype
// of CollectorPolicy, this class should be broken out into
// its own file.
class TwoGenerationCollectorPolicy : public GenCollectorPolicy {
protected:
size_t _min_gen1_size;
size_t _initial_gen1_size;
size_t _max_gen1_size;
void initialize_flags();
void initialize_size_info();
DEBUG_ONLY(void assert_flags();)
DEBUG_ONLY(void assert_size_info();)
public:
TwoGenerationCollectorPolicy() : GenCollectorPolicy(), _min_gen1_size(0),
_initial_gen1_size(0), _max_gen1_size(0) {}
// Accessors
size_t min_gen1_size() { return _min_gen1_size; }
size_t initial_gen1_size() { return _initial_gen1_size; }
size_t max_gen1_size() { return _max_gen1_size; }
// Inherited methods
TwoGenerationCollectorPolicy* as_two_generation_policy() { return this; }
int number_of_generations() { return 2; }
BarrierSet::Name barrier_set_name() { return BarrierSet::CardTableModRef; }
virtual CollectorPolicy::Name kind() {
! return CollectorPolicy::TwoGenerationCollectorPolicyKind;
! return CollectorPolicy::GenCollectorPolicyKind;
}
};
! class MarkSweepPolicy : public TwoGenerationCollectorPolicy {
! class MarkSweepPolicy : public GenCollectorPolicy {
protected:
void initialize_alignments();
void initialize_generations();
public:
src/share/vm/memory/collectorPolicy.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File