100 static elapsedTimer* accumulated_time() { return &_accumulated_time; }
101 static int consecutive_skipped_scavenges()
102 { return _consecutive_skipped_scavenges; }
103
104 // Performance Counters
105 static CollectorCounters* counters() { return _counters; }
106
107 // Used by scavenge_contents && psMarkSweep
108 static ReferenceProcessor* const reference_processor() {
109 assert(_ref_processor != NULL, "Sanity");
110 return _ref_processor;
111 }
112 // Used to add tasks
113 static GCTaskManager* const gc_task_manager();
114 // The promotion managers tell us if they encountered overflow
115 static void set_survivor_overflow(bool state) {
116 _survivor_overflow = state;
117 }
118 // Adaptive size policy support. When the young generation/old generation
119 // boundary moves, _young_generation_boundary must be reset
120 static void set_young_generation_boundary(HeapWord* v) {
121 _young_generation_boundary = v;
122 if (UseCompressedOops) {
123 _young_generation_boundary_compressed = (uintptr_t)oopDesc::encode_heap_oop((oop)v);
124 }
125 }
126
127 // Called by parallelScavengeHeap to init the tenuring threshold
128 static void initialize();
129
130 // Scavenge entry point. This may invoke a full gc; return true if so.
131 static bool invoke();
132 // Return true if a collection was done; false otherwise.
133 static bool invoke_no_policy();
134
135 // If an attempt to promote fails, this method is invoked
136 static void oop_promotion_failed(oop obj, markOop obj_mark);
137
138 template <class T> static inline bool should_scavenge(T* p);
139
140 // These call should_scavenge() above and, if it returns true, also check that
141 // the object was not newly copied into to_space. The version with the bool
142 // argument is a convenience wrapper that fetches the to_space pointer from
143 // the heap and calls the other version (if the arg is true).
144 template <class T> static inline bool should_scavenge(T* p, MutableSpace* to_space);
145 template <class T> static inline bool should_scavenge(T* p, bool check_to_space);
|
100 static elapsedTimer* accumulated_time() { return &_accumulated_time; }
101 static int consecutive_skipped_scavenges()
102 { return _consecutive_skipped_scavenges; }
103
104 // Performance Counters
105 static CollectorCounters* counters() { return _counters; }
106
107 // Used by scavenge_contents && psMarkSweep
108 static ReferenceProcessor* const reference_processor() {
109 assert(_ref_processor != NULL, "Sanity");
110 return _ref_processor;
111 }
112 // Used to add tasks
113 static GCTaskManager* const gc_task_manager();
114 // The promotion managers tell us if they encountered overflow
115 static void set_survivor_overflow(bool state) {
116 _survivor_overflow = state;
117 }
118 // Adaptive size policy support. When the young generation/old generation
119 // boundary moves, _young_generation_boundary must be reset
120 static inline void set_young_generation_boundary(HeapWord* v);
121
122 // Called by parallelScavengeHeap to init the tenuring threshold
123 static void initialize();
124
125 // Scavenge entry point. This may invoke a full gc; return true if so.
126 static bool invoke();
127 // Return true if a collection was done; false otherwise.
128 static bool invoke_no_policy();
129
130 // If an attempt to promote fails, this method is invoked
131 static void oop_promotion_failed(oop obj, markOop obj_mark);
132
133 template <class T> static inline bool should_scavenge(T* p);
134
135 // These call should_scavenge() above and, if it returns true, also check that
136 // the object was not newly copied into to_space. The version with the bool
137 // argument is a convenience wrapper that fetches the to_space pointer from
138 // the heap and calls the other version (if the arg is true).
139 template <class T> static inline bool should_scavenge(T* p, MutableSpace* to_space);
140 template <class T> static inline bool should_scavenge(T* p, bool check_to_space);
|