66
67 static oop intern(Handle string_or_null_h, const jchar* name, int len, TRAPS);
68 static oop do_intern(Handle string_or_null, const jchar* name, int len, uintx hash, TRAPS);
69 static oop do_lookup(const jchar* name, int len, uintx hash);
70
71 static void print_table_statistics(outputStream* st, const char* table_name);
72
73 static bool do_rehash();
74
75 public:
76 static size_t table_size();
77 static TableStatistics get_table_statistics();
78
79 static void create_table();
80
81 static void do_concurrent_work(JavaThread* jt);
82 static bool has_work() { return _has_work; }
83
84 // GC support
85
86 // Must be called before a parallel walk where strings might die.
87 static void reset_dead_counter() { _uncleaned_items_count = 0; }
88
89 // After the parallel walk this method must be called to trigger
90 // cleaning. Note it might trigger a resize instead.
91 static void finish_dead_counter() { check_concurrent_work(); }
92
93 // If GC uses ParState directly it should add the number of cleared
94 // strings to this method.
95 static void inc_dead_counter(size_t ndead) { add_items_to_clean(ndead); }
96
97 // Probing
98 static oop lookup(Symbol* symbol);
99 static oop lookup(const jchar* chars, int length);
100
101 // Interning
102 static oop intern(Symbol* symbol, TRAPS);
103 static oop intern(oop string, TRAPS);
104 static oop intern(const char *utf8_string, TRAPS);
105
106 // Rehash the string table if it gets out of balance
107 static void rehash_table();
108 static bool needs_rehashing() { return _needs_rehashing; }
109 static inline void update_needs_rehash(bool rehash) {
110 if (rehash) {
111 _needs_rehashing = true;
112 }
113 }
114
115 // Sharing
|
66
67 static oop intern(Handle string_or_null_h, const jchar* name, int len, TRAPS);
68 static oop do_intern(Handle string_or_null, const jchar* name, int len, uintx hash, TRAPS);
69 static oop do_lookup(const jchar* name, int len, uintx hash);
70
71 static void print_table_statistics(outputStream* st, const char* table_name);
72
73 static bool do_rehash();
74
75 public:
76 static size_t table_size();
77 static TableStatistics get_table_statistics();
78
79 static void create_table();
80
81 static void do_concurrent_work(JavaThread* jt);
82 static bool has_work() { return _has_work; }
83
84 // GC support
85
86 // After the parallel walk this method must be called to trigger
87 // cleaning. Note it might trigger a resize instead.
88 static void gc_notification(size_t dead_count);
89
90 // Probing
91 static oop lookup(Symbol* symbol);
92 static oop lookup(const jchar* chars, int length);
93
94 // Interning
95 static oop intern(Symbol* symbol, TRAPS);
96 static oop intern(oop string, TRAPS);
97 static oop intern(const char *utf8_string, TRAPS);
98
99 // Rehash the string table if it gets out of balance
100 static void rehash_table();
101 static bool needs_rehashing() { return _needs_rehashing; }
102 static inline void update_needs_rehash(bool rehash) {
103 if (rehash) {
104 _needs_rehashing = true;
105 }
106 }
107
108 // Sharing
|