Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/specialized_oop_closures.hpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | f95d63e2154a |
children | aed758eda82a |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2012, 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. |
52 class Par_PushAndMarkClosure; | 52 class Par_PushAndMarkClosure; |
53 class PushOrMarkClosure; | 53 class PushOrMarkClosure; |
54 class Par_PushOrMarkClosure; | 54 class Par_PushOrMarkClosure; |
55 class CMSKeepAliveClosure; | 55 class CMSKeepAliveClosure; |
56 class CMSInnerParMarkAndPushClosure; | 56 class CMSInnerParMarkAndPushClosure; |
57 // Misc | |
58 class NoHeaderExtendedOopClosure; | |
57 | 59 |
58 // This macro applies an argument macro to all OopClosures for which we | 60 // This macro applies an argument macro to all OopClosures for which we |
59 // want specialized bodies of "oop_oop_iterate". The arguments to "f" are: | 61 // want specialized bodies of "oop_oop_iterate". The arguments to "f" are: |
60 // "f(closureType, non_virtual)" | 62 // "f(closureType, non_virtual)" |
61 // where "closureType" is the name of the particular subclass of OopClosure, | 63 // where "closureType" is the name of the particular subclass of OopClosure, |
85 #else // SERIALGC | 87 #else // SERIALGC |
86 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f) | 88 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f) |
87 #endif // SERIALGC | 89 #endif // SERIALGC |
88 | 90 |
89 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f) \ | 91 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f) \ |
92 f(NoHeaderExtendedOopClosure,_nv) \ | |
90 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_S(f) \ | 93 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_S(f) \ |
91 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f) | 94 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_P(f) |
92 | 95 |
93 #ifndef SERIALGC | 96 #ifndef SERIALGC |
94 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) \ | 97 #define SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) \ |
109 // We separate these out, because sometime the general one has | 112 // We separate these out, because sometime the general one has |
110 // a different definition from the specialized ones, and sometimes it | 113 // a different definition from the specialized ones, and sometimes it |
111 // doesn't. | 114 // doesn't. |
112 | 115 |
113 #define ALL_OOP_OOP_ITERATE_CLOSURES_1(f) \ | 116 #define ALL_OOP_OOP_ITERATE_CLOSURES_1(f) \ |
114 f(OopClosure,_v) \ | 117 f(ExtendedOopClosure,_v) \ |
115 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f) | 118 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_1(f) |
116 | 119 |
117 #define ALL_OOP_OOP_ITERATE_CLOSURES_2(f) \ | 120 #define ALL_OOP_OOP_ITERATE_CLOSURES_2(f) \ |
118 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) | 121 SPECIALIZED_OOP_OOP_ITERATE_CLOSURES_2(f) |
119 | 122 |
129 f(PushAndMarkClosure,_nv) \ | 132 f(PushAndMarkClosure,_nv) \ |
130 f(Par_MarkRefsIntoAndScanClosure,_nv) \ | 133 f(Par_MarkRefsIntoAndScanClosure,_nv) \ |
131 f(Par_PushAndMarkClosure,_nv) | 134 f(Par_PushAndMarkClosure,_nv) |
132 | 135 |
133 #define ALL_PAR_OOP_ITERATE_CLOSURES(f) \ | 136 #define ALL_PAR_OOP_ITERATE_CLOSURES(f) \ |
134 f(OopClosure,_v) \ | 137 f(ExtendedOopClosure,_v) \ |
135 SPECIALIZED_PAR_OOP_ITERATE_CLOSURES(f) | 138 SPECIALIZED_PAR_OOP_ITERATE_CLOSURES(f) |
136 #endif // SERIALGC | 139 #endif // SERIALGC |
137 | 140 |
138 // This macro applies an argument macro to all OopClosures for which we | 141 // This macro applies an argument macro to all OopClosures for which we |
139 // want specialized bodies of a family of methods related to | 142 // want specialized bodies of a family of methods related to |
193 | 196 |
194 | 197 |
195 class SpecializationStats { | 198 class SpecializationStats { |
196 public: | 199 public: |
197 enum Kind { | 200 enum Kind { |
198 ik, // instanceKlass | 201 ik, // InstanceKlass |
199 irk, // instanceRefKlass | 202 irk, // instanceRefKlass |
200 oa, // objArrayKlass | 203 oa, // objArrayKlass |
201 NUM_Kinds | 204 NUM_Kinds |
202 }; | 205 }; |
203 | 206 |