4592N/A * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2062N/A// The symbol table holds all Symbol*s and corresponding interned strings. 2062N/A// Symbol*s and literal strings should be canonicalized. 0N/A// The interned strings are created lazily. 0N/A// It is implemented as an open hash table with a fixed number of buckets. 0N/A// - symbolTableEntrys are allocated in blocks to reduce the space overhead. 2062N/A// Class to hold a newly created or referenced Symbol* temporarily in scope. 2062N/A// new_symbol() and lookup() will create a Symbol* if not already in the 2062N/A// symbol table and add to the symbol's reference count. 2062N/A// probe() and lookup_only() will increment the refcount if symbol is found. 2062N/A // Creating or looking up a symbol increments the symbol's reference count 2062N/A // Operator= increments reference count. 2062N/A // Decrement reference counter so it can go away if it's unique 2062N/A // Operators so they can be used like Symbols 2062N/A // Sneaky conversion function 3829N/A // Set if one bucket is out of balance due to hash algorithm deficiency 3650N/A // Arena for permanent symbols (null class loader) that are never unloaded 3650N/A // Pick initial size based on java -version size measurements 0N/A "bad shared symbol size.");
3650N/A // if CDS give symbol table a default arena size since most symbols 3650N/A // are already allocated in the shared misc section. 0N/A // lookup only, won't add. Also calculate hash. 0N/A // Only copy to C string to be added if lookup failed. 3081N/A // Look up the address of the literal in the SymbolTable for this Symbol* 665N/A // jchar (utf16) version of lookups 2062N/A // Release any dead symbols 3650N/A // Create a symbol in the arena for symbols that are not deleted 0N/A // Needed for preloading classes in signatures when compiling. 0N/A // Returns the symbol is already present in symbol table, otherwise 0N/A // NULL. NO ALLOCATION IS GUARANTEED! 3829N/A // Rehash the symbol table if it gets out of balance 3829N/A // Set if one bucket is out of balance due to hash algorithm deficiency 4592N/A // Claimed high water mark for parallel chunked scanning 4592N/A // Apply the give oop closure to the entries to the buckets 4592N/A // in the range [start_idx, end_idx). 0N/A "bad shared string size.");
0N/A // Delete pointers to otherwise-unreachable objects. 4592N/A // Serially invoke "f->do_oop" on the locations of all oops in the table. 4592N/A // Possibly parallel version of the above 3829N/A // Hashing algorithm, used as the hash value used by the 3829N/A // StringTable for bucket selection and comparison (stored in the 3829N/A // HashtableEntry structures). This is used in the String.intern() method. 3829N/A // Rehash the symbol table if it gets out of balance 4592N/A // Parallel chunked scanning 1879N/A#
endif // SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP