< prev index next >
src/hotspot/share/classfile/symbolTable.hpp
Print this page
@@ -108,44 +108,42 @@
// The symbol table
static SymbolTable* _the_table;
// Shared symbol table.
static CompactHashtable<Symbol*, char> _shared_table;
- static bool _lookup_shared_first;
- static bool _alt_hash;
+ static volatile bool _lookup_shared_first;
+ static volatile bool _alt_hash;
// For statistics
- static int _symbols_removed;
- static int _symbols_counted;
+ volatile size_t _symbols_removed;
+ volatile size_t _symbols_counted;
- // Set if one bucket is out of balance due to hash algorithm deficiency
SymbolTableHash* _local_table;
size_t _current_size;
volatile bool _has_work;
+ // Set if one bucket is out of balance due to hash algorithm deficiency
volatile bool _needs_rehashing;
- volatile int _items;
- DEFINE_PAD_MINUS_SIZE(1, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile int));
- volatile int _uncleaned_items;
- DEFINE_PAD_MINUS_SIZE(2, DEFAULT_CACHE_LINE_SIZE, sizeof(volatile int));
+ volatile size_t _items_count;
+ volatile size_t _uncleaned_items_count;
double get_load_factor();
double get_dead_factor();
void check_concurrent_work();
void trigger_concurrent_work();
- static uintx item_added();
+ static void item_added();
static void item_removed();
static void set_item_clean_count(size_t ncl);
static void mark_item_clean_count();
SymbolTable();
- Symbol* allocate_symbol(const u1* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F
- Symbol* do_lookup(char* name, int len, uintx hash);
- Symbol* do_add_if_needed(char* name, int len, uintx hash, bool heap, TRAPS);
+ Symbol* allocate_symbol(const char* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F
+ Symbol* do_lookup(const char* name, int len, uintx hash);
+ Symbol* do_add_if_needed(const char* name, int len, uintx hash, bool heap, TRAPS);
// Adding elements
static void add(ClassLoaderData* loader_data,
const constantPoolHandle& cp, int names_count,
const char** names, int* lengths, int* cp_indices,
< prev index next >