8216197: Remove unused new_hash methods
authorredestad
Mon, 07 Jan 2019 10:21:43 +0100
changeset 53156 488773472a63
parent 53155 c3d6035c11f3
child 53157 3d60a1696e19
8216197: Remove unused new_hash methods Reviewed-by: kbarrett, dholmes
src/hotspot/share/oops/metadata.hpp
src/hotspot/share/oops/oop.cpp
src/hotspot/share/oops/oop.hpp
src/hotspot/share/oops/symbol.cpp
src/hotspot/share/oops/symbol.hpp
--- a/src/hotspot/share/oops/metadata.hpp	Fri Jan 04 17:46:56 2019 +0100
+++ b/src/hotspot/share/oops/metadata.hpp	Mon Jan 07 10:21:43 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, 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
@@ -39,9 +39,6 @@
 
   int identity_hash()                { return (int)(uintptr_t)this; }
 
-  // Rehashing support for tables containing pointers to this
-  unsigned int new_hash(juint seed)   { ShouldNotReachHere();  return 0; }
-
   virtual bool is_metadata()           const volatile { return true; }
   virtual bool is_klass()              const volatile { return false; }
   virtual bool is_method()             const volatile { return false; }
--- a/src/hotspot/share/oops/oop.cpp	Fri Jan 04 17:46:56 2019 +0100
+++ b/src/hotspot/share/oops/oop.cpp	Mon Jan 07 10:21:43 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -97,21 +97,6 @@
   return ObjectSynchronizer::identity_hash_value_for(object);
 }
 
-// When String table needs to rehash
-unsigned int oopDesc::new_hash(juint seed) {
-  EXCEPTION_MARK;
-  ResourceMark rm;
-  int length;
-  jchar* chars = java_lang_String::as_unicode_string(this, length, THREAD);
-  if (chars != NULL) {
-    // Use alternate hashing algorithm on the string
-    return AltHashing::murmur3_32(seed, chars, length);
-  } else {
-    vm_exit_out_of_memory(length, OOM_MALLOC_ERROR, "unable to create Unicode strings for String table rehash");
-    return 0;
-  }
-}
-
 // used only for asserts and guarantees
 bool oopDesc::is_oop(oop obj, bool ignore_mark_word) {
   if (!Universe::heap()->is_oop(obj)) {
--- a/src/hotspot/share/oops/oop.hpp	Fri Jan 04 17:46:56 2019 +0100
+++ b/src/hotspot/share/oops/oop.hpp	Mon Jan 07 10:21:43 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -308,9 +308,6 @@
   inline intptr_t identity_hash();
   intptr_t slow_identity_hash();
 
-  // Alternate hashing code if string table is rehashed
-  unsigned int new_hash(juint seed);
-
   // marks are forwarded to stack when object is locked
   inline bool    has_displaced_mark_raw() const;
   inline markOop displaced_mark_raw() const;
--- a/src/hotspot/share/oops/symbol.cpp	Fri Jan 04 17:46:56 2019 +0100
+++ b/src/hotspot/share/oops/symbol.cpp	Mon Jan 07 10:21:43 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -212,13 +212,6 @@
   return str;
 }
 
-// Alternate hashing for unbalanced symbol tables.
-unsigned int Symbol::new_hash(juint seed) {
-  ResourceMark rm;
-  // Use alternate hashing algorithm on this symbol.
-  return AltHashing::murmur3_32(seed, (const jbyte*)as_C_string(), utf8_length());
-}
-
 // Increment refcount while checking for zero.  If the Symbol's refcount becomes zero
 // a thread could be concurrently removing the Symbol.  This is used during SymbolTable
 // lookup to avoid reviving a dead Symbol.
--- a/src/hotspot/share/oops/symbol.hpp	Fri Jan 04 17:46:56 2019 +0100
+++ b/src/hotspot/share/oops/symbol.hpp	Mon Jan 07 10:21:43 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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
@@ -164,9 +164,6 @@
            ((addr_bits ^ (length() << 8) ^ (( _body[0] << 8) | _body[1])) << 16);
   }
 
-  // For symbol table alternate hashing
-  unsigned int new_hash(juint seed);
-
   // Reference counting.  See comments above this class for when to use.
   int refcount() const { return extract_refcount(_length_and_refcount); }
   bool try_increment_refcount();