comparison src/share/vm/classfile/symbolTable.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 1d7922586cf6
children e4f764ddb06a
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
92 Symbol* allocate_symbol(const u1* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F 92 Symbol* allocate_symbol(const u1* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F
93 93
94 // Adding elements 94 // Adding elements
95 Symbol* basic_add(int index, u1* name, int len, unsigned int hashValue, 95 Symbol* basic_add(int index, u1* name, int len, unsigned int hashValue,
96 bool c_heap, TRAPS); 96 bool c_heap, TRAPS);
97 97 bool basic_add(ClassLoaderData* loader_data,
98 bool basic_add(Handle class_loader, constantPoolHandle cp, int names_count, 98 constantPoolHandle cp, int names_count,
99 const char** names, int* lengths, int* cp_indices, 99 const char** names, int* lengths, int* cp_indices,
100 unsigned int* hashValues, TRAPS); 100 unsigned int* hashValues, TRAPS);
101 101
102 static void new_symbols(Handle class_loader, constantPoolHandle cp, 102 static void new_symbols(ClassLoaderData* loader_data,
103 int names_count, 103 constantPoolHandle cp, int names_count,
104 const char** name, int* lengths, 104 const char** name, int* lengths,
105 int* cp_indices, unsigned int* hashValues, 105 int* cp_indices, unsigned int* hashValues,
106 TRAPS) { 106 TRAPS) {
107 add(class_loader, cp, names_count, name, lengths, cp_indices, hashValues, THREAD); 107 add(loader_data, cp, names_count, name, lengths, cp_indices, hashValues, THREAD);
108 } 108 }
109 109
110 // Table size 110 // Table size
111 enum { 111 enum {
112 symbol_table_size = 20011 112 symbol_table_size = 20011
168 168
169 // jchar (utf16) version of lookups 169 // jchar (utf16) version of lookups
170 static Symbol* lookup_unicode(const jchar* name, int len, TRAPS); 170 static Symbol* lookup_unicode(const jchar* name, int len, TRAPS);
171 static Symbol* lookup_only_unicode(const jchar* name, int len, unsigned int& hash); 171 static Symbol* lookup_only_unicode(const jchar* name, int len, unsigned int& hash);
172 172
173 static void add(Handle class_loader, constantPoolHandle cp, int names_count, 173 static void add(ClassLoaderData* loader_data,
174 constantPoolHandle cp, int names_count,
174 const char** names, int* lengths, int* cp_indices, 175 const char** names, int* lengths, int* cp_indices,
175 unsigned int* hashValues, TRAPS); 176 unsigned int* hashValues, TRAPS);
176 177
177 // Release any dead symbols 178 // Release any dead symbols
178 static void unlink(); 179 static void unlink();