1/*
2 * Copyright (c) 2014, 2019, 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_MEMORY_METASPACECHUNKFREELISTSUMMARY_HPP
26#define SHARE_MEMORY_METASPACECHUNKFREELISTSUMMARY_HPP
27
28
29class MetaspaceChunkFreeListSummary {
30 size_t _num_specialized_chunks;
31 size_t _num_small_chunks;
32 size_t _num_medium_chunks;
33 size_t _num_humongous_chunks;
34
35 size_t _specialized_chunks_size_in_bytes;
36 size_t _small_chunks_size_in_bytes;
37 size_t _medium_chunks_size_in_bytes;
38 size_t _humongous_chunks_size_in_bytes;
39
40 public:
41 MetaspaceChunkFreeListSummary() :
42 _num_specialized_chunks(0),
43 _num_small_chunks(0),
44 _num_medium_chunks(0),
45 _num_humongous_chunks(0),
46 _specialized_chunks_size_in_bytes(0),
47 _small_chunks_size_in_bytes(0),
48 _medium_chunks_size_in_bytes(0),
49 _humongous_chunks_size_in_bytes(0)
50 {}
51
52 MetaspaceChunkFreeListSummary(size_t num_specialized_chunks,
53 size_t num_small_chunks,
54 size_t num_medium_chunks,
55 size_t num_humongous_chunks,
56 size_t specialized_chunks_size_in_bytes,
57 size_t small_chunks_size_in_bytes,
58 size_t medium_chunks_size_in_bytes,
59 size_t humongous_chunks_size_in_bytes) :
60 _num_specialized_chunks(num_specialized_chunks),
61 _num_small_chunks(num_small_chunks),
62 _num_medium_chunks(num_medium_chunks),
63 _num_humongous_chunks(num_humongous_chunks),
64 _specialized_chunks_size_in_bytes(specialized_chunks_size_in_bytes),
65 _small_chunks_size_in_bytes(small_chunks_size_in_bytes),
66 _medium_chunks_size_in_bytes(medium_chunks_size_in_bytes),
67 _humongous_chunks_size_in_bytes(humongous_chunks_size_in_bytes)
68 {}
69
70 size_t num_specialized_chunks() const {
71 return _num_specialized_chunks;
72 }
73
74 size_t num_small_chunks() const {
75 return _num_small_chunks;
76 }
77
78 size_t num_medium_chunks() const {
79 return _num_medium_chunks;
80 }
81
82 size_t num_humongous_chunks() const {
83 return _num_humongous_chunks;
84 }
85
86 size_t specialized_chunks_size_in_bytes() const {
87 return _specialized_chunks_size_in_bytes;
88 }
89
90 size_t small_chunks_size_in_bytes() const {
91 return _small_chunks_size_in_bytes;
92 }
93
94 size_t medium_chunks_size_in_bytes() const {
95 return _medium_chunks_size_in_bytes;
96 }
97
98 size_t humongous_chunks_size_in_bytes() const {
99 return _humongous_chunks_size_in_bytes;
100 }
101};
102
103#endif // SHARE_MEMORY_METASPACECHUNKFREELISTSUMMARY_HPP
104