2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2013-06-18 12:31:07 -07:00
|
|
|
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
2007-12-01 00:00:00 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
2010-05-27 19:08:38 -07:00
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
2007-12-01 00:00:00 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-11-23 13:22:55 -08:00
|
|
|
#ifndef SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP
|
|
|
|
#define SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP
|
|
|
|
|
|
|
|
#include "memory/allocation.inline.hpp"
|
2011-01-27 16:11:27 -08:00
|
|
|
#include "oops/symbol.hpp"
|
2010-11-23 13:22:55 -08:00
|
|
|
#include "utilities/hashtable.hpp"
|
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
// The symbol table holds all Symbol*s and corresponding interned strings.
|
|
|
|
// Symbol*s and literal strings should be canonicalized.
|
2007-12-01 00:00:00 +00:00
|
|
|
//
|
|
|
|
// The interned strings are created lazily.
|
|
|
|
//
|
|
|
|
// It is implemented as an open hash table with a fixed number of buckets.
|
|
|
|
//
|
|
|
|
// %note:
|
|
|
|
// - symbolTableEntrys are allocated in blocks to reduce the space overhead.
|
|
|
|
|
|
|
|
class BoolObjectClosure;
|
2012-06-13 19:52:59 -04:00
|
|
|
class outputStream;
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
// Class to hold a newly created or referenced Symbol* temporarily in scope.
|
|
|
|
// new_symbol() and lookup() will create a Symbol* if not already in the
|
|
|
|
// symbol table and add to the symbol's reference count.
|
|
|
|
// probe() and lookup_only() will increment the refcount if symbol is found.
|
|
|
|
class TempNewSymbol : public StackObj {
|
|
|
|
Symbol* _temp;
|
|
|
|
|
|
|
|
public:
|
|
|
|
TempNewSymbol() : _temp(NULL) {}
|
|
|
|
// Creating or looking up a symbol increments the symbol's reference count
|
|
|
|
TempNewSymbol(Symbol *s) : _temp(s) {}
|
|
|
|
|
|
|
|
// Operator= increments reference count.
|
|
|
|
void operator=(const TempNewSymbol &s) {
|
2012-07-24 10:51:00 -07:00
|
|
|
//clear(); //FIXME
|
2011-01-27 16:11:27 -08:00
|
|
|
_temp = s._temp;
|
|
|
|
if (_temp !=NULL) _temp->increment_refcount();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Decrement reference counter so it can go away if it's unique
|
2012-07-24 10:51:00 -07:00
|
|
|
void clear() { if (_temp != NULL) _temp->decrement_refcount(); _temp = NULL; }
|
|
|
|
|
|
|
|
~TempNewSymbol() { clear(); }
|
2011-01-27 16:11:27 -08:00
|
|
|
|
|
|
|
// Operators so they can be used like Symbols
|
|
|
|
Symbol* operator -> () const { return _temp; }
|
|
|
|
bool operator == (Symbol* o) const { return _temp == o; }
|
|
|
|
// Sneaky conversion function
|
|
|
|
operator Symbol*() { return _temp; }
|
|
|
|
};
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
class SymbolTable : public Hashtable<Symbol*, mtSymbol> {
|
2007-12-01 00:00:00 +00:00
|
|
|
friend class VMStructs;
|
2011-01-27 16:11:27 -08:00
|
|
|
friend class ClassFileParser;
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
// The symbol table
|
|
|
|
static SymbolTable* _the_table;
|
|
|
|
|
2012-06-13 19:52:59 -04:00
|
|
|
// Set if one bucket is out of balance due to hash algorithm deficiency
|
|
|
|
static bool _needs_rehashing;
|
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
// For statistics
|
|
|
|
static int symbols_removed;
|
|
|
|
static int symbols_counted;
|
|
|
|
|
2012-03-23 11:16:05 -04:00
|
|
|
Symbol* allocate_symbol(const u1* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F
|
2011-01-27 16:11:27 -08:00
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
// Adding elements
|
2012-03-23 11:16:05 -04:00
|
|
|
Symbol* basic_add(int index, u1* name, int len, unsigned int hashValue,
|
|
|
|
bool c_heap, TRAPS);
|
6964458: Reimplement class meta-data storage to use native memory
Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
2012-09-01 13:25:18 -04:00
|
|
|
bool basic_add(ClassLoaderData* loader_data,
|
|
|
|
constantPoolHandle cp, int names_count,
|
2007-12-01 00:00:00 +00:00
|
|
|
const char** names, int* lengths, int* cp_indices,
|
|
|
|
unsigned int* hashValues, TRAPS);
|
|
|
|
|
6964458: Reimplement class meta-data storage to use native memory
Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
2012-09-01 13:25:18 -04:00
|
|
|
static void new_symbols(ClassLoaderData* loader_data,
|
|
|
|
constantPoolHandle cp, int names_count,
|
2011-01-27 16:11:27 -08:00
|
|
|
const char** name, int* lengths,
|
|
|
|
int* cp_indices, unsigned int* hashValues,
|
|
|
|
TRAPS) {
|
6964458: Reimplement class meta-data storage to use native memory
Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
2012-09-01 13:25:18 -04:00
|
|
|
add(loader_data, cp, names_count, name, lengths, cp_indices, hashValues, THREAD);
|
2011-01-27 16:11:27 -08:00
|
|
|
}
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
// Table size
|
|
|
|
enum {
|
|
|
|
symbol_table_size = 20011
|
|
|
|
};
|
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
Symbol* lookup(int index, const char* name, int len, unsigned int hash);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
SymbolTable()
|
2012-06-28 17:03:16 -04:00
|
|
|
: Hashtable<Symbol*, mtSymbol>(symbol_table_size, sizeof (HashtableEntry<Symbol*, mtSymbol>)) {}
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
SymbolTable(HashtableBucket<mtSymbol>* t, int number_of_entries)
|
|
|
|
: Hashtable<Symbol*, mtSymbol>(symbol_table_size, sizeof (HashtableEntry<Symbol*, mtSymbol>), t,
|
2007-12-01 00:00:00 +00:00
|
|
|
number_of_entries) {}
|
|
|
|
|
2012-03-23 11:16:05 -04:00
|
|
|
// Arena for permanent symbols (null class loader) that are never unloaded
|
|
|
|
static Arena* _arena;
|
|
|
|
static Arena* arena() { return _arena; } // called for statistics
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2012-03-23 11:16:05 -04:00
|
|
|
static void initialize_symbols(int arena_alloc_size = 0);
|
2007-12-01 00:00:00 +00:00
|
|
|
public:
|
|
|
|
enum {
|
2012-03-23 11:16:05 -04:00
|
|
|
symbol_alloc_batch_size = 8,
|
|
|
|
// Pick initial size based on java -version size measurements
|
|
|
|
symbol_alloc_arena_size = 360*K
|
2007-12-01 00:00:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// The symbol table
|
|
|
|
static SymbolTable* the_table() { return _the_table; }
|
|
|
|
|
|
|
|
static void create_table() {
|
|
|
|
assert(_the_table == NULL, "One symbol table allowed.");
|
|
|
|
_the_table = new SymbolTable();
|
2012-03-23 11:16:05 -04:00
|
|
|
initialize_symbols(symbol_alloc_arena_size);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
static void create_table(HashtableBucket<mtSymbol>* t, int length,
|
2007-12-01 00:00:00 +00:00
|
|
|
int number_of_entries) {
|
|
|
|
assert(_the_table == NULL, "One symbol table allowed.");
|
2012-06-28 17:03:16 -04:00
|
|
|
assert(length == symbol_table_size * sizeof(HashtableBucket<mtSymbol>),
|
2007-12-01 00:00:00 +00:00
|
|
|
"bad shared symbol size.");
|
|
|
|
_the_table = new SymbolTable(t, number_of_entries);
|
2012-03-23 11:16:05 -04:00
|
|
|
// if CDS give symbol table a default arena size since most symbols
|
|
|
|
// are already allocated in the shared misc section.
|
|
|
|
initialize_symbols();
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2012-06-25 21:33:35 -04:00
|
|
|
static unsigned int hash_symbol(const char* s, int len);
|
2012-06-13 19:52:59 -04:00
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
static Symbol* lookup(const char* name, int len, TRAPS);
|
2007-12-01 00:00:00 +00:00
|
|
|
// lookup only, won't add. Also calculate hash.
|
2011-01-27 16:11:27 -08:00
|
|
|
static Symbol* lookup_only(const char* name, int len, unsigned int& hash);
|
2007-12-01 00:00:00 +00:00
|
|
|
// Only copy to C string to be added if lookup failed.
|
2011-01-27 16:11:27 -08:00
|
|
|
static Symbol* lookup(const Symbol* sym, int begin, int end, TRAPS);
|
|
|
|
|
|
|
|
static void release(Symbol* sym);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2012-01-11 17:34:02 -05:00
|
|
|
// Look up the address of the literal in the SymbolTable for this Symbol*
|
|
|
|
static Symbol** lookup_symbol_addr(Symbol* sym);
|
|
|
|
|
2009-03-20 23:19:36 -07:00
|
|
|
// jchar (utf16) version of lookups
|
2011-01-27 16:11:27 -08:00
|
|
|
static Symbol* lookup_unicode(const jchar* name, int len, TRAPS);
|
|
|
|
static Symbol* lookup_only_unicode(const jchar* name, int len, unsigned int& hash);
|
2009-03-20 23:19:36 -07:00
|
|
|
|
6964458: Reimplement class meta-data storage to use native memory
Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
2012-09-01 13:25:18 -04:00
|
|
|
static void add(ClassLoaderData* loader_data,
|
|
|
|
constantPoolHandle cp, int names_count,
|
2007-12-01 00:00:00 +00:00
|
|
|
const char** names, int* lengths, int* cp_indices,
|
|
|
|
unsigned int* hashValues, TRAPS);
|
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
// Release any dead symbols
|
|
|
|
static void unlink();
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2011-01-27 16:11:27 -08:00
|
|
|
// iterate over symbols
|
|
|
|
static void symbols_do(SymbolClosure *cl);
|
|
|
|
|
|
|
|
// Symbol creation
|
|
|
|
static Symbol* new_symbol(const char* utf8_buffer, int length, TRAPS) {
|
|
|
|
assert(utf8_buffer != NULL, "just checking");
|
|
|
|
return lookup(utf8_buffer, length, THREAD);
|
|
|
|
}
|
|
|
|
static Symbol* new_symbol(const char* name, TRAPS) {
|
|
|
|
return new_symbol(name, (int)strlen(name), THREAD);
|
|
|
|
}
|
|
|
|
static Symbol* new_symbol(const Symbol* sym, int begin, int end, TRAPS) {
|
|
|
|
assert(begin <= end && end <= sym->utf8_length(), "just checking");
|
|
|
|
return lookup(sym, begin, end, THREAD);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
|
2012-03-23 11:16:05 -04:00
|
|
|
// Create a symbol in the arena for symbols that are not deleted
|
|
|
|
static Symbol* new_permanent_symbol(const char* name, TRAPS);
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
// Symbol lookup
|
2011-01-27 16:11:27 -08:00
|
|
|
static Symbol* lookup(int index, const char* name, int len, TRAPS);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// Needed for preloading classes in signatures when compiling.
|
|
|
|
// Returns the symbol is already present in symbol table, otherwise
|
|
|
|
// NULL. NO ALLOCATION IS GUARANTEED!
|
2011-01-27 16:11:27 -08:00
|
|
|
static Symbol* probe(const char* name, int len) {
|
2009-03-20 23:19:36 -07:00
|
|
|
unsigned int ignore_hash;
|
|
|
|
return lookup_only(name, len, ignore_hash);
|
|
|
|
}
|
2011-01-27 16:11:27 -08:00
|
|
|
static Symbol* probe_unicode(const jchar* name, int len) {
|
2009-03-20 23:19:36 -07:00
|
|
|
unsigned int ignore_hash;
|
|
|
|
return lookup_only_unicode(name, len, ignore_hash);
|
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// Histogram
|
|
|
|
static void print_histogram() PRODUCT_RETURN;
|
2011-01-27 16:11:27 -08:00
|
|
|
static void print() PRODUCT_RETURN;
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// Debugging
|
|
|
|
static void verify();
|
2012-06-13 19:52:59 -04:00
|
|
|
static void dump(outputStream* st);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// Sharing
|
|
|
|
static void copy_buckets(char** top, char*end) {
|
2012-06-28 17:03:16 -04:00
|
|
|
the_table()->Hashtable<Symbol*, mtSymbol>::copy_buckets(top, end);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
static void copy_table(char** top, char*end) {
|
2012-06-28 17:03:16 -04:00
|
|
|
the_table()->Hashtable<Symbol*, mtSymbol>::copy_table(top, end);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
static void reverse(void* boundary = NULL) {
|
2012-06-28 17:03:16 -04:00
|
|
|
the_table()->Hashtable<Symbol*, mtSymbol>::reverse(boundary);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
2012-06-13 19:52:59 -04:00
|
|
|
|
|
|
|
// Rehash the symbol table if it gets out of balance
|
|
|
|
static void rehash_table();
|
|
|
|
static bool needs_rehashing() { return _needs_rehashing; }
|
2007-12-01 00:00:00 +00:00
|
|
|
};
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
class StringTable : public Hashtable<oop, mtSymbol> {
|
2007-12-01 00:00:00 +00:00
|
|
|
friend class VMStructs;
|
|
|
|
|
|
|
|
private:
|
|
|
|
// The string table
|
|
|
|
static StringTable* _the_table;
|
|
|
|
|
2012-06-13 19:52:59 -04:00
|
|
|
// Set if one bucket is out of balance due to hash algorithm deficiency
|
|
|
|
static bool _needs_rehashing;
|
|
|
|
|
2013-06-18 12:31:07 -07:00
|
|
|
// Claimed high water mark for parallel chunked scanning
|
|
|
|
static volatile int _parallel_claimed_idx;
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
static oop intern(Handle string_or_null, jchar* chars, int length, TRAPS);
|
|
|
|
oop basic_add(int index, Handle string_or_null, jchar* name, int len,
|
|
|
|
unsigned int hashValue, TRAPS);
|
|
|
|
|
|
|
|
oop lookup(int index, jchar* chars, int length, unsigned int hashValue);
|
|
|
|
|
2013-06-18 12:31:07 -07:00
|
|
|
// Apply the give oop closure to the entries to the buckets
|
|
|
|
// in the range [start_idx, end_idx).
|
|
|
|
static void buckets_do(OopClosure* f, int start_idx, int end_idx);
|
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
StringTable() : Hashtable<oop, mtSymbol>((int)StringTableSize,
|
|
|
|
sizeof (HashtableEntry<oop, mtSymbol>)) {}
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2012-06-28 17:03:16 -04:00
|
|
|
StringTable(HashtableBucket<mtSymbol>* t, int number_of_entries)
|
|
|
|
: Hashtable<oop, mtSymbol>((int)StringTableSize, sizeof (HashtableEntry<oop, mtSymbol>), t,
|
2011-03-21 18:38:00 -07:00
|
|
|
number_of_entries) {}
|
2007-12-01 00:00:00 +00:00
|
|
|
public:
|
|
|
|
// The string table
|
|
|
|
static StringTable* the_table() { return _the_table; }
|
|
|
|
|
2012-11-12 15:58:11 -05:00
|
|
|
// Size of one bucket in the string table. Used when checking for rollover.
|
|
|
|
static uint bucket_size() { return sizeof(HashtableBucket<mtSymbol>); }
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
static void create_table() {
|
|
|
|
assert(_the_table == NULL, "One string table allowed.");
|
|
|
|
_the_table = new StringTable();
|
|
|
|
}
|
|
|
|
|
|
|
|
// GC support
|
|
|
|
// Delete pointers to otherwise-unreachable objects.
|
2013-05-27 12:58:42 +02:00
|
|
|
static void unlink_or_oops_do(BoolObjectClosure* cl, OopClosure* f);
|
|
|
|
static void unlink(BoolObjectClosure* cl) {
|
|
|
|
unlink_or_oops_do(cl, NULL);
|
|
|
|
}
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2013-06-18 12:31:07 -07:00
|
|
|
// Serially invoke "f->do_oop" on the locations of all oops in the table.
|
2011-01-27 16:11:27 -08:00
|
|
|
static void oops_do(OopClosure* f);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2013-06-18 12:31:07 -07:00
|
|
|
// Possibly parallel version of the above
|
|
|
|
static void possibly_parallel_oops_do(OopClosure* f);
|
|
|
|
|
2012-06-13 19:52:59 -04:00
|
|
|
// Hashing algorithm, used as the hash value used by the
|
|
|
|
// StringTable for bucket selection and comparison (stored in the
|
|
|
|
// HashtableEntry structures). This is used in the String.intern() method.
|
2012-06-25 21:33:35 -04:00
|
|
|
static unsigned int hash_string(const jchar* s, int len);
|
2012-06-13 19:52:59 -04:00
|
|
|
|
|
|
|
// Internal test.
|
|
|
|
static void test_alt_hash() PRODUCT_RETURN;
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
// Probing
|
2011-01-27 16:11:27 -08:00
|
|
|
static oop lookup(Symbol* symbol);
|
2013-04-02 11:28:33 +02:00
|
|
|
static oop lookup(jchar* chars, int length);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
// Interning
|
2011-01-27 16:11:27 -08:00
|
|
|
static oop intern(Symbol* symbol, TRAPS);
|
2007-12-01 00:00:00 +00:00
|
|
|
static oop intern(oop string, TRAPS);
|
|
|
|
static oop intern(const char *utf8_string, TRAPS);
|
|
|
|
|
|
|
|
// Debugging
|
|
|
|
static void verify();
|
2012-06-13 19:52:59 -04:00
|
|
|
static void dump(outputStream* st);
|
2007-12-01 00:00:00 +00:00
|
|
|
|
2013-09-18 07:02:10 -07:00
|
|
|
enum VerifyMesgModes {
|
|
|
|
_verify_quietly = 0,
|
|
|
|
_verify_with_mesgs = 1
|
|
|
|
};
|
|
|
|
|
|
|
|
enum VerifyRetTypes {
|
|
|
|
_verify_pass = 0,
|
|
|
|
_verify_fail_continue = 1,
|
|
|
|
_verify_fail_done = 2
|
|
|
|
};
|
|
|
|
|
|
|
|
static VerifyRetTypes compare_entries(int bkt1, int e_cnt1,
|
|
|
|
HashtableEntry<oop, mtSymbol>* e_ptr1,
|
|
|
|
int bkt2, int e_cnt2,
|
|
|
|
HashtableEntry<oop, mtSymbol>* e_ptr2);
|
|
|
|
static VerifyRetTypes verify_entry(int bkt, int e_cnt,
|
|
|
|
HashtableEntry<oop, mtSymbol>* e_ptr,
|
|
|
|
VerifyMesgModes mesg_mode);
|
|
|
|
static int verify_and_compare_entries();
|
|
|
|
|
2007-12-01 00:00:00 +00:00
|
|
|
// Sharing
|
|
|
|
static void copy_buckets(char** top, char*end) {
|
2012-06-28 17:03:16 -04:00
|
|
|
the_table()->Hashtable<oop, mtSymbol>::copy_buckets(top, end);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
static void copy_table(char** top, char*end) {
|
2012-06-28 17:03:16 -04:00
|
|
|
the_table()->Hashtable<oop, mtSymbol>::copy_table(top, end);
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
|
|
|
static void reverse() {
|
2012-06-28 17:03:16 -04:00
|
|
|
the_table()->Hashtable<oop, mtSymbol>::reverse();
|
2007-12-01 00:00:00 +00:00
|
|
|
}
|
2010-11-23 13:22:55 -08:00
|
|
|
|
2012-06-13 19:52:59 -04:00
|
|
|
// Rehash the symbol table if it gets out of balance
|
|
|
|
static void rehash_table();
|
|
|
|
static bool needs_rehashing() { return _needs_rehashing; }
|
2013-06-18 12:31:07 -07:00
|
|
|
|
|
|
|
// Parallel chunked scanning
|
|
|
|
static void clear_parallel_claimed_index() { _parallel_claimed_idx = 0; }
|
2012-06-13 19:52:59 -04:00
|
|
|
};
|
2010-11-23 13:22:55 -08:00
|
|
|
#endif // SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP
|