94 MallocMemorySnapshot* _malloc_snapshot; |
94 MallocMemorySnapshot* _malloc_snapshot; |
95 VirtualMemorySnapshot* _vm_snapshot; |
95 VirtualMemorySnapshot* _vm_snapshot; |
96 size_t _class_count; |
96 size_t _class_count; |
97 |
97 |
98 public: |
98 public: |
99 // Report summary tracking data from global snapshots directly. |
|
100 // This constructor is used for final reporting and hs_err reporting. |
|
101 MemSummaryReporter(MallocMemorySnapshot* malloc_snapshot, |
|
102 VirtualMemorySnapshot* vm_snapshot, outputStream* output, |
|
103 size_t class_count = 0, size_t scale = K) : |
|
104 MemReporterBase(output, scale), |
|
105 _malloc_snapshot(malloc_snapshot), |
|
106 _vm_snapshot(vm_snapshot) { |
|
107 if (class_count == 0) { |
|
108 _class_count = InstanceKlass::number_of_instance_classes(); |
|
109 } else { |
|
110 _class_count = class_count; |
|
111 } |
|
112 } |
|
113 // This constructor is for normal reporting from a recent baseline. |
99 // This constructor is for normal reporting from a recent baseline. |
114 MemSummaryReporter(MemBaseline& baseline, outputStream* output, |
100 MemSummaryReporter(MemBaseline& baseline, outputStream* output, |
115 size_t scale = K) : MemReporterBase(output, scale), |
101 size_t scale = K) : MemReporterBase(output, scale), |
116 _malloc_snapshot(baseline.malloc_memory_snapshot()), |
102 _malloc_snapshot(baseline.malloc_memory_snapshot()), |
117 _vm_snapshot(baseline.virtual_memory_snapshot()), |
103 _vm_snapshot(baseline.virtual_memory_snapshot()), |