Mercurial > hg > graal-compiler
annotate src/share/vm/classfile/dictionary.hpp @ 6885:685df3c6f84b
7045397: NPG: Add freelists to class loader arenas.
Reviewed-by: coleenp, stefank, jprovino, ohair
author | jmasa |
---|---|
date | Tue, 18 Sep 2012 23:35:42 -0700 |
parents | da91efe96a93 |
children | 43083e670adf |
rev | line source |
---|---|
0 | 1 /* |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1507
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1507
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1507
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_CLASSFILE_DICTIONARY_HPP |
26 #define SHARE_VM_CLASSFILE_DICTIONARY_HPP | |
27 | |
28 #include "classfile/systemDictionary.hpp" | |
29 #include "oops/instanceKlass.hpp" | |
30 #include "oops/oop.hpp" | |
31 #include "utilities/hashtable.hpp" | |
32 | |
0 | 33 class DictionaryEntry; |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
34 class PSPromotionManager; |
0 | 35 |
36 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
37 // The data structure for the system dictionary (and the shared system | |
38 // dictionary). | |
39 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
40 class Dictionary : public TwoOopHashtable<Klass*, mtClass> { |
0 | 41 friend class VMStructs; |
42 private: | |
43 // current iteration index. | |
44 static int _current_class_index; | |
45 // pointer to the current hash table entry. | |
46 static DictionaryEntry* _current_class_entry; | |
47 | |
48 DictionaryEntry* get_entry(int index, unsigned int hash, | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
49 Symbol* name, ClassLoaderData* loader_data); |
0 | 50 |
51 DictionaryEntry* bucket(int i) { | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
52 return (DictionaryEntry*)Hashtable<Klass*, mtClass>::bucket(i); |
0 | 53 } |
54 | |
55 // The following method is not MT-safe and must be done under lock. | |
56 DictionaryEntry** bucket_addr(int i) { | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
57 return (DictionaryEntry**)Hashtable<Klass*, mtClass>::bucket_addr(i); |
0 | 58 } |
59 | |
60 void add_entry(int index, DictionaryEntry* new_entry) { | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
61 Hashtable<Klass*, mtClass>::add_entry(index, (HashtableEntry<Klass*, mtClass>*)new_entry); |
0 | 62 } |
63 | |
64 public: | |
65 Dictionary(int table_size); | |
6197 | 66 Dictionary(int table_size, HashtableBucket<mtClass>* t, int number_of_entries); |
0 | 67 |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
68 DictionaryEntry* new_entry(unsigned int hash, Klass* klass, ClassLoaderData* loader_data); |
0 | 69 |
70 DictionaryEntry* new_entry(); | |
71 | |
72 void free_entry(DictionaryEntry* entry); | |
73 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
74 void add_klass(Symbol* class_name, ClassLoaderData* loader_data,KlassHandle obj); |
0 | 75 |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
76 Klass* find_class(int index, unsigned int hash, |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
77 Symbol* name, ClassLoaderData* loader_data); |
0 | 78 |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
79 Klass* find_shared_class(int index, unsigned int hash, Symbol* name); |
0 | 80 |
81 // Compiler support | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
82 Klass* try_get_next_class(); |
0 | 83 |
84 // GC support | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
85 void oops_do(OopClosure* f); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
86 void always_strong_oops_do(OopClosure* blk); |
0 | 87 |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
88 void always_strong_classes_do(KlassClosure* closure); |
0 | 89 |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
90 void classes_do(void f(Klass*)); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
91 void classes_do(void f(Klass*, TRAPS), TRAPS); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
92 void classes_do(void f(Klass*, ClassLoaderData*)); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
93 void classes_do(void f(Klass*, ClassLoaderData*, TRAPS), TRAPS); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
94 |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
95 void methods_do(void f(Method*)); |
0 | 96 |
97 | |
98 // Classes loaded by the bootstrap loader are always strongly reachable. | |
99 // If we're not doing class unloading, all classes are strongly reachable. | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
100 static bool is_strongly_reachable(ClassLoaderData* loader_data, Klass* klass) { |
0 | 101 assert (klass != NULL, "should have non-null klass"); |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
102 return (loader_data->is_the_null_class_loader_data() || !ClassUnloading); |
0 | 103 } |
104 | |
105 // Unload (that is, break root links to) all unmarked classes and | |
106 // loaders. Returns "true" iff something was unloaded. | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
107 bool do_unloading(); |
0 | 108 |
109 // Protection domains | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
110 Klass* find(int index, unsigned int hash, Symbol* name, |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
111 ClassLoaderData* loader_data, Handle protection_domain, TRAPS); |
0 | 112 bool is_valid_protection_domain(int index, unsigned int hash, |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
113 Symbol* name, ClassLoaderData* loader_data, |
0 | 114 Handle protection_domain); |
115 void add_protection_domain(int index, unsigned int hash, | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
116 instanceKlassHandle klass, ClassLoaderData* loader_data, |
0 | 117 Handle protection_domain, TRAPS); |
118 | |
119 // Sharing support | |
120 void reorder_dictionary(); | |
121 | |
122 | |
123 #ifndef PRODUCT | |
124 void print(); | |
125 #endif | |
126 void verify(); | |
127 }; | |
128 | |
129 // The following classes can be in dictionary.cpp, but we need these | |
130 // to be in header file so that SA's vmStructs can access. | |
131 | |
6197 | 132 class ProtectionDomainEntry :public CHeapObj<mtClass> { |
0 | 133 friend class VMStructs; |
134 public: | |
135 ProtectionDomainEntry* _next; | |
136 oop _protection_domain; | |
137 | |
138 ProtectionDomainEntry(oop protection_domain, ProtectionDomainEntry* next) { | |
139 _protection_domain = protection_domain; | |
140 _next = next; | |
141 } | |
142 | |
143 ProtectionDomainEntry* next() { return _next; } | |
144 oop protection_domain() { return _protection_domain; } | |
145 }; | |
146 | |
147 // An entry in the system dictionary, this describes a class as | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
148 // { Klass*, loader, protection_domain }. |
0 | 149 |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
150 class DictionaryEntry : public HashtableEntry<Klass*, mtClass> { |
0 | 151 friend class VMStructs; |
152 private: | |
153 // Contains the set of approved protection domains that can access | |
154 // this system dictionary entry. | |
155 ProtectionDomainEntry* _pd_set; | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
156 ClassLoaderData* _loader_data; |
0 | 157 |
158 public: | |
159 // Tells whether a protection is in the approved set. | |
160 bool contains_protection_domain(oop protection_domain) const; | |
161 // Adds a protection domain to the approved set. | |
162 void add_protection_domain(oop protection_domain); | |
163 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
164 Klass* klass() const { return (Klass*)literal(); } |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
165 Klass** klass_addr() { return (Klass**)literal_addr(); } |
0 | 166 |
167 DictionaryEntry* next() const { | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
168 return (DictionaryEntry*)HashtableEntry<Klass*, mtClass>::next(); |
0 | 169 } |
170 | |
171 DictionaryEntry** next_addr() { | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
172 return (DictionaryEntry**)HashtableEntry<Klass*, mtClass>::next_addr(); |
0 | 173 } |
174 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
175 ClassLoaderData* loader_data() const { return _loader_data; } |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
176 void set_loader_data(ClassLoaderData* loader_data) { _loader_data = loader_data; } |
0 | 177 |
178 ProtectionDomainEntry* pd_set() const { return _pd_set; } | |
179 void set_pd_set(ProtectionDomainEntry* pd_set) { _pd_set = pd_set; } | |
180 | |
181 bool has_protection_domain() { return _pd_set != NULL; } | |
182 | |
183 // Tells whether the initiating class' protection can access the this _klass | |
184 bool is_valid_protection_domain(Handle protection_domain) { | |
185 if (!ProtectionDomainVerification) return true; | |
186 if (!SystemDictionary::has_checkPackageAccess()) return true; | |
187 | |
188 return protection_domain() == NULL | |
189 ? true | |
190 : contains_protection_domain(protection_domain()); | |
191 } | |
192 | |
193 | |
194 void protection_domain_set_oops_do(OopClosure* f) { | |
195 for (ProtectionDomainEntry* current = _pd_set; | |
196 current != NULL; | |
197 current = current->_next) { | |
198 f->do_oop(&(current->_protection_domain)); | |
199 } | |
200 } | |
201 | |
202 void verify_protection_domain_set() { | |
203 for (ProtectionDomainEntry* current = _pd_set; | |
204 current != NULL; | |
205 current = current->_next) { | |
206 current->_protection_domain->verify(); | |
207 } | |
208 } | |
209 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
210 bool equals(Symbol* class_name, ClassLoaderData* loader_data) const { |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
211 Klass* klass = (Klass*)literal(); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
212 return (InstanceKlass::cast(klass)->name() == class_name && |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
213 _loader_data == loader_data); |
0 | 214 } |
215 | |
216 void print() { | |
217 int count = 0; | |
218 for (ProtectionDomainEntry* current = _pd_set; | |
219 current != NULL; | |
220 current = current->_next) { | |
221 count++; | |
222 } | |
223 tty->print_cr("pd set = #%d", count); | |
224 } | |
225 }; | |
710 | 226 |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
227 // Entry in a SymbolPropertyTable, mapping a single Symbol* |
710 | 228 // to a managed and an unmanaged pointer. |
6197 | 229 class SymbolPropertyEntry : public HashtableEntry<Symbol*, mtSymbol> { |
710 | 230 friend class VMStructs; |
231 private: | |
1507
cd5dbf694d45
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
710
diff
changeset
|
232 intptr_t _symbol_mode; // secondary key |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
233 Method* _method; |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
234 oop _method_type; |
710 | 235 |
236 public: | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
237 Symbol* symbol() const { return literal(); } |
710 | 238 |
1507
cd5dbf694d45
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
710
diff
changeset
|
239 intptr_t symbol_mode() const { return _symbol_mode; } |
cd5dbf694d45
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
710
diff
changeset
|
240 void set_symbol_mode(intptr_t m) { _symbol_mode = m; } |
cd5dbf694d45
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
710
diff
changeset
|
241 |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
242 Method* method() const { return _method; } |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
243 void set_method(Method* p) { _method = p; } |
710 | 244 |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
245 oop method_type() const { return _method_type; } |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
246 oop* method_type_addr() { return &_method_type; } |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
247 void set_method_type(oop p) { _method_type = p; } |
710 | 248 |
249 SymbolPropertyEntry* next() const { | |
6197 | 250 return (SymbolPropertyEntry*)HashtableEntry<Symbol*, mtSymbol>::next(); |
710 | 251 } |
252 | |
253 SymbolPropertyEntry** next_addr() { | |
6197 | 254 return (SymbolPropertyEntry**)HashtableEntry<Symbol*, mtSymbol>::next_addr(); |
710 | 255 } |
256 | |
257 void print_on(outputStream* st) const { | |
258 symbol()->print_value_on(st); | |
1507
cd5dbf694d45
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
710
diff
changeset
|
259 st->print("/mode="INTX_FORMAT, symbol_mode()); |
710 | 260 st->print(" -> "); |
261 bool printed = false; | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
262 if (method() != NULL) { |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
263 method()->print_value_on(st); |
710 | 264 printed = true; |
265 } | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
266 if (method_type() != NULL) { |
710 | 267 if (printed) st->print(" and "); |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
268 st->print(INTPTR_FORMAT, method_type()); |
710 | 269 printed = true; |
270 } | |
271 st->print_cr(printed ? "" : "(empty)"); | |
272 } | |
273 }; | |
274 | |
275 // A system-internal mapping of symbols to pointers, both managed | |
276 // and unmanaged. Used to record the auto-generation of each method | |
277 // MethodHandle.invoke(S)T, for all signatures (S)T. | |
6197 | 278 class SymbolPropertyTable : public Hashtable<Symbol*, mtSymbol> { |
710 | 279 friend class VMStructs; |
280 private: | |
281 SymbolPropertyEntry* bucket(int i) { | |
6197 | 282 return (SymbolPropertyEntry*) Hashtable<Symbol*, mtSymbol>::bucket(i); |
710 | 283 } |
284 | |
285 // The following method is not MT-safe and must be done under lock. | |
286 SymbolPropertyEntry** bucket_addr(int i) { | |
6197 | 287 return (SymbolPropertyEntry**) Hashtable<Symbol*, mtSymbol>::bucket_addr(i); |
710 | 288 } |
289 | |
290 void add_entry(int index, SymbolPropertyEntry* new_entry) { | |
291 ShouldNotReachHere(); | |
292 } | |
293 void set_entry(int index, SymbolPropertyEntry* new_entry) { | |
294 ShouldNotReachHere(); | |
295 } | |
296 | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
297 SymbolPropertyEntry* new_entry(unsigned int hash, Symbol* symbol, intptr_t symbol_mode) { |
6197 | 298 SymbolPropertyEntry* entry = (SymbolPropertyEntry*) Hashtable<Symbol*, mtSymbol>::new_entry(hash, symbol); |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
299 // Hashtable with Symbol* literal must increment and decrement refcount. |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
300 symbol->increment_refcount(); |
1507
cd5dbf694d45
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
710
diff
changeset
|
301 entry->set_symbol_mode(symbol_mode); |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
302 entry->set_method(NULL); |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
303 entry->set_method_type(NULL); |
710 | 304 return entry; |
305 } | |
306 | |
307 public: | |
308 SymbolPropertyTable(int table_size); | |
6197 | 309 SymbolPropertyTable(int table_size, HashtableBucket<mtSymbol>* t, int number_of_entries); |
710 | 310 |
311 void free_entry(SymbolPropertyEntry* entry) { | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
312 // decrement Symbol refcount here because hashtable doesn't. |
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
313 entry->literal()->decrement_refcount(); |
6197 | 314 Hashtable<Symbol*, mtSymbol>::free_entry(entry); |
710 | 315 } |
316 | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
317 unsigned int compute_hash(Symbol* sym, intptr_t symbol_mode) { |
710 | 318 // Use the regular identity_hash. |
6197 | 319 return Hashtable<Symbol*, mtSymbol>::compute_hash(sym) ^ symbol_mode; |
1507
cd5dbf694d45
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
710
diff
changeset
|
320 } |
cd5dbf694d45
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
710
diff
changeset
|
321 |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
322 int index_for(Symbol* name, intptr_t symbol_mode) { |
1507
cd5dbf694d45
6939134: JSR 292 adjustments to method handle invocation
jrose
parents:
710
diff
changeset
|
323 return hash_to_index(compute_hash(name, symbol_mode)); |
710 | 324 } |
325 | |
326 // need not be locked; no state change | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
327 SymbolPropertyEntry* find_entry(int index, unsigned int hash, Symbol* name, intptr_t name_mode); |
710 | 328 |
329 // must be done under SystemDictionary_lock | |
2177
3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents:
1972
diff
changeset
|
330 SymbolPropertyEntry* add_entry(int index, unsigned int hash, Symbol* name, intptr_t name_mode); |
710 | 331 |
332 // GC support | |
333 void oops_do(OopClosure* f); | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
334 |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
6197
diff
changeset
|
335 void methods_do(void f(Method*)); |
710 | 336 |
337 // Sharing support | |
338 void reorder_dictionary(); | |
339 | |
340 #ifndef PRODUCT | |
341 void print(); | |
342 #endif | |
343 void verify(); | |
344 }; | |
1972 | 345 #endif // SHARE_VM_CLASSFILE_DICTIONARY_HPP |