154 Symbol* lookup_dynamic(const char* name, int len, unsigned int hash);
155 Symbol* lookup_common(const char* name, int len, unsigned int hash);
156
157 // Arena for permanent symbols (null class loader) that are never unloaded
158 static Arena* _arena;
159 static Arena* arena() { return _arena; } // called for statistics
160
161 static void initialize_symbols(int arena_alloc_size = 0);
162
163 void concurrent_work(JavaThread* jt);
164 void print_table_statistics(outputStream* st, const char* table_name);
165
166 void try_rehash_table();
167 bool do_rehash();
168 inline void update_needs_rehash(bool rehash);
169
170 public:
171 // The symbol table
172 static SymbolTable* the_table() { return _the_table; }
173 size_t table_size();
174
175 enum {
176 symbol_alloc_batch_size = 8,
177 // Pick initial size based on java -version size measurements
178 symbol_alloc_arena_size = 360*K // TODO (revisit)
179 };
180
181 static void create_table() {
182 assert(_the_table == NULL, "One symbol table allowed.");
183 _the_table = new SymbolTable();
184 initialize_symbols(symbol_alloc_arena_size);
185 }
186
187 static void do_concurrent_work(JavaThread* jt);
188 static bool has_work() { return the_table()->_has_work; }
189 static void trigger_cleanup();
190
191 // Probing
192 static Symbol* lookup(const char* name, int len, TRAPS);
193 // lookup only, won't add. Also calculate hash.
|
154 Symbol* lookup_dynamic(const char* name, int len, unsigned int hash);
155 Symbol* lookup_common(const char* name, int len, unsigned int hash);
156
157 // Arena for permanent symbols (null class loader) that are never unloaded
158 static Arena* _arena;
159 static Arena* arena() { return _arena; } // called for statistics
160
161 static void initialize_symbols(int arena_alloc_size = 0);
162
163 void concurrent_work(JavaThread* jt);
164 void print_table_statistics(outputStream* st, const char* table_name);
165
166 void try_rehash_table();
167 bool do_rehash();
168 inline void update_needs_rehash(bool rehash);
169
170 public:
171 // The symbol table
172 static SymbolTable* the_table() { return _the_table; }
173 size_t table_size();
174 TableStatistics get_table_statistics();
175
176 enum {
177 symbol_alloc_batch_size = 8,
178 // Pick initial size based on java -version size measurements
179 symbol_alloc_arena_size = 360*K // TODO (revisit)
180 };
181
182 static void create_table() {
183 assert(_the_table == NULL, "One symbol table allowed.");
184 _the_table = new SymbolTable();
185 initialize_symbols(symbol_alloc_arena_size);
186 }
187
188 static void do_concurrent_work(JavaThread* jt);
189 static bool has_work() { return the_table()->_has_work; }
190 static void trigger_cleanup();
191
192 // Probing
193 static Symbol* lookup(const char* name, int len, TRAPS);
194 // lookup only, won't add. Also calculate hash.
|