src/share/vm/memory/genCollectedHeap.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/memory/genCollectedHeap.hpp
src/share/vm/memory/genCollectedHeap.hpp
Print this page
rev 7211 : [mq]: remove_ngen
*** 31,41 ****
#include "memory/sharedHeap.hpp"
class SubTasksDone;
// A "GenCollectedHeap" is a SharedHeap that uses generational
! // collection. It is represented with a sequence of Generation's.
class GenCollectedHeap : public SharedHeap {
friend class GenCollectorPolicy;
friend class Generation;
friend class DefNewGeneration;
friend class TenuredGeneration;
--- 31,41 ----
#include "memory/sharedHeap.hpp"
class SubTasksDone;
// A "GenCollectedHeap" is a SharedHeap that uses generational
! // collection. It has two generations, young and old.
class GenCollectedHeap : public SharedHeap {
friend class GenCollectorPolicy;
friend class Generation;
friend class DefNewGeneration;
friend class TenuredGeneration;
*** 61,71 ****
// Fields:
static GenCollectedHeap* _gch;
private:
int _n_gens;
! Generation* _gens[max_gens];
GenerationSpec** _gen_specs;
// The generational collector policy.
GenCollectorPolicy* _gen_policy;
--- 61,74 ----
// Fields:
static GenCollectedHeap* _gch;
private:
int _n_gens;
!
! Generation* _young_gen;
! Generation* _old_gen;
!
GenerationSpec** _gen_specs;
// The generational collector policy.
GenCollectorPolicy* _gen_policy;
*** 80,89 ****
--- 83,95 ----
// Data structure for claiming the (potentially) parallel tasks in
// (gen-specific) roots processing.
SubTasksDone* _gen_process_roots_tasks;
SubTasksDone* gen_process_roots_tasks() { return _gen_process_roots_tasks; }
+ void collect_generation(Generation* gen, bool full, size_t size, bool is_tlab,
+ bool run_verification, bool clear_soft_refs);
+
// In block contents verification, the number of header words to skip
NOT_PRODUCT(static size_t _skip_header_HeapWords;)
protected:
// Helper functions for allocation
*** 119,128 ****
--- 125,135 ----
GCStats* gc_stats(int level) const;
// Returns JNI_OK on success
virtual jint initialize();
+
char* allocate(size_t alignment,
size_t* _total_reserved, int* _n_covered_regions,
ReservedSpace* heap_rs);
// Does operations required after initialization has been done.
*** 133,144 ****
--- 140,155 ----
virtual CollectedHeap::Name kind() const {
return CollectedHeap::GenCollectedHeap;
}
+ Generation* young_gen() { return _young_gen; }
+ Generation* old_gen() { return _old_gen; }
+
// The generational collector policy.
GenCollectorPolicy* gen_policy() const { return _gen_policy; }
+
virtual CollectorPolicy* collector_policy() const { return (CollectorPolicy*) gen_policy(); }
// Adaptive size policy
virtual AdaptiveSizePolicy* size_policy() {
return gen_policy()->size_policy();
*** 304,327 ****
// Update above counter, as appropriate, at the end of a stop-world GC cycle
unsigned int update_full_collections_completed();
// Update above counter, as appropriate, at the end of a concurrent GC cycle
unsigned int update_full_collections_completed(unsigned int count);
! // Update "time of last gc" for all constituent generations
! // to "now".
void update_time_of_last_gc(jlong now) {
! for (int i = 0; i < _n_gens; i++) {
! _gens[i]->update_time_of_last_gc(now);
! }
}
// Update the gc statistics for each generation.
// "level" is the level of the latest collection.
void update_gc_stats(int current_level, bool full) {
! for (int i = 0; i < _n_gens; i++) {
! _gens[i]->update_gc_stats(current_level, full);
! }
}
// Override.
bool no_gc_in_progress() { return !is_gc_active(); }
--- 315,335 ----
// Update above counter, as appropriate, at the end of a stop-world GC cycle
unsigned int update_full_collections_completed();
// Update above counter, as appropriate, at the end of a concurrent GC cycle
unsigned int update_full_collections_completed(unsigned int count);
! // Update "time of last gc" for all generations to "now".
void update_time_of_last_gc(jlong now) {
! _young_gen->update_time_of_last_gc(now);
! _old_gen->update_time_of_last_gc(now);
}
// Update the gc statistics for each generation.
// "level" is the level of the latest collection.
void update_gc_stats(int current_level, bool full) {
! _young_gen->update_gc_stats(current_level, full);
! _old_gen->update_gc_stats(current_level, full);
}
// Override.
bool no_gc_in_progress() { return !is_gc_active(); }
*** 362,385 ****
virtual bool is_maximal_no_gc() const;
// Return the generation before "gen".
Generation* prev_gen(Generation* gen) const {
int l = gen->level();
! guarantee(l > 0, "Out of bounds");
! return _gens[l-1];
}
// Return the generation after "gen".
Generation* next_gen(Generation* gen) const {
int l = gen->level() + 1;
! guarantee(l < _n_gens, "Out of bounds");
! return _gens[l];
}
Generation* get_gen(int i) const {
guarantee(i >= 0 && i < _n_gens, "Out of bounds");
! return _gens[i];
}
int n_gens() const {
assert(_n_gens == gen_policy()->number_of_generations(), "Sanity");
return _n_gens;
--- 370,394 ----
virtual bool is_maximal_no_gc() const;
// Return the generation before "gen".
Generation* prev_gen(Generation* gen) const {
int l = gen->level();
! guarantee(l == 1, "Out of bounds");
! return _young_gen;
}
// Return the generation after "gen".
Generation* next_gen(Generation* gen) const {
int l = gen->level() + 1;
! guarantee(l == 1, "Out of bounds");
! return _old_gen;
}
Generation* get_gen(int i) const {
guarantee(i >= 0 && i < _n_gens, "Out of bounds");
! if (i == 0) return _young_gen;
! else return _old_gen;
}
int n_gens() const {
assert(_n_gens == gen_policy()->number_of_generations(), "Sanity");
return _n_gens;
src/share/vm/memory/genCollectedHeap.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File