提交 98df2891 编写于 作者: C coleenp

7158800: Improve storage of symbol tables

Summary: Use an alternate version of hashing algorithm for symbol string tables and after a certain bucket size to improve performance
Reviewed-by: pbk, kamg, dlong, kvn, fparain
上级 41bcf476
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* 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.
*
* 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.
*
*/
#include "precompiled.hpp"
#include "classfile/altHashing.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp"
#include "oops/markOop.hpp"
#include "runtime/thread.hpp"
// Get the hash code of the classes mirror if it exists, otherwise just
// return a random number, which is one of the possible hash code used for
// objects. We don't want to call the synchronizer hash code to install
// this value because it may safepoint.
intptr_t object_hash(klassOop k) {
intptr_t hc = k->java_mirror()->mark()->hash();
return hc != markOopDesc::no_hash ? hc : os::random();
}
// Seed value used for each alternative hash calculated.
jint AltHashing::compute_seed() {
jlong nanos = os::javaTimeNanos();
jlong now = os::javaTimeMillis();
jint SEED_MATERIAL[8] = {
(jint) object_hash(SystemDictionary::String_klass()),
(jint) object_hash(SystemDictionary::System_klass()),
(jint) os::random(), // current thread isn't a java thread
(jint) (((julong)nanos) >> 32),
(jint) nanos,
(jint) (((julong)now) >> 32),
(jint) now,
(jint) (os::javaTimeNanos() >> 2)
};
return murmur3_32(SEED_MATERIAL, 8);
}
// Murmur3 hashing for Symbol
jint AltHashing::murmur3_32(jint seed, const jbyte* data, int len) {
jint h1 = seed;
int count = len;
int offset = 0;
// body
while (count >= 4) {
jint k1 = (data[offset] & 0x0FF)
| (data[offset + 1] & 0x0FF) << 8
| (data[offset + 2] & 0x0FF) << 16
| data[offset + 3] << 24;
count -= 4;
offset += 4;
k1 *= 0xcc9e2d51;
k1 = Integer_rotateLeft(k1, 15);
k1 *= 0x1b873593;
h1 ^= k1;
h1 = Integer_rotateLeft(h1, 13);
h1 = h1 * 5 + 0xe6546b64;
}
// tail
if (count > 0) {
jint k1 = 0;
switch (count) {
case 3:
k1 ^= (data[offset + 2] & 0xff) << 16;
// fall through
case 2:
k1 ^= (data[offset + 1] & 0xff) << 8;
// fall through
case 1:
k1 ^= (data[offset] & 0xff);
// fall through
default:
k1 *= 0xcc9e2d51;
k1 = Integer_rotateLeft(k1, 15);
k1 *= 0x1b873593;
h1 ^= k1;
}
}
// finalization
h1 ^= len;
// finalization mix force all bits of a hash block to avalanche
h1 ^= ((unsigned int)h1) >> 16;
h1 *= 0x85ebca6b;
h1 ^= ((unsigned int)h1) >> 13;
h1 *= 0xc2b2ae35;
h1 ^= ((unsigned int)h1) >> 16;
return h1;
}
// Murmur3 hashing for Strings
jint AltHashing::murmur3_32(jint seed, const jchar* data, int len) {
jint h1 = seed;
int off = 0;
int count = len;
// body
while (count >= 2) {
jchar d1 = data[off++] & 0xFFFF;
jchar d2 = data[off++];
jint k1 = (d1 | d2 << 16);
count -= 2;
k1 *= 0xcc9e2d51;
k1 = Integer_rotateLeft(k1, 15);
k1 *= 0x1b873593;
h1 ^= k1;
h1 = Integer_rotateLeft(h1, 13);
h1 = h1 * 5 + 0xe6546b64;
}
// tail
if (count > 0) {
int k1 = data[off];
k1 *= 0xcc9e2d51;
k1 = Integer_rotateLeft(k1, 15);
k1 *= 0x1b873593;
h1 ^= k1;
}
// finalization
h1 ^= len * 2; // (Character.SIZE / Byte.SIZE);
// finalization mix force all bits of a hash block to avalanche
h1 ^= ((unsigned int)h1) >> 16;
h1 *= 0x85ebca6b;
h1 ^= ((unsigned int)h1) >> 13;
h1 *= 0xc2b2ae35;
h1 ^= ((unsigned int)h1) >> 16;
return h1;
}
// Hash used for the seed.
jint AltHashing::murmur3_32(jint seed, const int* data, int len) {
jint h1 = seed;
int off = 0;
int end = len;
// body
while (off < end) {
jint k1 = data[off++];
k1 *= 0xcc9e2d51;
k1 = Integer_rotateLeft(k1, 15);
k1 *= 0x1b873593;
h1 ^= k1;
h1 = Integer_rotateLeft(h1, 13);
h1 = h1 * 5 + 0xe6546b64;
}
// tail (always empty, as body is always 32-bit chunks)
// finalization
h1 ^= len * 4; // (Integer.SIZE / Byte.SIZE);
// finalization mix force all bits of a hash block to avalanche
h1 ^= ((juint)h1) >> 16;
h1 *= 0x85ebca6b;
h1 ^= ((juint)h1) >> 13;
h1 *= 0xc2b2ae35;
h1 ^= ((juint)h1) >> 16;
return h1;
}
jint AltHashing::murmur3_32(const int* data, int len) {
return murmur3_32(0, data, len);
}
#ifndef PRODUCT
// Overloaded versions for internal test.
jint AltHashing::murmur3_32(const jbyte* data, int len) {
return murmur3_32(0, data, len);
}
jint AltHashing::murmur3_32(const jchar* data, int len) {
return murmur3_32(0, data, len);
}
// Internal test for alternate hashing. Translated from JDK version
// test/sun/misc/Hashing.java
static const jbyte ONE_BYTE[] = { (jbyte) 0x80};
static const jbyte TWO_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81};
static const jchar ONE_CHAR[] = { (jchar) 0x8180};
static const jbyte THREE_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82};
static const jbyte FOUR_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83};
static const jchar TWO_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382};
static const jint ONE_INT[] = { 0x83828180};
static const jbyte SIX_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83, (jbyte) 0x84, (jbyte) 0x85};
static const jchar THREE_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382, (jchar) 0x8584};
static const jbyte EIGHT_BYTE[] = {
(jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82,
(jbyte) 0x83, (jbyte) 0x84, (jbyte) 0x85,
(jbyte) 0x86, (jbyte) 0x87};
static const jchar FOUR_CHAR[] = {
(jchar) 0x8180, (jchar) 0x8382,
(jchar) 0x8584, (jchar) 0x8786};
static const jint TWO_INT[] = { 0x83828180, 0x87868584};
static const juint MURMUR3_32_X86_CHECK_VALUE = 0xB0F57EE3;
void AltHashing::testMurmur3_32_ByteArray() {
// printf("testMurmur3_32_ByteArray\n");
jbyte* vector = new jbyte[256];
jbyte* hashes = new jbyte[4 * 256];
for (int i = 0; i < 256; i++) {
vector[i] = (jbyte) i;
}
// Hash subranges {}, {0}, {0,1}, {0,1,2}, ..., {0,...,255}
for (int i = 0; i < 256; i++) {
jint hash = murmur3_32(256 - i, vector, i);
hashes[i * 4] = (jbyte) hash;
hashes[i * 4 + 1] = (jbyte) (((juint)hash) >> 8);
hashes[i * 4 + 2] = (jbyte) (((juint)hash) >> 16);
hashes[i * 4 + 3] = (jbyte) (((juint)hash) >> 24);
}
// hash to get const result.
juint final_hash = murmur3_32(hashes, 4*256);
assert (MURMUR3_32_X86_CHECK_VALUE == final_hash,
err_msg(
"Calculated hash result not as expected. Expected %08X got %08X\n",
MURMUR3_32_X86_CHECK_VALUE,
final_hash));
}
void AltHashing::testEquivalentHashes() {
jint jbytes, jchars, ints;
// printf("testEquivalentHashes\n");
jbytes = murmur3_32(TWO_BYTE, 2);
jchars = murmur3_32(ONE_CHAR, 1);
assert (jbytes == jchars,
err_msg("Hashes did not match. b:%08x != c:%08x\n", jbytes, jchars));
jbytes = murmur3_32(FOUR_BYTE, 4);
jchars = murmur3_32(TWO_CHAR, 2);
ints = murmur3_32(ONE_INT, 1);
assert ((jbytes == jchars) && (jbytes == ints),
err_msg("Hashes did not match. b:%08x != c:%08x != i:%08x\n", jbytes, jchars, ints));
jbytes = murmur3_32(SIX_BYTE, 6);
jchars = murmur3_32(THREE_CHAR, 3);
assert (jbytes == jchars,
err_msg("Hashes did not match. b:%08x != c:%08x\n", jbytes, jchars));
jbytes = murmur3_32(EIGHT_BYTE, 8);
jchars = murmur3_32(FOUR_CHAR, 4);
ints = murmur3_32(TWO_INT, 2);
assert ((jbytes == jchars) && (jbytes == ints),
err_msg("Hashes did not match. b:%08x != c:%08x != i:%08x\n", jbytes, jchars, ints));
}
// Returns true if the alternate hashcode is correct
void AltHashing::test_alt_hash() {
testMurmur3_32_ByteArray();
testEquivalentHashes();
}
#endif // PRODUCT
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* 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.
*
* 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.
*
*/
#ifndef SHARE_VM_CLASSFILE_ALTHASHING_HPP
#define SHARE_VM_CLASSFILE_ALTHASHING_HPP
#include "prims/jni.h"
#include "classfile/symbolTable.hpp"
/**
* Hashing utilities.
*
* Implementation of Murmur3 hashing.
* This code was translated from src/share/classes/sun/misc/Hashing.java
* code in the JDK.
*/
class AltHashing : AllStatic {
// utility function copied from java/lang/Integer
static jint Integer_rotateLeft(jint i, int distance) {
return (i << distance) | (((juint)i) >> (32-distance));
}
static jint murmur3_32(const int* data, int len);
static jint murmur3_32(jint seed, const int* data, int len);
#ifndef PRODUCT
// Hashing functions used for internal testing
static jint murmur3_32(const jbyte* data, int len);
static jint murmur3_32(const jchar* data, int len);
static void testMurmur3_32_ByteArray();
static void testEquivalentHashes();
#endif // PRODUCT
public:
static jint compute_seed();
static jint murmur3_32(jint seed, const jbyte* data, int len);
static jint murmur3_32(jint seed, const jchar* data, int len);
NOT_PRODUCT(static void test_alt_hash();)
};
#endif // SHARE_VM_CLASSFILE_ALTHASHING_HPP
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
*/ */
#include "precompiled.hpp" #include "precompiled.hpp"
#include "classfile/altHashing.hpp"
#include "classfile/javaClasses.hpp" #include "classfile/javaClasses.hpp"
#include "classfile/symbolTable.hpp" #include "classfile/symbolTable.hpp"
#include "classfile/vmSymbols.hpp" #include "classfile/vmSymbols.hpp"
...@@ -347,13 +348,26 @@ jchar* java_lang_String::as_unicode_string(oop java_string, int& length) { ...@@ -347,13 +348,26 @@ jchar* java_lang_String::as_unicode_string(oop java_string, int& length) {
return result; return result;
} }
unsigned int java_lang_String::hash_string(oop java_string) { unsigned int java_lang_String::to_hash(oop java_string) {
int length = java_lang_String::length(java_string);
// Zero length string will hash to zero with String.toHash() function.
if (length == 0) return 0;
typeArrayOop value = java_lang_String::value(java_string); typeArrayOop value = java_lang_String::value(java_string);
int offset = java_lang_String::offset(java_string); int offset = java_lang_String::offset(java_string);
return java_lang_String::to_hash(value->char_at_addr(offset), length);
}
unsigned int java_lang_String::hash_string(oop java_string) {
int length = java_lang_String::length(java_string); int length = java_lang_String::length(java_string);
// Zero length string doesn't hash necessarily hash to zero.
if (length == 0) {
return StringTable::hash_string(NULL, 0);
}
if (length == 0) return 0; typeArrayOop value = java_lang_String::value(java_string);
return hash_string(value->char_at_addr(offset), length); int offset = java_lang_String::offset(java_string);
return StringTable::hash_string(value->char_at_addr(offset), length);
} }
Symbol* java_lang_String::as_symbol(Handle java_string, TRAPS) { Symbol* java_lang_String::as_symbol(Handle java_string, TRAPS) {
......
...@@ -158,20 +158,16 @@ class java_lang_String : AllStatic { ...@@ -158,20 +158,16 @@ class java_lang_String : AllStatic {
static jchar* as_unicode_string(oop java_string, int& length); static jchar* as_unicode_string(oop java_string, int& length);
// Compute the hash value for a java.lang.String object which would // Compute the hash value for a java.lang.String object which would
// contain the characters passed in. This hash value is used for at // contain the characters passed in.
// least two purposes.
// //
// (a) As the hash value used by the StringTable for bucket selection // As the hash value used by the String object itself, in
// and comparison (stored in the HashtableEntry structures). This // String.hashCode(). This value is normally calculated in Java code
// is used in the String.intern() method.
//
// (b) As the hash value used by the String object itself, in
// String.hashCode(). This value is normally calculate in Java code
// in the String.hashCode method(), but is precomputed for String // in the String.hashCode method(), but is precomputed for String
// objects in the shared archive file. // objects in the shared archive file.
// hash P(31) from Kernighan & Ritchie
// //
// For this reason, THIS ALGORITHM MUST MATCH String.hashCode(). // For this reason, THIS ALGORITHM MUST MATCH String.toHash().
static unsigned int hash_string(jchar* s, int len) { template <typename T> static unsigned int to_hash(T* s, int len) {
unsigned int h = 0; unsigned int h = 0;
while (len-- > 0) { while (len-- > 0) {
h = 31*h + (unsigned int) *s; h = 31*h + (unsigned int) *s;
...@@ -179,6 +175,10 @@ class java_lang_String : AllStatic { ...@@ -179,6 +175,10 @@ class java_lang_String : AllStatic {
} }
return h; return h;
} }
static unsigned int to_hash(oop java_string);
// This is the string hash code used by the StringTable, which may be
// the same as String.toHash or an alternate hash code.
static unsigned int hash_string(oop java_string); static unsigned int hash_string(oop java_string);
static bool equals(oop java_string, jchar* chars, int len); static bool equals(oop java_string, jchar* chars, int len);
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
*/ */
#include "precompiled.hpp" #include "precompiled.hpp"
#include "classfile/altHashing.hpp"
#include "classfile/javaClasses.hpp" #include "classfile/javaClasses.hpp"
#include "classfile/symbolTable.hpp" #include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp" #include "classfile/systemDictionary.hpp"
...@@ -34,12 +35,15 @@ ...@@ -34,12 +35,15 @@
#include "oops/oop.inline2.hpp" #include "oops/oop.inline2.hpp"
#include "runtime/mutexLocker.hpp" #include "runtime/mutexLocker.hpp"
#include "utilities/hashtable.inline.hpp" #include "utilities/hashtable.inline.hpp"
#include "utilities/numberSeq.hpp"
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
SymbolTable* SymbolTable::_the_table = NULL; SymbolTable* SymbolTable::_the_table = NULL;
// Static arena for symbols that are not deallocated // Static arena for symbols that are not deallocated
Arena* SymbolTable::_arena = NULL; Arena* SymbolTable::_arena = NULL;
bool SymbolTable::_needs_rehashing = false;
jint SymbolTable::_seed = 0;
Symbol* SymbolTable::allocate_symbol(const u1* name, int len, bool c_heap, TRAPS) { Symbol* SymbolTable::allocate_symbol(const u1* name, int len, bool c_heap, TRAPS) {
// Don't allow symbols to be created which cannot fit in a Symbol*. // Don't allow symbols to be created which cannot fit in a Symbol*.
...@@ -121,12 +125,41 @@ void SymbolTable::unlink() { ...@@ -121,12 +125,41 @@ void SymbolTable::unlink() {
} }
} }
unsigned int SymbolTable::new_hash(Symbol* sym) {
ResourceMark rm;
// Use alternate hashing algorithm on this symbol.
return AltHashing::murmur3_32(seed(), (const jbyte*)sym->as_C_string(), sym->utf8_length());
}
// Create a new table and using alternate hash code, populate the new table
// with the existing strings. Set flag to use the alternate hash code afterwards.
void SymbolTable::rehash_table() {
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
assert(!DumpSharedSpaces, "this should never happen with -Xshare:dump");
// Create a new symbol table
SymbolTable* new_table = new SymbolTable();
// Initialize the global seed for hashing.
_seed = AltHashing::compute_seed();
assert(seed() != 0, "shouldn't be zero");
the_table()->move_to(new_table);
// Delete the table and buckets (entries are reused in new table).
delete _the_table;
// Don't check if we need rehashing until the table gets unbalanced again.
// Then rehash with a new global seed.
_needs_rehashing = false;
_the_table = new_table;
}
// Lookup a symbol in a bucket. // Lookup a symbol in a bucket.
Symbol* SymbolTable::lookup(int index, const char* name, Symbol* SymbolTable::lookup(int index, const char* name,
int len, unsigned int hash) { int len, unsigned int hash) {
int count = 0;
for (HashtableEntry<Symbol*>* e = bucket(index); e != NULL; e = e->next()) { for (HashtableEntry<Symbol*>* e = bucket(index); e != NULL; e = e->next()) {
count++; // count all entries in this bucket, not just ones with same hash
if (e->hash() == hash) { if (e->hash() == hash) {
Symbol* sym = e->literal(); Symbol* sym = e->literal();
if (sym->equals(name, len)) { if (sym->equals(name, len)) {
...@@ -136,9 +169,21 @@ Symbol* SymbolTable::lookup(int index, const char* name, ...@@ -136,9 +169,21 @@ Symbol* SymbolTable::lookup(int index, const char* name,
} }
} }
} }
// If the bucket size is too deep check if this hash code is insufficient.
if (count >= BasicHashtable::rehash_count && !needs_rehashing()) {
_needs_rehashing = check_rehash_table(count);
}
return NULL; return NULL;
} }
// Pick hashing algorithm, but return value already given if not using a new
// hash algorithm.
unsigned int SymbolTable::hash_symbol(const char* s, int len, unsigned int hashValue) {
return use_alternate_hashcode() ?
AltHashing::murmur3_32(seed(), (const jbyte*)s, len) :
(hashValue != 0 ? hashValue : java_lang_String::to_hash(s, len));
}
// We take care not to be blocking while holding the // We take care not to be blocking while holding the
// SymbolTable_lock. Otherwise, the system might deadlock, since the // SymbolTable_lock. Otherwise, the system might deadlock, since the
...@@ -287,13 +332,17 @@ Symbol* SymbolTable::new_permanent_symbol(const char* name, TRAPS) { ...@@ -287,13 +332,17 @@ Symbol* SymbolTable::new_permanent_symbol(const char* name, TRAPS) {
} }
Symbol* SymbolTable::basic_add(int index, u1 *name, int len, Symbol* SymbolTable::basic_add(int index, u1 *name, int len,
unsigned int hashValue, bool c_heap, TRAPS) { unsigned int hashValue_arg, bool c_heap, TRAPS) {
assert(!Universe::heap()->is_in_reserved(name) || GC_locker::is_active(), assert(!Universe::heap()->is_in_reserved(name) || GC_locker::is_active(),
"proposed name of symbol must be stable"); "proposed name of symbol must be stable");
// Grab SymbolTable_lock first. // Grab SymbolTable_lock first.
MutexLocker ml(SymbolTable_lock, THREAD); MutexLocker ml(SymbolTable_lock, THREAD);
// Check if the symbol table has been rehashed, if so, need to recalculate
// the hash value.
unsigned int hashValue = hash_symbol((const char*)name, len, hashValue_arg);
// Since look-up was done lock-free, we need to check if another // Since look-up was done lock-free, we need to check if another
// thread beat us in the race to insert the symbol. // thread beat us in the race to insert the symbol.
Symbol* test = lookup(index, (char*)name, len, hashValue); Symbol* test = lookup(index, (char*)name, len, hashValue);
...@@ -332,10 +381,13 @@ bool SymbolTable::basic_add(Handle class_loader, constantPoolHandle cp, ...@@ -332,10 +381,13 @@ bool SymbolTable::basic_add(Handle class_loader, constantPoolHandle cp,
MutexLocker ml(SymbolTable_lock, THREAD); MutexLocker ml(SymbolTable_lock, THREAD);
for (int i=0; i<names_count; i++) { for (int i=0; i<names_count; i++) {
// Check if the symbol table has been rehashed, if so, need to recalculate
// the hash value.
unsigned int hashValue = hash_symbol(names[i], lengths[i], hashValues[i]);
// Since look-up was done lock-free, we need to check if another // Since look-up was done lock-free, we need to check if another
// thread beat us in the race to insert the symbol. // thread beat us in the race to insert the symbol.
int index = hash_to_index(hashValues[i]); int index = hash_to_index(hashValue);
Symbol* test = lookup(index, names[i], lengths[i], hashValues[i]); Symbol* test = lookup(index, names[i], lengths[i], hashValue);
if (test != NULL) { if (test != NULL) {
// A race occurred and another thread introduced the symbol, this one // A race occurred and another thread introduced the symbol, this one
// will be dropped and collected. Use test instead. // will be dropped and collected. Use test instead.
...@@ -347,7 +399,7 @@ bool SymbolTable::basic_add(Handle class_loader, constantPoolHandle cp, ...@@ -347,7 +399,7 @@ bool SymbolTable::basic_add(Handle class_loader, constantPoolHandle cp,
bool c_heap = class_loader() != NULL; bool c_heap = class_loader() != NULL;
Symbol* sym = allocate_symbol((const u1*)names[i], lengths[i], c_heap, CHECK_(false)); Symbol* sym = allocate_symbol((const u1*)names[i], lengths[i], c_heap, CHECK_(false));
assert(sym->equals(names[i], lengths[i]), "symbol must be properly initialized"); // why wouldn't it be??? assert(sym->equals(names[i], lengths[i]), "symbol must be properly initialized"); // why wouldn't it be???
HashtableEntry<Symbol*>* entry = new_entry(hashValues[i], sym); HashtableEntry<Symbol*>* entry = new_entry(hashValue, sym);
add_entry(index, entry); add_entry(index, entry);
cp->symbol_at_put(cp_indices[i], sym); cp->symbol_at_put(cp_indices[i], sym);
} }
...@@ -370,6 +422,24 @@ void SymbolTable::verify() { ...@@ -370,6 +422,24 @@ void SymbolTable::verify() {
} }
} }
void SymbolTable::dump(outputStream* st) {
NumberSeq summary;
for (int i = 0; i < the_table()->table_size(); ++i) {
int count = 0;
for (HashtableEntry<Symbol*>* e = the_table()->bucket(i);
e != NULL; e = e->next()) {
count++;
}
summary.add((double)count);
}
st->print_cr("SymbolTable statistics:");
st->print_cr("Number of buckets : %7d", summary.num());
st->print_cr("Average bucket size : %7.0f", summary.avg());
st->print_cr("Variance of bucket size : %7.0f", summary.variance());
st->print_cr("Std. dev. of bucket size: %7.0f", summary.sd());
st->print_cr("Maximum bucket size : %7.0f", summary.maximum());
}
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// Non-product code // Non-product code
...@@ -468,7 +538,6 @@ void SymbolTable::print() { ...@@ -468,7 +538,6 @@ void SymbolTable::print() {
} }
} }
} }
#endif // PRODUCT #endif // PRODUCT
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
...@@ -514,21 +583,36 @@ class StableMemoryChecker : public StackObj { ...@@ -514,21 +583,36 @@ class StableMemoryChecker : public StackObj {
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
StringTable* StringTable::_the_table = NULL; StringTable* StringTable::_the_table = NULL;
bool StringTable::_needs_rehashing = false;
jint StringTable::_seed = 0;
// Pick hashing algorithm
unsigned int StringTable::hash_string(const jchar* s, int len, unsigned int hashValue) {
return use_alternate_hashcode() ? AltHashing::murmur3_32(seed(), s, len) :
(hashValue != 0 ? hashValue : java_lang_String::to_hash(s, len));
}
oop StringTable::lookup(int index, jchar* name, oop StringTable::lookup(int index, jchar* name,
int len, unsigned int hash) { int len, unsigned int hash) {
int count = 0;
for (HashtableEntry<oop>* l = bucket(index); l != NULL; l = l->next()) { for (HashtableEntry<oop>* l = bucket(index); l != NULL; l = l->next()) {
count++;
if (l->hash() == hash) { if (l->hash() == hash) {
if (java_lang_String::equals(l->literal(), name, len)) { if (java_lang_String::equals(l->literal(), name, len)) {
return l->literal(); return l->literal();
} }
} }
} }
// If the bucket size is too deep check if this hash code is insufficient.
if (count >= BasicHashtable::rehash_count && !needs_rehashing()) {
_needs_rehashing = check_rehash_table(count);
}
return NULL; return NULL;
} }
oop StringTable::basic_add(int index, Handle string_or_null, jchar* name, oop StringTable::basic_add(int index, Handle string_or_null, jchar* name,
int len, unsigned int hashValue, TRAPS) { int len, unsigned int hashValue_arg, TRAPS) {
debug_only(StableMemoryChecker smc(name, len * sizeof(name[0]))); debug_only(StableMemoryChecker smc(name, len * sizeof(name[0])));
assert(!Universe::heap()->is_in_reserved(name) || GC_locker::is_active(), assert(!Universe::heap()->is_in_reserved(name) || GC_locker::is_active(),
"proposed name of symbol must be stable"); "proposed name of symbol must be stable");
...@@ -547,6 +631,10 @@ oop StringTable::basic_add(int index, Handle string_or_null, jchar* name, ...@@ -547,6 +631,10 @@ oop StringTable::basic_add(int index, Handle string_or_null, jchar* name,
assert(java_lang_String::equals(string(), name, len), assert(java_lang_String::equals(string(), name, len),
"string must be properly initialized"); "string must be properly initialized");
// Check if the symbol table has been rehashed, if so, need to recalculate
// the hash value before second lookup.
unsigned int hashValue = hash_string(name, len, hashValue_arg);
// Since look-up was done lock-free, we need to check if another // Since look-up was done lock-free, we need to check if another
// thread beat us in the race to insert the symbol. // thread beat us in the race to insert the symbol.
...@@ -566,7 +654,7 @@ oop StringTable::lookup(Symbol* symbol) { ...@@ -566,7 +654,7 @@ oop StringTable::lookup(Symbol* symbol) {
ResourceMark rm; ResourceMark rm;
int length; int length;
jchar* chars = symbol->as_unicode(length); jchar* chars = symbol->as_unicode(length);
unsigned int hashValue = java_lang_String::hash_string(chars, length); unsigned int hashValue = hash_string(chars, length);
int index = the_table()->hash_to_index(hashValue); int index = the_table()->hash_to_index(hashValue);
return the_table()->lookup(index, chars, length, hashValue); return the_table()->lookup(index, chars, length, hashValue);
} }
...@@ -574,7 +662,7 @@ oop StringTable::lookup(Symbol* symbol) { ...@@ -574,7 +662,7 @@ oop StringTable::lookup(Symbol* symbol) {
oop StringTable::intern(Handle string_or_null, jchar* name, oop StringTable::intern(Handle string_or_null, jchar* name,
int len, TRAPS) { int len, TRAPS) {
unsigned int hashValue = java_lang_String::hash_string(name, len); unsigned int hashValue = hash_string(name, len);
int index = the_table()->hash_to_index(hashValue); int index = the_table()->hash_to_index(hashValue);
oop string = the_table()->lookup(index, name, len, hashValue); oop string = the_table()->lookup(index, name, len, hashValue);
...@@ -675,3 +763,52 @@ void StringTable::verify() { ...@@ -675,3 +763,52 @@ void StringTable::verify() {
} }
} }
} }
void StringTable::dump(outputStream* st) {
NumberSeq summary;
for (int i = 0; i < the_table()->table_size(); ++i) {
HashtableEntry<oop>* p = the_table()->bucket(i);
int count = 0;
for ( ; p != NULL; p = p->next()) {
count++;
}
summary.add((double)count);
}
st->print_cr("StringTable statistics:");
st->print_cr("Number of buckets : %7d", summary.num());
st->print_cr("Average bucket size : %7.0f", summary.avg());
st->print_cr("Variance of bucket size : %7.0f", summary.variance());
st->print_cr("Std. dev. of bucket size: %7.0f", summary.sd());
st->print_cr("Maximum bucket size : %7.0f", summary.maximum());
}
unsigned int StringTable::new_hash(oop string) {
ResourceMark rm;
int length;
jchar* chars = java_lang_String::as_unicode_string(string, length);
// Use alternate hashing algorithm on the string
return AltHashing::murmur3_32(seed(), chars, length);
}
// Create a new table and using alternate hash code, populate the new table
// with the existing strings. Set flag to use the alternate hash code afterwards.
void StringTable::rehash_table() {
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
assert(!DumpSharedSpaces, "this should never happen with -Xshare:dump");
StringTable* new_table = new StringTable();
// Initialize new global seed for hashing.
_seed = AltHashing::compute_seed();
assert(seed() != 0, "shouldn't be zero");
// Rehash the table
the_table()->move_to(new_table);
// Delete the table and buckets (entries are reused in new table).
delete _the_table;
// Don't check if we need rehashing until the table gets unbalanced again.
// Then rehash with a new global seed.
_needs_rehashing = false;
_the_table = new_table;
}
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
// - symbolTableEntrys are allocated in blocks to reduce the space overhead. // - symbolTableEntrys are allocated in blocks to reduce the space overhead.
class BoolObjectClosure; class BoolObjectClosure;
class outputStream;
// Class to hold a newly created or referenced Symbol* temporarily in scope. // Class to hold a newly created or referenced Symbol* temporarily in scope.
...@@ -78,6 +79,10 @@ private: ...@@ -78,6 +79,10 @@ private:
// The symbol table // The symbol table
static SymbolTable* _the_table; static SymbolTable* _the_table;
// Set if one bucket is out of balance due to hash algorithm deficiency
static bool _needs_rehashing;
static jint _seed;
// For statistics // For statistics
static int symbols_removed; static int symbols_removed;
static int symbols_counted; static int symbols_counted;
...@@ -119,6 +124,11 @@ private: ...@@ -119,6 +124,11 @@ private:
static Arena* arena() { return _arena; } // called for statistics static Arena* arena() { return _arena; } // called for statistics
static void initialize_symbols(int arena_alloc_size = 0); static void initialize_symbols(int arena_alloc_size = 0);
static bool use_alternate_hashcode() { return _seed != 0; }
static jint seed() { return _seed; }
unsigned int new_hash(Symbol* sym);
public: public:
enum { enum {
symbol_alloc_batch_size = 8, symbol_alloc_batch_size = 8,
...@@ -146,6 +156,8 @@ public: ...@@ -146,6 +156,8 @@ public:
initialize_symbols(); initialize_symbols();
} }
static unsigned int hash_symbol(const char* s, int len, unsigned int hashValue = 0);
static Symbol* lookup(const char* name, int len, TRAPS); static Symbol* lookup(const char* name, int len, TRAPS);
// lookup only, won't add. Also calculate hash. // lookup only, won't add. Also calculate hash.
static Symbol* lookup_only(const char* name, int len, unsigned int& hash); static Symbol* lookup_only(const char* name, int len, unsigned int& hash);
...@@ -208,6 +220,7 @@ public: ...@@ -208,6 +220,7 @@ public:
// Debugging // Debugging
static void verify(); static void verify();
static void dump(outputStream* st);
// Sharing // Sharing
static void copy_buckets(char** top, char*end) { static void copy_buckets(char** top, char*end) {
...@@ -219,8 +232,13 @@ public: ...@@ -219,8 +232,13 @@ public:
static void reverse(void* boundary = NULL) { static void reverse(void* boundary = NULL) {
the_table()->Hashtable<Symbol*>::reverse(boundary); the_table()->Hashtable<Symbol*>::reverse(boundary);
} }
// Rehash the symbol table if it gets out of balance
static void rehash_table();
static bool needs_rehashing() { return _needs_rehashing; }
}; };
class StringTable : public Hashtable<oop> { class StringTable : public Hashtable<oop> {
friend class VMStructs; friend class VMStructs;
...@@ -228,6 +246,10 @@ private: ...@@ -228,6 +246,10 @@ private:
// The string table // The string table
static StringTable* _the_table; static StringTable* _the_table;
// Set if one bucket is out of balance due to hash algorithm deficiency
static bool _needs_rehashing;
static jint _seed;
static oop intern(Handle string_or_null, jchar* chars, int length, TRAPS); 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, oop basic_add(int index, Handle string_or_null, jchar* name, int len,
unsigned int hashValue, TRAPS); unsigned int hashValue, TRAPS);
...@@ -241,6 +263,10 @@ private: ...@@ -241,6 +263,10 @@ private:
: Hashtable<oop>((int)StringTableSize, sizeof (HashtableEntry<oop>), t, : Hashtable<oop>((int)StringTableSize, sizeof (HashtableEntry<oop>), t,
number_of_entries) {} number_of_entries) {}
static bool use_alternate_hashcode() { return _seed != 0; }
static jint seed() { return _seed; }
unsigned int new_hash(oop s);
public: public:
// The string table // The string table
static StringTable* the_table() { return _the_table; } static StringTable* the_table() { return _the_table; }
...@@ -265,6 +291,14 @@ public: ...@@ -265,6 +291,14 @@ public:
// Invoke "f->do_oop" on the locations of all oops in the table. // Invoke "f->do_oop" on the locations of all oops in the table.
static void oops_do(OopClosure* f); static void oops_do(OopClosure* f);
// 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.
static unsigned int hash_string(const jchar* s, int len, unsigned int hashValue = 0);
// Internal test.
static void test_alt_hash() PRODUCT_RETURN;
// Probing // Probing
static oop lookup(Symbol* symbol); static oop lookup(Symbol* symbol);
...@@ -275,6 +309,7 @@ public: ...@@ -275,6 +309,7 @@ public:
// Debugging // Debugging
static void verify(); static void verify();
static void dump(outputStream* st);
// Sharing // Sharing
static void copy_buckets(char** top, char*end) { static void copy_buckets(char** top, char*end) {
...@@ -286,6 +321,9 @@ public: ...@@ -286,6 +321,9 @@ public:
static void reverse() { static void reverse() {
the_table()->Hashtable<oop>::reverse(); the_table()->Hashtable<oop>::reverse();
} }
};
// Rehash the symbol table if it gets out of balance
static void rehash_table();
static bool needs_rehashing() { return _needs_rehashing; }
};
#endif // SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP #endif // SHARE_VM_CLASSFILE_SYMBOLTABLE_HPP
...@@ -62,8 +62,8 @@ public: ...@@ -62,8 +62,8 @@ public:
// written later, increasing the likelihood that the shared page contain // written later, increasing the likelihood that the shared page contain
// the hash can be shared. // the hash can be shared.
// //
// NOTE THAT the algorithm in StringTable::hash_string() MUST MATCH the // NOTE THAT we have to call java_lang_String::to_hash() to match the
// algorithm in java.lang.String.hashCode(). // algorithm in java.lang.String.toHash().
class StringHashCodeClosure: public OopClosure { class StringHashCodeClosure: public OopClosure {
private: private:
...@@ -80,7 +80,7 @@ public: ...@@ -80,7 +80,7 @@ public:
oop obj = *p; oop obj = *p;
if (obj->klass() == SystemDictionary::String_klass() && if (obj->klass() == SystemDictionary::String_klass() &&
java_lang_String::has_hash_field()) { java_lang_String::has_hash_field()) {
int hash = java_lang_String::hash_string(obj); int hash = java_lang_String::to_hash(obj);
obj->int_field_put(hash_offset, hash); obj->int_field_put(hash_offset, hash);
} }
} }
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
*/ */
#include "precompiled.hpp" #include "precompiled.hpp"
#include "classfile/altHashing.hpp"
#include "classfile/classLoader.hpp" #include "classfile/classLoader.hpp"
#include "classfile/javaClasses.hpp" #include "classfile/javaClasses.hpp"
#include "classfile/symbolTable.hpp" #include "classfile/symbolTable.hpp"
...@@ -5053,6 +5054,7 @@ void execute_internal_vm_tests() { ...@@ -5053,6 +5054,7 @@ void execute_internal_vm_tests() {
run_unit_test(arrayOopDesc::test_max_array_length()); run_unit_test(arrayOopDesc::test_max_array_length());
run_unit_test(CollectedHeap::test_is_in()); run_unit_test(CollectedHeap::test_is_in());
run_unit_test(QuickSort::test_quick_sort()); run_unit_test(QuickSort::test_quick_sort());
run_unit_test(AltHashing::test_alt_hash());
tty->print_cr("All internal VM tests passed"); tty->print_cr("All internal VM tests passed");
} }
} }
......
...@@ -2662,6 +2662,9 @@ class CommandLineFlags { ...@@ -2662,6 +2662,9 @@ class CommandLineFlags {
product(bool, UseHeavyMonitors, false, \ product(bool, UseHeavyMonitors, false, \
"use heavyweight instead of lightweight Java monitors") \ "use heavyweight instead of lightweight Java monitors") \
\ \
product(bool, PrintStringTableStatistics, false, \
"print statistics about the StringTable and SymbolTable") \
\
notproduct(bool, PrintSymbolTableSizeHistogram, false, \ notproduct(bool, PrintSymbolTableSizeHistogram, false, \
"print histogram of the symbol table") \ "print histogram of the symbol table") \
\ \
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
*/ */
#include "precompiled.hpp" #include "precompiled.hpp"
#include "classfile/symbolTable.hpp"
#include "code/icBuffer.hpp" #include "code/icBuffer.hpp"
#include "gc_interface/collectedHeap.hpp" #include "gc_interface/collectedHeap.hpp"
#include "interpreter/bytecodes.hpp" #include "interpreter/bytecodes.hpp"
...@@ -157,6 +158,10 @@ void exit_globals() { ...@@ -157,6 +158,10 @@ void exit_globals() {
// Print the collected safepoint statistics. // Print the collected safepoint statistics.
SafepointSynchronize::print_stat_on_exit(); SafepointSynchronize::print_stat_on_exit();
} }
if (PrintStringTableStatistics) {
SymbolTable::dump(tty);
StringTable::dump(tty);
}
ostream_exit(); ostream_exit();
} }
} }
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
*/ */
#include "precompiled.hpp" #include "precompiled.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp" #include "classfile/systemDictionary.hpp"
#include "code/codeCache.hpp" #include "code/codeCache.hpp"
#include "code/icBuffer.hpp" #include "code/icBuffer.hpp"
...@@ -526,8 +527,20 @@ void SafepointSynchronize::do_cleanup_tasks() { ...@@ -526,8 +527,20 @@ void SafepointSynchronize::do_cleanup_tasks() {
CompilationPolicy::policy()->do_safepoint_work(); CompilationPolicy::policy()->do_safepoint_work();
} }
{
TraceTime t4("sweeping nmethods", TraceSafepointCleanupTime); TraceTime t4("sweeping nmethods", TraceSafepointCleanupTime);
NMethodSweeper::scan_stacks(); NMethodSweeper::scan_stacks();
}
if (SymbolTable::needs_rehashing()) {
TraceTime t5("rehashing symbol table", TraceSafepointCleanupTime);
SymbolTable::rehash_table();
}
if (StringTable::needs_rehashing()) {
TraceTime t6("rehashing string table", TraceSafepointCleanupTime);
StringTable::rehash_table();
}
// rotate log files? // rotate log files?
if (UseGCLogFileRotation) { if (UseGCLogFileRotation) {
......
/* /*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -86,6 +86,55 @@ template <class T> HashtableEntry<T>* Hashtable<T>::new_entry(unsigned int hashV ...@@ -86,6 +86,55 @@ template <class T> HashtableEntry<T>* Hashtable<T>::new_entry(unsigned int hashV
} }
// Check to see if the hashtable is unbalanced. The caller set a flag to
// rehash at the next safepoint. If this bucket is 60 times greater than the
// expected average bucket length, it's an unbalanced hashtable.
// This is somewhat an arbitrary heuristic but if one bucket gets to
// rehash_count which is currently 100, there's probably something wrong.
bool BasicHashtable::check_rehash_table(int count) {
assert(table_size() != 0, "underflow");
if (count > (((double)number_of_entries()/(double)table_size())*rehash_multiple)) {
// Set a flag for the next safepoint, which should be at some guaranteed
// safepoint interval.
return true;
}
return false;
}
// Create a new table and using alternate hash code, populate the new table
// with the existing elements. This can be used to change the hash code
// and could in the future change the size of the table.
template <class T> void Hashtable<T>::move_to(Hashtable<T>* new_table) {
int saved_entry_count = number_of_entries();
// Iterate through the table and create a new entry for the new table
for (int i = 0; i < new_table->table_size(); ++i) {
for (HashtableEntry<T>* p = bucket(i); p != NULL; ) {
HashtableEntry<T>* next = p->next();
T string = p->literal();
// Use alternate hashing algorithm on the symbol in the first table
unsigned int hashValue = new_hash(string);
// Get a new index relative to the new table (can also change size)
int index = new_table->hash_to_index(hashValue);
p->set_hash(hashValue);
unlink_entry(p);
new_table->add_entry(index, p);
p = next;
}
}
// give the new table the free list as well
new_table->copy_freelist(this);
assert(new_table->number_of_entries() == saved_entry_count, "lost entry on dictionary copy?");
// Destroy memory used by the buckets in the hashtable. The memory
// for the elements has been used in a new table and is not
// destroyed. The memory reuse will benefit resizing the SystemDictionary
// to avoid a memory allocation spike at safepoint.
free_buckets();
}
// Reverse the order of elements in the hash buckets. // Reverse the order of elements in the hash buckets.
void BasicHashtable::reverse() { void BasicHashtable::reverse() {
......
...@@ -159,8 +159,6 @@ public: ...@@ -159,8 +159,6 @@ public:
// Reverse the order of elements in each of the buckets. // Reverse the order of elements in each of the buckets.
void reverse(); void reverse();
static unsigned int hash_symbol(const char* s, int len);
private: private:
// Instance variables // Instance variables
int _table_size; int _table_size;
...@@ -179,6 +177,11 @@ protected: ...@@ -179,6 +177,11 @@ protected:
void verify_lookup_length(double load); void verify_lookup_length(double load);
#endif #endif
enum {
rehash_count = 100,
rehash_multiple = 60
};
void initialize(int table_size, int entry_size, int number_of_entries); void initialize(int table_size, int entry_size, int number_of_entries);
// Accessor // Accessor
...@@ -193,6 +196,34 @@ protected: ...@@ -193,6 +196,34 @@ protected:
// Table entry management // Table entry management
BasicHashtableEntry* new_entry(unsigned int hashValue); BasicHashtableEntry* new_entry(unsigned int hashValue);
// Check that the table is unbalanced
bool check_rehash_table(int count);
// Used when moving the entry to another table
// Clean up links, but do not add to free_list
void unlink_entry(BasicHashtableEntry* entry) {
entry->set_next(NULL);
--_number_of_entries;
}
// Move over freelist and free block for allocation
void copy_freelist(BasicHashtable* src) {
_free_list = src->_free_list;
src->_free_list = NULL;
_first_free_entry = src->_first_free_entry;
src->_first_free_entry = NULL;
_end_block = src->_end_block;
src->_end_block = NULL;
}
// Free the buckets in this hashtable
void free_buckets() {
if (NULL != _buckets) {
FREE_C_HEAP_ARRAY(HashtableBucket, _buckets);
_buckets = NULL;
}
}
public: public:
int table_size() { return _table_size; } int table_size() { return _table_size; }
void set_entry(int index, BasicHashtableEntry* entry); void set_entry(int index, BasicHashtableEntry* entry);
...@@ -249,6 +280,10 @@ protected: ...@@ -249,6 +280,10 @@ protected:
HashtableEntry<T>** bucket_addr(int i) { HashtableEntry<T>** bucket_addr(int i) {
return (HashtableEntry<T>**)BasicHashtable::bucket_addr(i); return (HashtableEntry<T>**)BasicHashtable::bucket_addr(i);
} }
// Function to move these elements into the new table.
void move_to(Hashtable<T>* new_table);
virtual unsigned int new_hash(T) { ShouldNotReachHere(); return 0; } // should be overridden
}; };
......
/* /*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -30,27 +30,6 @@ ...@@ -30,27 +30,6 @@
// Inline function definitions for hashtable.hpp. // Inline function definitions for hashtable.hpp.
// --------------------------------------------------------------------------
// Hash function
// We originally used hashpjw, but hash P(31) gives just as good results
// and is slighly faster. We would like a hash function that looks at every
// character, since package names have large common prefixes, and also because
// hash_or_fail does error checking while iterating.
// hash P(31) from Kernighan & Ritchie
inline unsigned int BasicHashtable::hash_symbol(const char* s, int len) {
unsigned int h = 0;
while (len-- > 0) {
h = 31*h + (unsigned) *s;
s++;
}
return h;
}
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// Initialize a table. // Initialize a table.
......
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* 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.
*
* 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.
*/
/*
* @test
* @bug 7158800
* @summary Test that 1200 symbols that hash to the same value triggers
* the symbol table alternate hashing mechanism. There isn't actually a
* way to verify this.
*/
//
// Generate large number of strings that hash to the same value
// to slow down symbol table lookup.
import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
public class BadUtf8 {
static String[] strings = {
"EOcLKvbddZyPxYpb",
"DncLKvbdPxmAGrqj",
"DoCjjvbdpxoIHQdY",
"EPCkKvbdqYoHfqEY",
"DnbkKvbdezvYdiUX",
"DnbjjvbdeEoRbXCj",
"EObkKvbdbsCkUEKB",
"EOcLKvbdnUtyjiqf",
"DncLKvbdRWnDcMHc",
"DoCkKvbdrSUkOLAm",
"DncLKvbdfNFwGmJk",
"EPDLKvbdvAdYroFI",
"DoDLKvbdiGibyViu",
"DncLKvbdYqNEhmFR",
"DoCkKvbdEARhlzXX",
"DncLKvbdSZjHsCvA",
"DncKjvbdqTsgRqkU",
"DnbjjvbdqAiFAXHd",
"EPDKjvbdGcjvJaij",
"DnbkKvbdwtldpxkn",
"DoDKjvbdYkrETnMN",
"EPCjjvbdbBWEfQQX",
"EPCjjvbduMXwAtBX",
"DncLKvbdbsCkTcia",
"DoCjjvbdczYpYZRC",
"EOcKjvbdFeiqmhsq",
"DoCkKvbdKCicQibx",
"EOcKjvbdZLrEUOLm",
"DoCjjvbdaNKbStmH",
"DoDKjvbdJbjDQjDY",
"EPCkKvbdemFwGmKL",
"EPDKjvbdZQleImEq",
"DncKjvbdZjShPfbG",
"DnbjjvbdqYnhHREY",
"DoCkKvbdaRfDIUGL",
"DoDKjvbdLrWlyuQz",
"DnbjjvbdZisHofaf",
"EObjjvbdhtydvrUb",
"DnbjjvbdRotHKGEX",
"EObjjvbdNeEThhkE",
"EPCjjvbdZtJJZESn",
"DoDKjvbdnPyxvLYb",
"EPDKjvbdeEoRbWbj",
"EOcLKvbdFxttaEXb",
"EObjjvbddwystRez",
"EPCjjvbdJpzEnenF",
"DnbkKvbdTppntuIN",
"EPCkKvbdTukpKUBR",
"DnbkKvbdhlFEOUcZ",
"EObkKvbdlhdUQuRa",
"DnbjjvbdkClKqHUg",
"EOcKjvbdqTtGqqkU",
"DncKjvbdtkwvaUBX",
"DoDKjvbdsQWOjCuf",
"DncLKvbdEKIJuwjA",
"DncKjvbdGLErcIMu",
"EOcLKvbdNPwpumfs",
"EObkKvbdnVUzLJrG",
"DoCkKvbdcTDKsdKB",
"DncKjvbdKRZdoFme",
"EOcLKvbdemFvgNKL",
"EPCkKvbdznopdblY",
"EPDLKvbdOYPVzdOU",
"DnbjjvbdsZlPsAhO",
"DoDLKvbdKCjDRKDY",
"DoCkKvbdhuZeXSVC",
"EPDKjvbdOSt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Dwb",
"DnbjjvbdZnnJFEzK",
"DoCkKvbdtcDUwWOo",
"DoCkKvbdlBMoNALA",
"EOcKjvbdNsUWHFUp",
"DoDLKvbdVUNUFlVj",
"DnbkKvbdhkdcnUcZ",
"DncLKvbdLiBkqYAS",
"EOcKjvbdzoPpdcLx",
"EPDKjvbdijGIJmXr",
"EOcKjvbdZisHofaf",
"DoDLKvbdeOdrkUUS",
"DoDLKvbdnPyxvKxb",
"EPDKjvbdIxUBhMRQ",
"DncLKvbdlhctRUqa",
"DoDLKvbdmgFXlnGy",
"DncKjvbdCJKbKiGK",
"EOcLKvbddndrjtUS",
"DnbjjvbdkDLjqGuH",
"DncKjvbdmIcsptqa",
"DoCkKvbdvvlAvBWV",
"EObjjvbdjblLQftg",
"DnbjjvbdCEQBWKMf",
"DnbjjvbdBdPaVilf",
"DoCkKvbdZxcjODLr",
"DoCkKvbdEObjjwCd",
"EPDKjvbdyTNhlqbH",
"EPCkKvbdUMVoAvPJ",
"DncKjvbdUxhUZjoO",
"DncKjvbdqqtjmkAm",
"DncKjvbdKfGICBRV",
"EPCjjvbdVrOXaeLc",
"EPDLKvbdwXLaWBWV",
"EPCkKvbdjblKqHUg",
"DnbjjvbduDCuWuoP",
"EPDKjvbdNGbpMouL",
"EObjjvbdBcoaVjNG",
"DncLKvbdrWpMDIxq",
"DncLKvbdhaoCdwRR",
"DnbkKvbdFxtuBDwb",
"DncKjvbdIjEAKPgE",
"EOcLKvbduCbuXVoP",
"DoDKjvbdZtIiZDsO",
"DnbjjvbdEztRElCi",
"DncLKvbdxmsHwsJD",
"DnbjjvbdRbEElIxk",
"DoDKjvbdWHwvXgYz",
"EOcKjvbdQlwbYnUz",
"EOcLKvbdVTltFkuj",
"DncKjvbdliETptqa",
"DnbkKvbddoErjtTr",
"DoCkKvbdgPazvdXh",
"DncKjvbdySmhlqag",
"DoCjjvbdbPgHDkzd",
"DoCkKvbdFWZPomKF",
"EObjjvbdssSSxydc",
"EObjjvbdzQnliJwA",
"EOb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dZLqdUNlN",
"EPCkKvbdiBncFWpq",
"DncLKvbdiCPDEvqR",
"EOcKjvbdUyHszKoO",
"DncKjvbdhtydvqtb",
"EPCjjvbdpxoHgQcx",
"EObkKvbdkWWnDaxX",
"DnbjjvbdBhkBkJFj",
"DoCkKvbdRacdkhyL",
"EOcLKvbdZjTHpHCG",
"EPCkKvbdMowqWOGs",
"DncLKvbdegjurNpg",
"EObjjvbdfMfWfmKL",
"EPDLKvbdZirgpGaf",
"DoDLKvbdiZuFlQnG",
"DncLKvbdFxuVAcxC",
"EObkKvbdZisHofaf",
"EOcKjvbdJSyBSmYM",
"EPDLKvbdVYgtZkPO",
"EOcKjvbdRbEFMJYk",
"DncLKvbdrEFIonWB",
"DncKjvbdKDJbqJcY",
"EOcLKvbdhfjCxuiu",
"EObjjvbdLLAhWAKZ",
"DoCkKvbdRXNcblID",
"DoDLKvbdcbSmSATm",
"EOcLKvbdwWlAvAuu",
"EObkKvbdiBnbdvpq",
"DoCkKvbdNQXpumgT",
"DncLKvbdkVwOECYX",
"DnbkKvbdfoazwDxI",
"DoDLKvbdbBWFFpPw",
"DoDLKvbdvBDxsPEh",
"EPDKjvbdJqZdoFme",
"DoDLKvbdIryArmXl",
"EPCjjvbdANIZSwZx",
"EPCkKvbdVhYVxGxz",
"DncKjvbdLAjgNCYR",
"DncKjvbdxxIjCQZk",
"DncKjvbdbiNKKewY",
"EPCjjvbdlrZVZsEJ",
"EPDKjvbdIryAsMwl",
"DoCkKvbdtAHRIAAr",
"EPDKjvbdJmAEZfuB",
"EPCkKvbdZjSgogBf",
"DoDLKvbdOXnuzcnU",
"DnbkKvbdehKvRnQg",
"EObjjvbdZyDimbkr",
"DoDKjvbdmajWwoOV",
"EOcKjvbdkMalZeHP",
"EOcKjvbdIjEAJpHE",
"EPCkKvbdDihKVxKA",
"DncKjvbdNddUIiKd",
"EObjjvbdqdFIpOWB",
"DoCkKvbdxnShXsJD",
"DoDLKvbdjmBkzEfo",
"EOcLKvbdatagYLTh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dhleR",
"DnbkKvbdsrqsZZeD",
"EObkKvbdrovPJbuf",
"EPCjjvbddeOqbXCj",
"EObjjvbdtcDVXVoP",
"DncKjvbdMfbpNQVL",
"DoCkKvbdhbPCeXQq",
"DoCkKvbdNHComQVL",
"EObjjvbdvBDxroFI",
"EPCjjvbdnBivwoNu",
"EObjjvbdbhljKewY",
"EPDKjvbdZyDimcMS",
"EObkKvbdWSOXbElD",
"EOcKjvbdTfznMXVe",
"EPCjjvbdZtJJYcsO",
"DoCjjvbdRjxfVHLT",
"DoCkKvbdVTltGMVj",
"DncKjvbdYfwEAOri",
"DncKjvbdYkrEUOMN",
"EObkKvbdqGEEsuaI",
"DncLKvbdjJfHimXr",
"EPDLKvbddndsLUTr",
"DnbkKvbdqBJFAWhE",
"EPDLKvbdEOcKjwDE",
"EPCkKvbdtvOYJqTA",
"DncLKvbdkyTRsZHU",
"DoCjjvbdTppnuVIN",
"DncLKvbdwyhFeweS",
"DncKjvbdsBelkgKy",
"DoCjjvbdKDKCqJcY",
"DoCjjvbdkClKqHVH",
"DoCjjvbdcTCjtDia",
"EPDLKvbdUVkpJtAq",
"EPDLKvbdRyjITCvA",
"DnbjjvbdJuuFcdgJ",
"DoDKjvbdrJAJdmOe",
"DncKjvbdJcJbqKCx",
"DoDLKvbdJcJbqJcY",
"DoDKjvbdeEoSCXDK",
"DoDLKvbdSwjlNzkY",
"EObjjvbdzitopDrt",
"DoCkKvbdKWVGEEgJ",
"DncKjvbdpssfqrKt",
"EOcLKvbdUMWPBVoJ",
"DncKjvbdyzdmrIIh",
"EPCjjvbdxUldqZLn",
"DoDLKvbdySnImRbH",
"DoCjjvbdGdKvJaij",
"DoCkKvbdxZgeewdr",
"EObkKvbdiLddNuDZ",
"DnbjjvbdSCDdkiZL",
"DncKjvbdznpREcMY",
"EOcLKvbdaRebhTfL",
"DnbjjvbdZQldiMdq",
"EPCjjvbdbrbjtEKB",
"EOcKjvbdEARiMzXX",
"DoDLKvbdXrkaNTnx",
"EPCkKvbdQZNAHTRj",
"DoDLKvbdEzspeLcJ",
"EPCjjvbduVnYKRTA",
"EObjjvbdJXtBhMQp",
"EPDKjvbdeOdrjssr",
"EPCjjvbdLqwMytpz",
"EPDKjvbdUMVoBVoJ",
"DncKjvbdRpUGifDw",
"EPDLKvbdZyDinDLr",
"DnbkKvbdNrsufeVQ",
"EPCkKvbdZMSDtNlN",
"EPCkKvbdySnJNSCH",
"EPCjjvbdfMevfljL",
"DncLKvbdXsMBNTnx",
"DnbkKvbdpxoHfqDx",
"DncLKvbdUQpntthN",
"DncKjvbdIsZArlwl",
"DoDLKvbdZGwEAOsJ",
"EOcKjvbdVvhwvDdg",
"EOcLKvbduWNxJqTA",
"EPCjjvbdHEKvJaij",
"DoDKjvbdrpWOjCuf",
"DncLKvbdrpWOjDVf",
"DoCjjvbdIHGzYwwg",
"DoDLKvbdpxoIGqEY",
"DoDLKvbdJcJbqKDY",
"DoCjjvbdRWmdClHc",
"EPCjjvbdFWYopNJe",
"DncKjvbdmfdwlmfy",
"DoCkKvbdxUleQxlO",
"EObjjvbdnGdxMnGy",
"EPCjjvbdvvlAvBVu",
"DncLKvbddndsKssr",
"EObjjvbdZMRcsnLm",
"EOcKjvbdFxttaEXb",
"DncKjvbdVUNTfMVj",
"EOcLKvbdNrtWHFUp",
"DoDKjvbdwuMdqYlO",
"EPDLKvbdrXPkbhxq",
"EObjjvbdrEFIpNua",
"EObjjvbdziuQQDrt",
"EOcLKvbdqYoIGpcx",
"DnbjjvbdsQVoJcVf",
"EObkKvbdkDMKpgUg",
"EObjjvbdvBDyTPFI",
"DncKjvbduCbuWvOo",
"EPCjjvbdkVvnECYX",
"DncLKvbdZGvdAOri",
"DoCkKvbdrXPlDJZR",
"EOcLKvbduCcVWvOo",
"DoDKjvbdCEPaWJlf",
"EPDKjvbddoErjssr",
"DncKjvbdACqxKZiQ",
"EPCjjvbdUVlPitAq",
"EPDKjvbdjJfHjMxS",
"EObkKvbdAMhYsWzY",
"DoDKjvbdnBivxOmu",
"EOcLKvbdbiNKKfXY",
"EPDKjvbdYqMeIleR",
"EObkKvbdJmADygUa",
"EObjjvbdEPDLLWcE",
"EPCjjvbdrXPkcIxq",
"EOcLKvbdliDtQtqa",
"DoCjjvbdmoyxujyC",
"EPDLKvbddoFTLTsr",
"EOcLKvbdCWzdJEpW",
"DnbjjvbdrEEhpOWB",
"DoDKjvbdZLrDtNkm",
"EOcLKvbdLFfHbAqV",
"EOcKjvbdmttzLKSG",
"EOcLKvbdmbJvwoOV",
"EOcKjvbdUaCQrqSZ",
"DnbjjvbdmgExMnGy",
"EPDKjvbddndrkUUS",
"EObkKvbdDwwkstTl",
"DoCkKvbdcJMjLFwY",
"DnbjjvbdaNLBruMg",
"DoDLKvbdQYmAHTRj",
"DnbkKvbdsQWOicWG",
"EObkKvbdMRwMzUpz",
"DoDLKvbdZshiZDrn",
"EPDLKvbdnPzYujxb",
"EOcKjvbdCEQAujMf",
"EPDLKvbdKefHbApu",
"DoDLKvbdYpldiNFR",
"DoCkKvbdFWZQQNJe",
"DncLKvbdznpQeCkx",
"EOcKjvbdnQZxvKxb",
"DoCkKvbdVBBprpqy",
"DnbkKvbdZirhPfaf",
"DnbkKvbdegjvSNqH",
"EOcLKvbdqdEiPnWB",
"EObjjvbdBhkCKiGK",
"EObjjvbdxZgfGYFS",
"DnbjjvbdNQYQumgT",
"EPCjjvbdxsNhlrBg",
"DoCkKvbdQdDApRDr",
"DoCkKvbdxxIiaoyk",
"EPDKjvbdFeirNhtR",
"DoCjjvbdegjvSOQg",
"EObkKvbdqcdiQNvB",
"DncLKvbdiMEdNtcZ",
"DncLKvbdTqRPUthN",
"EPCkKvbdwygeexFS",
"DoDKjvbdyTOJMrBg",
"DncLKvbdeEoRavbj",
"EPCjjvbdtbcUvvOo",
"EObjjvbdKCicRJcY",
"EObjjvbdZyEKODMS",
"DnbjjvbdmJDtQtrB",
"DncLKvbdEARhlyvw",
"DnbjjvbdIxTbILqQ",
"EOcLKvbdwygefYFS",
"D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BUBX",
"EObjjvbdNeEThhjd",
"DoCjjvbdirzhrkJz",
"DoDLKvbdaMkCTUlg",
"DncLKvbdWRnYBeLc",
"DnbjjvbdGBPRZJzm",
"EOcLKvbdeOeSjstS",
"DoDLKvbdmIctRVSB",
"DoCjjvbdZxdJnDMS",
"DoCkKvbdRpTgKFcw",
"DncLKvbdTukojTaR",
"DnbjjvbdKRZdoFme",
"DnbkKvbdURQoVUhN",
"DoDLKvbdyYJKBozL",
"EObkKvbdfNFwHMjL",
"DoDLKvbdZisIQHBf",
"EObkKvbdqFcdsuaI",
"DncLKvbdzoPqFDLx",
"DoDKjvbdSKxeuHLT",
"EPDKjvbdsBemLfjy",
"DoCjjvbdJbjCqJcY",
"DoCjjvbdNPxRVnGs",
"DncLKvbdGcjvJbKK",
"EOcKjvbdrWpMDIxq",
"EOcLKvbdQdDApQcr",
"DoDKjvbdZMRdTnLm",
"EOcLKvbddxZssrFz",
"EObjjvbdUtNTfLuj",
"EPCjjvbdLLBIWAKZ",
"DoCkKvbdgFlZmfgA",
"EPCjjvbdUVkoitAq",
"DoDKjvbdDncKjvcE",
"DoDLKvbdRpUHJfEX",
"EPDKjvbdLqvlzVQz",
"EPDKjvbdZMRdUOLm",
"EOcLKvbdCJLBkIfK",
"DncKjvbdaSFbhUFk",
"EPDLKvbdZoNheEzK",
"DncKjvbdUVlPjUAq",
"DnbkKvbdKNADyfuB",
"EObkKvbdZdwfzghb",
"EPDLKvbdZtIhxcrn",
"EObkKvbdGckViajK",
"DncLKvbdFfJqmiUR",
"DncKjvbdKWUfDdgJ",
"DoDKjvbdMtrqjmAX",
"EOcLKvbdsQWPKDVf",
"DoCjjvbdwtleRZMO",
"EObjjvbduaDxsPEh",
"EPDLKvbdKxqJrzuG",
"EOcKjvbdVAaprprZ",
"EObjjvbdEuxopMjF",
"DnbjjvbdyOTHwriD",
"EPDLKvbdrpVnibvG",
"EPDKjvbdkWWnDaww",
"DncLKvbdrXPkbiYq",
"DoDLKvbddxZssqez",
"EOcLKvbdHDkWJbJj",
"DncLKvbdEPCkLWcE",
"DnbkKvbdEXwkstTl",
"EObjjvbdqiAKEmOe",
"DncLKvbdjAQGaQGj",
"EPCjjvbdNeDtJJKd",
"EPCjjvbdvwMBWBVu",
"EPDKjvbdFejSOItR",
"EOcLKvbdNPwqWOHT",
"EPDKjvbdbsCjscia",
"EObkKvbdyYIiaoyk",
"DoDKjvbdLZQirzuG",
"EObjjvbdSLZGVGjs",
"DoCjjvbdAMgxsWzY",
"DoDLKvbdEObjjwCd",
"DnbkKvbdsPvOicWG",
"EPCkKvbdrJAKElne",
"EPCkKvbdauCGwjsh",
"DncLKvbdegkWRnQg",
"EPCkKvbdYpmEiNFR",
"DoDKjvbduaDxsPFI",
"DoCjjvbdcyxoxYqC",
"DoCkKvbdkMakzFHP",
"DnbjjvbdJbibqJbx",
"DnbkKvbdWWhxWDeH",
"DoCjjvbdssRsYzFD",
"DoDKjvbdpyPIHRDx",
"DncLKvbdwNWANDeN",
"DoDKjvbdJYUBglRQ",
"EObkKvbdXnRAYVVt",
"DoCjjvbdUWLpKTaR",
"DoDKjvbdTqROttgm",
"EPCkKvbdVqnXaeMD",
"EObjjvbdADRwiyiQ",
"DoDKjvbdlrZUyrci",
"EPDKjvbdvAdZSndh",
"DoCkKvbdzoQQeDLx",
"DnbkKvbdSQUGjFdX",
"EOcLKvbdqBJFAXIE",
"EObkKvbdSCEFLiZL",
"DnbjjvbdzoQQdcMY",
"DnbkKvbdpxngfqEY",
"DncLKvbdbsDLUEKB",
"DoCjjvbdXrlBMtOx",
"EObjjvbdKCjDQicY",
"DncLKvbdLrWlzUpz",
"EObjjvbdaaWEfQQX",
"EObjjvbdtlYWaTaX",
"DnbkKvbdMowpunGs",
"EObkKvbdSLYeuHKs",
"EObkKvbdTAEhhCOd",
"EPCkKvbdmSYtyrci",
"DncLKvbdYkqcsnLm",
"DoDLKvbdrylQTAgn",
"DncLKvbdJXtCIMRQ",
"EObkKvbdSBdElIyL",
"DoDLKvbdwygefYFS",
"DncKjvbdyXhibPzL",
"EPCjjvbduaDxsPFI",
"EObjjvbdZoNiFEzK",
"EPCjjvbdkNBkyeHP",
"EPCkKvbdWRnXadlD",
"DncLKvbdRWmdDLhD",
"DnbkKvbdmSYtzTDi",
"EOcKjvbdkVwODbXw",
"DncLKvbdQlxCZOUz",
"EObjjvbdbhlijfXY",
"EOcLKvbdXmqAXtut",
"EOcLKvbdmbKXXnnV",
"DoDKjvbdkHgMFfOL",
"EPCkKvbdfekymgHA",
"DoCjjvbdeKKRvUzn",
"DoDKjvbdkHfkefNk",
"DoCjjvbdyqPMiKXA",
"DnbjjvbdUQqOtuIN",
"EOcKjvbdEPCkKwDE",
"DoDLKvbdZRNFIleR",
"DnbjjvbdRacdlJZL",
"EOcLKvbdTukoitAq",
"EOcLKvbdZLrDtOMN",
"EOcLKvbdgKfzcGAE",
"EObjjvbdzjVQQESt",
"EOcLKvbdcIlijevx",
"EOcKjvbdGKdsDHmV",
"DncLKvbdKkBHvAJy",
"EOcKjvbdZMRctOLm",
"EPCkKvbdADRxKZiQ",
"EObjjvbdDwxLsssl",
"EPDLKvbdUxgszLPO",
"EPCkKvbdSQTfiedX",
"EPCjjvbdNeEUJIkE",
"DoDLKvbdpyPHfqDx",
"DnbkKvbdyOShXsJD",
"DncLKvbdLiBkpxAS",
"DoDKjvbdaaWEepQX",
"DoCjjvbdWSOYBeLc",
"EOcKjvbdLFegbAqV",
"EPDKjvbdffLzOGgA",
"EObkKvbdFkErbglu",
"DncLKvbdiZuFlROG",
"DncKjvbdegkWRnQg",
"DoDLKvbdQdDApRDr",
"EOcLKvbdeYZtURez",
"EObjjvbdrXQLcIxq",
"DoDLKvbdxZhGGXeS",
"DoDLKvbdGGKSOItR",
"EObjjvbdjhHLfFnL",
"EOcLKvbdUQpoUuHm",
"DoCkKvbdXrlBNUPY",
"DoDKjvbdJXtCIMRQ",
"DnbkKvbdZMSDsnLm",
"DncKjvbdCTBDUGWr",
"DncKjvbdbhlikGXY",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vbdmuVZkKSG",
"DncLKvbdSPsfjFdX",
"DoDLKvbdSQUHJedX",
"DoDKjvbdiVZdwSUb",
"EPDLKvbdRjxfVGkT",
"EObjjvbdmpZyVkZC",
"DncLKvbdhzUelROG",
"EPCkKvbdxVMeRZMO",
"EOcKjvbdxxIiapZk",
"EOcKjvbdJSyBTNYM",
"EPDKjvbdMSXMzUpz",
"EObkKvbdJmADzHVB" };
public static void main(java.lang.String[] unused) {
try {
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream("bad.out"));
for (int i = 0; i < strings.length; i++) {
out.write(strings[i].getBytes());
out.write("\n".getBytes());
}
out.close();
} catch (Exception e) {
System.out.println("Some exception occurred");
}
}
}
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* 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.
*
* 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.
*/
/*
* @test
* @bug 7158800
* @run shell/timeout=400 Test7158800.sh
* @summary This test performs poorly if alternate hashing isn't used for
* string table.
* The timeout is handled by the shell file (which kills the process)
*/
import java.util.*;
import java.io.*;
public class InternTest {
public static void main (String args[]) throws Exception {
final String badStringsFilename = "badstrings.txt";
if (args.length == 0 || (!args[0].equals("bad") && !args[0].equals("normal"))) {
System.out.println("Usage: java InternTest [normal|bad]");
System.exit(1);
}
FileInputStream fstream = new FileInputStream(badStringsFilename);
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String toIntern, toDiscard;
int count = 0;
long current = 0L;
long last = System.currentTimeMillis();
if (args[0].equals("bad")) {
while ((toIntern = br.readLine()) != null) {
toDiscard = new String((new Integer((int)(Math.random() * Integer.MAX_VALUE))).toString());
toIntern.intern();
count++;
if (count % 10000 == 0 && count != 0) {
current = System.currentTimeMillis();
System.out.println(new Date(current) + ": interned " + count + " 0-hash strings - last 10000 took " + ((float)(current - last))/1000 + "s (" + ((float)(current - last))/10000000 + "s per String)");
last = current;
}
}
}
if (args[0].equals("normal")) {
while ((toDiscard = br.readLine()) != null) { // do the same read from the file to try and make the test fair
toIntern = new String((new Integer((int)(Math.random() * Integer.MAX_VALUE))).toString());
toIntern.intern();
count++;
if (count % 10000 == 0 && count != 0) {
current = System.currentTimeMillis();
System.out.println(new Date(current) + ": interned " + count + " normal strings - last 10000 took " + ((float)(current - last))/1000 + "s (" + ((float)(current - last))/10000000 + "s per String)");
last = current;
}
}
}
in.close();
}
}
因为 它太大了无法显示 source diff 。你可以改为 查看blob
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册