< prev index next >

src/share/vm/classfile/stringTable.hpp

Print this page
rev 12679 : 8176593: Throwable::getStackTrace performance regression
Reviewed-by: jiangli, iklam, coleenp, sspitsyn

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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.

@@ -54,19 +54,26 @@
   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_in_main_table(int index, jchar* chars, int length, unsigned int hashValue);
-  static oop lookup_shared(jchar* name, int len);
+  static oop lookup_shared(jchar* name, int len, unsigned int hash);
 
   // Apply the give oop closure to the entries to the buckets
   // in the range [start_idx, end_idx).
   static void buckets_oops_do(OopClosure* f, int start_idx, int end_idx);
   // Unlink or apply the give oop closure to the entries to the buckets
   // in the range [start_idx, end_idx).
   static void buckets_unlink_or_oops_do(BoolObjectClosure* is_alive, OopClosure* f, int start_idx, int end_idx, int* processed, int* removed);
 
+  // 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);
+  static unsigned int hash_string(oop string);
+  static unsigned int alt_hash_string(const jchar* s, int len);
+
   StringTable() : RehashableHashtable<oop, mtSymbol>((int)StringTableSize,
                               sizeof (HashtableEntry<oop, mtSymbol>)) {}
 
   StringTable(HashtableBucket<mtSymbol>* t, int number_of_entries)
     : RehashableHashtable<oop, mtSymbol>((int)StringTableSize, sizeof (HashtableEntry<oop, mtSymbol>), t,

@@ -107,16 +114,10 @@
   static void possibly_parallel_unlink(BoolObjectClosure* cl, int* processed, int* removed) {
     possibly_parallel_unlink_or_oops_do(cl, NULL, processed, removed);
   }
   static void possibly_parallel_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);
-  static unsigned int hash_string(oop string);
-
   // Internal test.
   static void test_alt_hash() PRODUCT_RETURN;
 
   // Probing
   static oop lookup(Symbol* symbol);
< prev index next >