< prev index next >

src/hotspot/share/gc/shared/collectedHeap.cpp

Print this page

191 }
192 
193 void CollectedHeap::trace_heap_after_gc(const GCTracer* gc_tracer) {
194   trace_heap(GCWhen::AfterGC, gc_tracer);
195 }
196 
197 // Default implementation, for collectors that don't support the feature.
198 bool CollectedHeap::supports_concurrent_gc_breakpoints() const {
199   return false;
200 }
201 
202 bool CollectedHeap::is_oop(oop object) const {
203   if (!is_object_aligned(object)) {
204     return false;
205   }
206 
207   if (!is_in(object)) {
208     return false;
209   }
210 
211   if (is_in(object->klass_or_null())) {
212     return false;
213   }
214 
215   return true;
216 }
217 
218 // Memory state functions.
219 
220 
221 CollectedHeap::CollectedHeap() :
222   _capacity_at_last_gc(0),
223   _used_at_last_gc(0),
224   _is_gc_active(false),
225   _last_whole_heap_examined_time_ns(os::javaTimeNanos()),
226   _total_collections(0),
227   _total_full_collections(0),
228   _gc_cause(GCCause::_no_gc),
229   _gc_lastcause(GCCause::_no_gc)
230 {
231   const size_t max_len = size_t(arrayOopDesc::max_array_length(T_INT));
232   const size_t elements_per_word = HeapWordSize / sizeof(jint);
233   _filler_array_max_size = align_object_size(filler_array_hdr_size() +
234                                              max_len / elements_per_word);

191 }
192 
193 void CollectedHeap::trace_heap_after_gc(const GCTracer* gc_tracer) {
194   trace_heap(GCWhen::AfterGC, gc_tracer);
195 }
196 
197 // Default implementation, for collectors that don't support the feature.
198 bool CollectedHeap::supports_concurrent_gc_breakpoints() const {
199   return false;
200 }
201 
202 bool CollectedHeap::is_oop(oop object) const {
203   if (!is_object_aligned(object)) {
204     return false;
205   }
206 
207   if (!is_in(object)) {
208     return false;
209   }
210 




211   return true;
212 }
213 
214 // Memory state functions.
215 
216 
217 CollectedHeap::CollectedHeap() :
218   _capacity_at_last_gc(0),
219   _used_at_last_gc(0),
220   _is_gc_active(false),
221   _last_whole_heap_examined_time_ns(os::javaTimeNanos()),
222   _total_collections(0),
223   _total_full_collections(0),
224   _gc_cause(GCCause::_no_gc),
225   _gc_lastcause(GCCause::_no_gc)
226 {
227   const size_t max_len = size_t(arrayOopDesc::max_array_length(T_INT));
228   const size_t elements_per_word = HeapWordSize / sizeof(jint);
229   _filler_array_max_size = align_object_size(filler_array_hdr_size() +
230                                              max_len / elements_per_word);
< prev index next >