equal
deleted
inserted
replaced
56 |
56 |
57 public: |
57 public: |
58 GCMessage() {} |
58 GCMessage() {} |
59 }; |
59 }; |
60 |
60 |
|
61 class CollectedHeap; |
|
62 |
61 class GCHeapLog : public EventLogBase<GCMessage> { |
63 class GCHeapLog : public EventLogBase<GCMessage> { |
62 private: |
64 private: |
63 void log_heap(bool before); |
65 void log_heap(CollectedHeap* heap, bool before); |
64 |
66 |
65 public: |
67 public: |
66 GCHeapLog() : EventLogBase<GCMessage>("GC Heap History") {} |
68 GCHeapLog() : EventLogBase<GCMessage>("GC Heap History") {} |
67 |
69 |
68 void log_heap_before() { |
70 void log_heap_before(CollectedHeap* heap) { |
69 log_heap(true); |
71 log_heap(heap, true); |
70 } |
72 } |
71 void log_heap_after() { |
73 void log_heap_after(CollectedHeap* heap) { |
72 log_heap(false); |
74 log_heap(heap, false); |
73 } |
75 } |
74 }; |
76 }; |
75 |
77 |
76 // |
78 // |
77 // CollectedHeap |
79 // CollectedHeap |
193 static inline size_t filler_array_max_size() { |
195 static inline size_t filler_array_max_size() { |
194 return _filler_array_max_size; |
196 return _filler_array_max_size; |
195 } |
197 } |
196 |
198 |
197 virtual Name kind() const = 0; |
199 virtual Name kind() const = 0; |
|
200 |
|
201 virtual const char* name() const = 0; |
198 |
202 |
199 /** |
203 /** |
200 * Returns JNI error code JNI_ENOMEM if memory could not be allocated, |
204 * Returns JNI error code JNI_ENOMEM if memory could not be allocated, |
201 * and JNI_OK on success. |
205 * and JNI_OK on success. |
202 */ |
206 */ |
518 |
522 |
519 // Perform any cleanup actions necessary before allowing a verification. |
523 // Perform any cleanup actions necessary before allowing a verification. |
520 virtual void prepare_for_verify() = 0; |
524 virtual void prepare_for_verify() = 0; |
521 |
525 |
522 // Generate any dumps preceding or following a full gc |
526 // Generate any dumps preceding or following a full gc |
|
527 private: |
|
528 void full_gc_dump(GCTimer* timer, const char* when); |
|
529 public: |
523 void pre_full_gc_dump(GCTimer* timer); |
530 void pre_full_gc_dump(GCTimer* timer); |
524 void post_full_gc_dump(GCTimer* timer); |
531 void post_full_gc_dump(GCTimer* timer); |
525 |
532 |
526 VirtualSpaceSummary create_heap_space_summary(); |
533 VirtualSpaceSummary create_heap_space_summary(); |
527 GCHeapSummary create_heap_summary(); |
534 GCHeapSummary create_heap_summary(); |
568 |
575 |
569 void trace_heap_before_gc(const GCTracer* gc_tracer); |
576 void trace_heap_before_gc(const GCTracer* gc_tracer); |
570 void trace_heap_after_gc(const GCTracer* gc_tracer); |
577 void trace_heap_after_gc(const GCTracer* gc_tracer); |
571 |
578 |
572 // Heap verification |
579 // Heap verification |
573 virtual void verify(bool silent, VerifyOption option) = 0; |
580 virtual void verify(VerifyOption option) = 0; |
574 |
581 |
575 // Non product verification and debugging. |
582 // Non product verification and debugging. |
576 #ifndef PRODUCT |
583 #ifndef PRODUCT |
577 // Support for PromotionFailureALot. Return true if it's time to cause a |
584 // Support for PromotionFailureALot. Return true if it's time to cause a |
578 // promotion failure. The no-argument version uses |
585 // promotion failure. The no-argument version uses |