author | kbarrett |
Mon, 28 Dec 2015 13:48:43 -0500 | |
changeset 35225 | 2b16576599d7 |
parent 30764 | fec48bf5a827 |
permissions | -rw-r--r-- |
28033
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
1 |
/* |
30764 | 2 |
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. |
28033
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
4 |
* |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
8 |
* |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
13 |
* accompanied this code). |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
14 |
* |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
18 |
* |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
21 |
* questions. |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
22 |
* |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
23 |
*/ |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
24 |
|
30764 | 25 |
#ifndef SHARE_VM_GC_SHARED_CARDGENERATION_INLINE_HPP |
26 |
#define SHARE_VM_GC_SHARED_CARDGENERATION_INLINE_HPP |
|
28033
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
27 |
|
30764 | 28 |
#include "gc/shared/cardGeneration.hpp" |
29 |
#include "gc/shared/space.hpp" |
|
28033
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
30 |
|
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
31 |
inline size_t CardGeneration::capacity() const { |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
32 |
return space()->capacity(); |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
33 |
} |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
34 |
|
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
35 |
inline size_t CardGeneration::used() const { |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
36 |
return space()->used(); |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
37 |
} |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
38 |
|
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
39 |
inline size_t CardGeneration::free() const { |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
40 |
return space()->free(); |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
41 |
} |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
42 |
|
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
43 |
inline MemRegion CardGeneration::used_region() const { |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
44 |
return space()->used_region(); |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
45 |
} |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
46 |
|
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
47 |
inline bool CardGeneration::is_in(const void* p) const { |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
48 |
return space()->is_in(p); |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
49 |
} |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
50 |
|
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
51 |
inline CompactibleSpace* CardGeneration::first_compaction_space() const { |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
52 |
return space(); |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
53 |
} |
ab63acbd99ec
8066782: Move common code from CMSGeneration and TenuredGeneration to CardGeneration
brutisso
parents:
diff
changeset
|
54 |
|
30764 | 55 |
#endif // SHARE_VM_GC_SHARED_CARDGENERATION_INLINE_HPP |