|
1 /* |
|
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 * |
|
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 |
|
7 * published by the Free Software Foundation. |
|
8 * |
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
|
13 * accompanied this code). |
|
14 * |
|
15 * You should have received a copy of the GNU General Public License version |
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 * |
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 * or visit www.oracle.com if you need additional information or have any |
|
21 * questions. |
|
22 * |
|
23 */ |
|
24 |
|
25 #ifndef SHARE_VM_MEMORY_METASPACECHUNKFREELISTSUMMARY_HPP |
|
26 #define SHARE_VM_MEMORY_METASPACECHUNKFREELISTSUMMARY_HPP |
|
27 |
|
28 #include "memory/allocation.hpp" |
|
29 |
|
30 class MetaspaceChunkFreeListSummary VALUE_OBJ_CLASS_SPEC { |
|
31 size_t _num_specialized_chunks; |
|
32 size_t _num_small_chunks; |
|
33 size_t _num_medium_chunks; |
|
34 size_t _num_humongous_chunks; |
|
35 |
|
36 size_t _specialized_chunks_size_in_bytes; |
|
37 size_t _small_chunks_size_in_bytes; |
|
38 size_t _medium_chunks_size_in_bytes; |
|
39 size_t _humongous_chunks_size_in_bytes; |
|
40 |
|
41 public: |
|
42 MetaspaceChunkFreeListSummary() : |
|
43 _num_specialized_chunks(0), |
|
44 _num_small_chunks(0), |
|
45 _num_medium_chunks(0), |
|
46 _num_humongous_chunks(0), |
|
47 _specialized_chunks_size_in_bytes(0), |
|
48 _small_chunks_size_in_bytes(0), |
|
49 _medium_chunks_size_in_bytes(0), |
|
50 _humongous_chunks_size_in_bytes(0) |
|
51 {} |
|
52 |
|
53 MetaspaceChunkFreeListSummary(size_t num_specialized_chunks, |
|
54 size_t num_small_chunks, |
|
55 size_t num_medium_chunks, |
|
56 size_t num_humongous_chunks, |
|
57 size_t specialized_chunks_size_in_bytes, |
|
58 size_t small_chunks_size_in_bytes, |
|
59 size_t medium_chunks_size_in_bytes, |
|
60 size_t humongous_chunks_size_in_bytes) : |
|
61 _num_specialized_chunks(num_specialized_chunks), |
|
62 _num_small_chunks(num_small_chunks), |
|
63 _num_medium_chunks(num_medium_chunks), |
|
64 _num_humongous_chunks(num_humongous_chunks), |
|
65 _specialized_chunks_size_in_bytes(specialized_chunks_size_in_bytes), |
|
66 _small_chunks_size_in_bytes(small_chunks_size_in_bytes), |
|
67 _medium_chunks_size_in_bytes(medium_chunks_size_in_bytes), |
|
68 _humongous_chunks_size_in_bytes(humongous_chunks_size_in_bytes) |
|
69 {} |
|
70 |
|
71 size_t num_specialized_chunks() const { |
|
72 return _num_specialized_chunks; |
|
73 } |
|
74 |
|
75 size_t num_small_chunks() const { |
|
76 return _num_small_chunks; |
|
77 } |
|
78 |
|
79 size_t num_medium_chunks() const { |
|
80 return _num_medium_chunks; |
|
81 } |
|
82 |
|
83 size_t num_humongous_chunks() const { |
|
84 return _num_humongous_chunks; |
|
85 } |
|
86 |
|
87 size_t specialized_chunks_size_in_bytes() const { |
|
88 return _specialized_chunks_size_in_bytes; |
|
89 } |
|
90 |
|
91 size_t small_chunks_size_in_bytes() const { |
|
92 return _small_chunks_size_in_bytes; |
|
93 } |
|
94 |
|
95 size_t medium_chunks_size_in_bytes() const { |
|
96 return _medium_chunks_size_in_bytes; |
|
97 } |
|
98 |
|
99 size_t humongous_chunks_size_in_bytes() const { |
|
100 return _humongous_chunks_size_in_bytes; |
|
101 } |
|
102 }; |
|
103 |
|
104 #endif // SHARE_VM_MEMORY_METASPACECHUNKFREELISTSUMMARY_HPP |