121 volatile bool _has_work; |
121 volatile bool _has_work; |
122 // Set if one bucket is out of balance due to hash algorithm deficiency |
122 // Set if one bucket is out of balance due to hash algorithm deficiency |
123 volatile bool _needs_rehashing; |
123 volatile bool _needs_rehashing; |
124 |
124 |
125 volatile size_t _items_count; |
125 volatile size_t _items_count; |
126 volatile size_t _uncleaned_items_count; |
126 volatile bool _has_items_to_clean; |
127 |
127 |
128 double get_load_factor() const; |
128 double get_load_factor() const; |
129 double get_dead_factor() const; |
|
130 |
129 |
131 void check_concurrent_work(); |
130 void check_concurrent_work(); |
132 void trigger_concurrent_work(); |
|
133 |
131 |
134 static void item_added(); |
132 static void item_added(); |
135 static void item_removed(); |
133 static void item_removed(); |
136 static void set_item_clean_count(size_t ncl); |
134 |
137 static void mark_item_clean_count(); |
135 // For cleaning |
|
136 void reset_has_items_to_clean(); |
|
137 void mark_has_items_to_clean(); |
|
138 bool has_items_to_clean() const; |
138 |
139 |
139 SymbolTable(); |
140 SymbolTable(); |
140 |
141 |
141 Symbol* allocate_symbol(const char* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F |
142 Symbol* allocate_symbol(const char* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F |
142 Symbol* do_lookup(const char* name, int len, uintx hash); |
143 Symbol* do_lookup(const char* name, int len, uintx hash); |
188 assert(_the_table == NULL, "One symbol table allowed."); |
189 assert(_the_table == NULL, "One symbol table allowed."); |
189 _the_table = new SymbolTable(); |
190 _the_table = new SymbolTable(); |
190 initialize_symbols(symbol_alloc_arena_size); |
191 initialize_symbols(symbol_alloc_arena_size); |
191 } |
192 } |
192 |
193 |
193 static void unlink() { |
|
194 do_check_concurrent_work(); |
|
195 } |
|
196 static void do_check_concurrent_work(); |
|
197 static void do_concurrent_work(JavaThread* jt); |
194 static void do_concurrent_work(JavaThread* jt); |
198 static bool has_work() { return the_table()->_has_work; } |
195 static bool has_work() { return the_table()->_has_work; } |
|
196 static void trigger_cleanup(); |
199 |
197 |
200 // Probing |
198 // Probing |
201 static Symbol* lookup(const char* name, int len, TRAPS); |
199 static Symbol* lookup(const char* name, int len, TRAPS); |
202 // lookup only, won't add. Also calculate hash. |
200 // lookup only, won't add. Also calculate hash. |
203 static Symbol* lookup_only(const char* name, int len, unsigned int& hash); |
201 static Symbol* lookup_only(const char* name, int len, unsigned int& hash); |