1 /* |
1 /* |
2 * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
92 */ |
92 */ |
93 class MemSummaryReporter : public MemReporterBase { |
93 class MemSummaryReporter : public MemReporterBase { |
94 private: |
94 private: |
95 MallocMemorySnapshot* _malloc_snapshot; |
95 MallocMemorySnapshot* _malloc_snapshot; |
96 VirtualMemorySnapshot* _vm_snapshot; |
96 VirtualMemorySnapshot* _vm_snapshot; |
97 size_t _class_count; |
97 size_t _instance_class_count; |
|
98 size_t _array_class_count; |
98 |
99 |
99 public: |
100 public: |
100 // This constructor is for normal reporting from a recent baseline. |
101 // This constructor is for normal reporting from a recent baseline. |
101 MemSummaryReporter(MemBaseline& baseline, outputStream* output, |
102 MemSummaryReporter(MemBaseline& baseline, outputStream* output, |
102 size_t scale = K) : MemReporterBase(output, scale), |
103 size_t scale = K) : MemReporterBase(output, scale), |
103 _malloc_snapshot(baseline.malloc_memory_snapshot()), |
104 _malloc_snapshot(baseline.malloc_memory_snapshot()), |
104 _vm_snapshot(baseline.virtual_memory_snapshot()), |
105 _vm_snapshot(baseline.virtual_memory_snapshot()), |
105 _class_count(baseline.class_count()) { } |
106 _instance_class_count(baseline.instance_class_count()), |
|
107 _array_class_count(baseline.array_class_count()) { } |
106 |
108 |
107 |
109 |
108 // Generate summary report |
110 // Generate summary report |
109 virtual void report(); |
111 virtual void report(); |
110 private: |
112 private: |