8223657: Remove unused THREAD argument from SymbolTable functions
authorcoleenp
Tue, 14 May 2019 11:29:18 -0400
changeset 54847 59ea39bb2809
parent 54846 e4049522b074
child 54848 5d8c5c7bca95
8223657: Remove unused THREAD argument from SymbolTable functions Summary: also made lookup and lookup_only functions private to SymbolTable. External callers use new_symbol or probe. Reviewed-by: dholmes, gziemski
src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
src/hotspot/cpu/s390/sharedRuntime_s390.cpp
src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp
src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp
src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp
src/hotspot/share/ci/ciEnv.cpp
src/hotspot/share/ci/ciReplay.cpp
src/hotspot/share/ci/ciSignature.cpp
src/hotspot/share/ci/ciSymbol.cpp
src/hotspot/share/classfile/classFileParser.cpp
src/hotspot/share/classfile/classListParser.cpp
src/hotspot/share/classfile/classLoader.cpp
src/hotspot/share/classfile/classLoaderData.cpp
src/hotspot/share/classfile/defaultMethods.cpp
src/hotspot/share/classfile/javaClasses.cpp
src/hotspot/share/classfile/javaClasses.hpp
src/hotspot/share/classfile/modules.cpp
src/hotspot/share/classfile/stackMapFrame.cpp
src/hotspot/share/classfile/symbolTable.cpp
src/hotspot/share/classfile/symbolTable.hpp
src/hotspot/share/classfile/systemDictionary.cpp
src/hotspot/share/classfile/verificationType.cpp
src/hotspot/share/classfile/verifier.cpp
src/hotspot/share/classfile/verifier.hpp
src/hotspot/share/classfile/vmSymbols.cpp
src/hotspot/share/compiler/compilerOracle.cpp
src/hotspot/share/compiler/methodMatcher.cpp
src/hotspot/share/interpreter/interpreterRuntime.cpp
src/hotspot/share/jfr/dcmd/jfrDcmds.cpp
src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp
src/hotspot/share/jfr/jni/jfrGetAllEventClasses.cpp
src/hotspot/share/jfr/jni/jfrJavaCall.cpp
src/hotspot/share/jfr/jni/jfrJavaCall.hpp
src/hotspot/share/jfr/jni/jfrJavaSupport.cpp
src/hotspot/share/jfr/jni/jfrUpcalls.cpp
src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleDescription.cpp
src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.cpp
src/hotspot/share/jfr/utilities/jfrJavaLog.cpp
src/hotspot/share/jfr/writers/jfrJavaEventWriter.cpp
src/hotspot/share/jvmci/compilerRuntime.cpp
src/hotspot/share/jvmci/jvmciCompilerToVM.cpp
src/hotspot/share/jvmci/jvmciEnv.cpp
src/hotspot/share/jvmci/jvmciJavaClasses.cpp
src/hotspot/share/jvmci/jvmciRuntime.cpp
src/hotspot/share/memory/heapShared.cpp
src/hotspot/share/memory/metaspaceShared.cpp
src/hotspot/share/memory/universe.cpp
src/hotspot/share/oops/instanceKlass.cpp
src/hotspot/share/oops/method.cpp
src/hotspot/share/oops/objArrayKlass.cpp
src/hotspot/share/oops/symbol.cpp
src/hotspot/share/oops/symbol.hpp
src/hotspot/share/oops/typeArrayKlass.cpp
src/hotspot/share/prims/jni.cpp
src/hotspot/share/prims/jvm.cpp
src/hotspot/share/prims/jvmtiImpl.cpp
src/hotspot/share/prims/methodHandles.cpp
src/hotspot/share/prims/nativeLookup.cpp
src/hotspot/share/prims/wbtestmethods/parserTests.cpp
src/hotspot/share/prims/whitebox.cpp
src/hotspot/share/runtime/deoptimization.cpp
src/hotspot/share/runtime/fieldType.cpp
src/hotspot/share/runtime/reflection.cpp
src/hotspot/share/runtime/signature.cpp
src/hotspot/share/runtime/signature.hpp
test/hotspot/gtest/classfile/test_symbolTable.cpp
--- a/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1413,7 +1413,6 @@
       out_sig_bt[argc++] = in_sig_bt[i];
     }
   } else {
-    Thread* THREAD = Thread::current();
     in_elem_bt = NEW_RESOURCE_ARRAY(BasicType, total_in_args);
     SignatureStream ss(method->signature());
     for (int i = 0; i < total_in_args ; i++ ) {
@@ -1421,7 +1420,7 @@
         // Arrays are passed as int, elem* pair
         out_sig_bt[argc++] = T_INT;
         out_sig_bt[argc++] = T_ADDRESS;
-        Symbol* atype = ss.as_symbol(CHECK_NULL);
+        Symbol* atype = ss.as_symbol();
         const char* at = atype->as_C_string();
         if (strlen(at) == 2) {
           assert(at[0] == '[', "must be");
--- a/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp	Tue May 14 11:29:18 2019 -0400
@@ -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.
  * Copyright (c) 2012, 2018 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -1908,14 +1908,13 @@
       out_sig_bt[argc++] = in_sig_bt[i];
     }
   } else {
-    Thread* THREAD = Thread::current();
     in_elem_bt = NEW_RESOURCE_ARRAY(BasicType, total_c_args);
     SignatureStream ss(method->signature());
     int o = 0;
     for (int i = 0; i < total_in_args ; i++, o++) {
       if (in_sig_bt[i] == T_ARRAY) {
         // Arrays are passed as int, elem* pair
-        Symbol* atype = ss.as_symbol(CHECK_NULL);
+        Symbol* atype = ss.as_symbol();
         const char* at = atype->as_C_string();
         if (strlen(at) == 2) {
           assert(at[0] == '[', "must be");
--- a/src/hotspot/cpu/s390/sharedRuntime_s390.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/cpu/s390/sharedRuntime_s390.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2016, 2018 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -1618,14 +1618,13 @@
       out_sig_bt[argc++] = in_sig_bt[i];
     }
   } else {
-    Thread* THREAD = Thread::current();
     in_elem_bt = NEW_RESOURCE_ARRAY(BasicType, total_in_args);
     SignatureStream ss(method->signature());
     int o = 0;
     for (int i = 0; i < total_in_args; i++, o++) {
       if (in_sig_bt[i] == T_ARRAY) {
         // Arrays are passed as tuples (int, elem*).
-        Symbol* atype = ss.as_symbol(CHECK_NULL);
+        Symbol* atype = ss.as_symbol();
         const char* at = atype->as_C_string();
         if (strlen(at) == 2) {
           assert(at[0] == '[', "must be");
--- a/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -1906,7 +1906,7 @@
         // Arrays are passed as int, elem* pair
         out_sig_bt[argc++] = T_INT;
         out_sig_bt[argc++] = T_ADDRESS;
-        Symbol* atype = ss.as_symbol(CHECK_NULL);
+        Symbol* atype = ss.as_symbol();
         const char* at = atype->as_C_string();
         if (strlen(at) == 2) {
           assert(at[0] == '[', "must be");
--- a/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/cpu/x86/sharedRuntime_x86_32.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -1593,7 +1593,6 @@
       out_sig_bt[argc++] = in_sig_bt[i];
     }
   } else {
-    Thread* THREAD = Thread::current();
     in_elem_bt = NEW_RESOURCE_ARRAY(BasicType, total_in_args);
     SignatureStream ss(method->signature());
     for (int i = 0; i < total_in_args ; i++ ) {
@@ -1601,7 +1600,7 @@
         // Arrays are passed as int, elem* pair
         out_sig_bt[argc++] = T_INT;
         out_sig_bt[argc++] = T_ADDRESS;
-        Symbol* atype = ss.as_symbol(CHECK_NULL);
+        Symbol* atype = ss.as_symbol();
         const char* at = atype->as_C_string();
         if (strlen(at) == 2) {
           assert(at[0] == '[', "must be");
--- a/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -1971,7 +1971,6 @@
       out_sig_bt[argc++] = in_sig_bt[i];
     }
   } else {
-    Thread* THREAD = Thread::current();
     in_elem_bt = NEW_RESOURCE_ARRAY(BasicType, total_in_args);
     SignatureStream ss(method->signature());
     for (int i = 0; i < total_in_args ; i++ ) {
@@ -1979,7 +1978,7 @@
         // Arrays are passed as int, elem* pair
         out_sig_bt[argc++] = T_INT;
         out_sig_bt[argc++] = T_ADDRESS;
-        Symbol* atype = ss.as_symbol(CHECK_NULL);
+        Symbol* atype = ss.as_symbol();
         const char* at = atype->as_C_string();
         if (strlen(at) == 2) {
           assert(at[0] == '[', "must be");
--- a/src/hotspot/share/ci/ciEnv.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/ci/ciEnv.cpp	Tue May 14 11:29:18 2019 -0400
@@ -405,8 +405,7 @@
     // This is a name from a signature.  Strip off the trimmings.
     // Call recursive to keep scope of strippedsym.
     TempNewSymbol strippedsym = SymbolTable::new_symbol(sym->as_utf8()+1,
-                    sym->utf8_length()-2,
-                    KILL_COMPILE_ON_FATAL_(_unloaded_ciinstance_klass));
+                                                        sym->utf8_length()-2);
     ciSymbol* strippedname = get_symbol(strippedsym);
     return get_klass_by_name_impl(accessing_klass, cpool, strippedname, require_local);
   }
@@ -459,8 +458,7 @@
     // We have an unloaded array.
     // Build it on the fly if the element class exists.
     TempNewSymbol elem_sym = SymbolTable::new_symbol(sym->as_utf8()+1,
-                                                 sym->utf8_length()-1,
-                                                 KILL_COMPILE_ON_FATAL_(fail_type));
+                                                     sym->utf8_length()-1);
 
     // Get element ciKlass recursively.
     ciKlass* elem_klass =
--- a/src/hotspot/share/ci/ciReplay.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/ci/ciReplay.cpp	Tue May 14 11:29:18 2019 -0400
@@ -336,7 +336,7 @@
   Symbol* parse_symbol(TRAPS) {
     const char* str = parse_escaped_string();
     if (str != NULL) {
-      Symbol* sym = SymbolTable::lookup(str, (int)strlen(str), CHECK_NULL);
+      Symbol* sym = SymbolTable::new_symbol(str);
       return sym;
     }
     return NULL;
@@ -345,7 +345,7 @@
   // Parse a valid klass name and look it up
   Klass* parse_klass(TRAPS) {
     const char* str = parse_escaped_string();
-    Symbol* klass_name = SymbolTable::lookup(str, (int)strlen(str), CHECK_NULL);
+    Symbol* klass_name = SymbolTable::new_symbol(str);
     if (klass_name != NULL) {
       Klass* k = NULL;
       if (_iklass != NULL) {
@@ -371,7 +371,7 @@
 
   // Lookup a klass
   Klass* resolve_klass(const char* klass, TRAPS) {
-    Symbol* klass_name = SymbolTable::lookup(klass, (int)strlen(klass), CHECK_NULL);
+    Symbol* klass_name = SymbolTable::new_symbol(klass);
     return SystemDictionary::resolve_or_fail(klass_name, _loader, _protection_domain, true, THREAD);
   }
 
@@ -800,8 +800,8 @@
     const char* field_name = parse_escaped_string();
     const char* field_signature = parse_string();
     fieldDescriptor fd;
-    Symbol* name = SymbolTable::lookup(field_name, (int)strlen(field_name), CHECK);
-    Symbol* sig = SymbolTable::lookup(field_signature, (int)strlen(field_signature), CHECK);
+    Symbol* name = SymbolTable::new_symbol(field_name);
+    Symbol* sig = SymbolTable::new_symbol(field_signature);
     if (!k->find_local_field(name, sig, &fd) ||
         !fd.is_static() ||
         fd.has_initial_value()) {
--- a/src/hotspot/share/ci/ciSignature.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/ci/ciSignature.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -58,16 +58,9 @@
     if (!ss.is_object()) {
       type = ciType::make(ss.type());
     } else {
-      Symbol* name = ss.as_symbol(THREAD);
-      if (HAS_PENDING_EXCEPTION) {
-        type = ss.is_array() ? (ciType*)ciEnv::unloaded_ciobjarrayklass()
-          : (ciType*)ciEnv::unloaded_ciinstance_klass();
-        env->record_out_of_memory_failure();
-        CLEAR_PENDING_EXCEPTION;
-      } else {
-        ciSymbol* klass_name = env->get_symbol(name);
-        type = env->get_klass_by_name_impl(_accessing_klass, cpool, klass_name, false);
-      }
+      Symbol* name = ss.as_symbol();
+      ciSymbol* klass_name = env->get_symbol(name);
+      type = env->get_klass_by_name_impl(_accessing_klass, cpool, klass_name, false);
     }
     _types->append(type);
     if (ss.at_return_type()) {
--- a/src/hotspot/share/ci/ciSymbol.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/ci/ciSymbol.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -132,12 +132,7 @@
 // Make a ciSymbol from a C string (implementation).
 ciSymbol* ciSymbol::make_impl(const char* s) {
   EXCEPTION_CONTEXT;
-  TempNewSymbol sym = SymbolTable::new_symbol(s, THREAD);
-  if (HAS_PENDING_EXCEPTION) {
-    CLEAR_PENDING_EXCEPTION;
-    CURRENT_THREAD_ENV->record_out_of_memory_failure();
-    return ciEnv::_unloaded_cisymbol;
-  }
+  TempNewSymbol sym = SymbolTable::new_symbol(s);
   return CURRENT_THREAD_ENV->get_symbol(sym);
 }
 
--- a/src/hotspot/share/classfile/classFileParser.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/classFileParser.cpp	Tue May 14 11:29:18 2019 -0400
@@ -335,8 +335,7 @@
                                      names,
                                      lengths,
                                      indices,
-                                     hashValues,
-                                     CHECK);
+                                     hashValues);
             names_count = 0;
           }
         } else {
@@ -373,8 +372,7 @@
                              names,
                              lengths,
                              indices,
-                             hashValues,
-                             CHECK);
+                             hashValues);
   }
 
   // Copy _current pointer of local copy back to stream.
@@ -823,7 +821,7 @@
         guarantee_property(java_lang_String::is_instance(patch()),
                            "Illegal class patch at %d in class file %s",
                            index, CHECK);
-        Symbol* const name = java_lang_String::as_symbol(patch(), CHECK);
+        Symbol* const name = java_lang_String::as_symbol(patch());
         patch_class(cp, index, NULL, name);
       }
       break;
@@ -5723,7 +5721,7 @@
     // The new class name is created with a refcount of one. When installed into the InstanceKlass,
     // it'll be two and when the ClassFileParser destructor runs, it'll go back to one and get deleted
     // when the class is unloaded.
-    _class_name = SymbolTable::new_symbol(new_anon_name, symbol_len, CHECK);
+    _class_name = SymbolTable::new_symbol(new_anon_name, symbol_len);
   }
 }
 
--- a/src/hotspot/share/classfile/classListParser.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/classListParser.cpp	Tue May 14 11:29:18 2019 -0400
@@ -326,8 +326,7 @@
 }
 
 Klass* ClassListParser::load_current_class(TRAPS) {
-  TempNewSymbol class_name_symbol = SymbolTable::new_symbol(_class_name, THREAD);
-  guarantee(!HAS_PENDING_EXCEPTION, "Exception creating a symbol.");
+  TempNewSymbol class_name_symbol = SymbolTable::new_symbol(_class_name);
 
   Klass *klass = NULL;
   if (!is_loading_from_source()) {
--- a/src/hotspot/share/classfile/classLoader.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/classLoader.cpp	Tue May 14 11:29:18 2019 -0400
@@ -244,7 +244,7 @@
     return NULL;
   }
   PackageEntryTable* pkgEntryTable = loader_data->packages();
-  TempNewSymbol pkg_symbol = SymbolTable::new_symbol(pkg_name, CHECK_NULL);
+  TempNewSymbol pkg_symbol = SymbolTable::new_symbol(pkg_name);
   return pkgEntryTable->lookup_only(pkg_symbol);
 }
 
@@ -646,7 +646,7 @@
 
   for (int i = 0; i < num_of_entries; i++) {
     const char* module_name = (patch_mod_args->at(i))->module_name();
-    Symbol* const module_sym = SymbolTable::lookup(module_name, (int)strlen(module_name), CHECK);
+    Symbol* const module_sym = SymbolTable::new_symbol(module_name);
     assert(module_sym != NULL, "Failed to obtain Symbol for module name");
     ModuleClassPathList* module_cpl = new ModuleClassPathList(module_sym);
 
@@ -1126,7 +1126,7 @@
   const char *cp = package_from_name(fullq_class_name);
   if (cp != NULL) {
     PackageEntryTable* pkg_entry_tbl = ClassLoaderData::the_null_class_loader_data()->packages();
-    TempNewSymbol pkg_symbol = SymbolTable::new_symbol(cp, CHECK_false);
+    TempNewSymbol pkg_symbol = SymbolTable::new_symbol(cp);
     PackageEntry* pkg_entry = pkg_entry_tbl->lookup_only(pkg_symbol);
     if (pkg_entry != NULL) {
       assert(classpath_index != -1, "Unexpected classpath_index");
@@ -1141,7 +1141,7 @@
 oop ClassLoader::get_system_package(const char* name, TRAPS) {
   // Look up the name in the boot loader's package entry table.
   if (name != NULL) {
-    TempNewSymbol package_sym = SymbolTable::new_symbol(name, (int)strlen(name), CHECK_NULL);
+    TempNewSymbol package_sym = SymbolTable::new_symbol(name);
     // Look for the package entry in the boot loader's package entry table.
     PackageEntry* package =
       ClassLoaderData::the_null_class_loader_data()->packages()->lookup_only(package_sym);
--- a/src/hotspot/share/classfile/classLoaderData.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/classLoaderData.cpp	Tue May 14 11:29:18 2019 -0400
@@ -108,8 +108,7 @@
     const char* cl_instance_name = java_lang_String::as_utf8_string(cl_name);
 
     if (cl_instance_name != NULL && cl_instance_name[0] != '\0') {
-      // Can't throw InternalError and SymbolTable doesn't throw OOM anymore.
-      _name = SymbolTable::new_symbol(cl_instance_name, CATCH);
+      _name = SymbolTable::new_symbol(cl_instance_name);
     }
   }
 
@@ -125,8 +124,7 @@
                   (cl_name_and_id == NULL) ? _class_loader_klass->external_name() :
                                              java_lang_String::as_utf8_string(cl_name_and_id);
   assert(cl_instance_name_and_id != NULL && cl_instance_name_and_id[0] != '\0', "class loader has no name and id");
-  // Can't throw InternalError and SymbolTable doesn't throw OOM anymore.
-  _name_and_id = SymbolTable::new_symbol(cl_instance_name_and_id, CATCH);
+  _name_and_id = SymbolTable::new_symbol(cl_instance_name_and_id);
 }
 
 ClassLoaderData::ClassLoaderData(Handle h_class_loader, bool is_unsafe_anonymous) :
--- a/src/hotspot/share/classfile/defaultMethods.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/defaultMethods.cpp	Tue May 14 11:29:18 2019 -0400
@@ -459,7 +459,7 @@
 };
 
 Symbol* MethodFamily::generate_no_defaults_message(TRAPS) const {
-  return SymbolTable::new_symbol("No qualifying defaults found", THREAD);
+  return SymbolTable::new_symbol("No qualifying defaults found");
 }
 
 Symbol* MethodFamily::generate_method_message(Symbol *klass_name, Method* method, TRAPS) const {
@@ -472,7 +472,7 @@
   ss.write((const char*)name->bytes(), name->utf8_length());
   ss.write((const char*)signature->bytes(), signature->utf8_length());
   ss.print(" is abstract");
-  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
+  return SymbolTable::new_symbol(ss.base(), (int)ss.size());
 }
 
 Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods, TRAPS) const {
@@ -487,7 +487,7 @@
     ss.print(".");
     ss.write((const char*)name->bytes(), name->utf8_length());
   }
-  return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
+  return SymbolTable::new_symbol(ss.base(), (int)ss.size());
 }
 
 
--- a/src/hotspot/share/classfile/javaClasses.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/javaClasses.cpp	Tue May 14 11:29:18 2019 -0400
@@ -569,19 +569,19 @@
   return result;
 }
 
-Symbol* java_lang_String::as_symbol(oop java_string, TRAPS) {
+Symbol* java_lang_String::as_symbol(oop java_string) {
   typeArrayOop value  = java_lang_String::value(java_string);
   int          length = java_lang_String::length(java_string, value);
   bool      is_latin1 = java_lang_String::is_latin1(java_string);
   if (!is_latin1) {
     jchar* base = (length == 0) ? NULL : value->char_at_addr(0);
-    Symbol* sym = SymbolTable::lookup_unicode(base, length, THREAD);
+    Symbol* sym = SymbolTable::new_symbol(base, length);
     return sym;
   } else {
     ResourceMark rm;
     jbyte* position = (length == 0) ? NULL : value->byte_at_addr(0);
     const char* base = UNICODE::as_utf8(position, length);
-    Symbol* sym = SymbolTable::lookup(base, length, THREAD);
+    Symbol* sym = SymbolTable::new_symbol(base, length);
     return sym;
   }
 }
@@ -1443,7 +1443,7 @@
   if (is_instance)  st->print(";");
 }
 
-Symbol* java_lang_Class::as_signature(oop java_class, bool intern_if_not_found, TRAPS) {
+Symbol* java_lang_Class::as_signature(oop java_class, bool intern_if_not_found) {
   assert(java_lang_Class::is_instance(java_class), "must be a Class object");
   Symbol* name;
   if (is_primitive(java_class)) {
@@ -1464,7 +1464,7 @@
       if (!intern_if_not_found) {
         name = SymbolTable::probe(sigstr, siglen);
       } else {
-        name = SymbolTable::new_symbol(sigstr, siglen, THREAD);
+        name = SymbolTable::new_symbol(sigstr, siglen);
       }
     }
   }
@@ -1895,7 +1895,7 @@
   PRESERVE_EXCEPTION_MARK;  // Keep original exception
   oop detailed_message = java_lang_Throwable::message(throwable);
   if (detailed_message != NULL) {
-    return java_lang_String::as_symbol(detailed_message, THREAD);
+    return java_lang_String::as_symbol(detailed_message);
   }
   return NULL;
 }
@@ -3703,7 +3703,7 @@
   java_lang_Class::print_signature(rtype(mt), st);
 }
 
-Symbol* java_lang_invoke_MethodType::as_signature(oop mt, bool intern_if_not_found, TRAPS) {
+Symbol* java_lang_invoke_MethodType::as_signature(oop mt, bool intern_if_not_found) {
   ResourceMark rm;
   stringStream buffer(128);
   print_signature(mt, &buffer);
@@ -3713,7 +3713,7 @@
   if (!intern_if_not_found) {
     name = SymbolTable::probe(sigstr, siglen);
   } else {
-    name = SymbolTable::new_symbol(sigstr, siglen, THREAD);
+    name = SymbolTable::new_symbol(sigstr, siglen);
   }
   return name;
 }
@@ -4375,11 +4375,11 @@
 bool JavaClasses::check_offset(const char *klass_name, int hardcoded_offset, const char *field_name, const char* field_sig) {
   EXCEPTION_MARK;
   fieldDescriptor fd;
-  TempNewSymbol klass_sym = SymbolTable::new_symbol(klass_name, CATCH);
+  TempNewSymbol klass_sym = SymbolTable::new_symbol(klass_name);
   Klass* k = SystemDictionary::resolve_or_fail(klass_sym, true, CATCH);
   InstanceKlass* ik = InstanceKlass::cast(k);
-  TempNewSymbol f_name = SymbolTable::new_symbol(field_name, CATCH);
-  TempNewSymbol f_sig  = SymbolTable::new_symbol(field_sig, CATCH);
+  TempNewSymbol f_name = SymbolTable::new_symbol(field_name);
+  TempNewSymbol f_sig  = SymbolTable::new_symbol(field_sig);
   if (!ik->find_local_field(f_name, f_sig, &fd)) {
     tty->print_cr("Nonstatic field %s.%s not found", klass_name, field_name);
     return false;
--- a/src/hotspot/share/classfile/javaClasses.hpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/javaClasses.hpp	Tue May 14 11:29:18 2019 -0400
@@ -205,7 +205,7 @@
   static Handle internalize_classname(Handle java_string, TRAPS) { return char_converter(java_string, '.', '/', THREAD); }
 
   // Conversion
-  static Symbol* as_symbol(oop java_string, TRAPS);
+  static Symbol* as_symbol(oop java_string);
   static Symbol* as_symbol_or_null(oop java_string);
 
   // Testers
@@ -291,7 +291,7 @@
   static Klass* as_Klass_raw(oop java_class);
   static void set_klass(oop java_class, Klass* klass);
   static BasicType as_BasicType(oop java_class, Klass** reference_klass = NULL);
-  static Symbol* as_signature(oop java_class, bool intern_if_not_found, TRAPS);
+  static Symbol* as_signature(oop java_class, bool intern_if_not_found);
   static void print_signature(oop java_class, outputStream *st);
   static const char* as_external_name(oop java_class);
   // Testing
@@ -1166,7 +1166,7 @@
   static int            ptype_slot_count(oop mt);  // extra counts for long/double
   static int            rtype_slot_count(oop mt);  // extra counts for long/double
 
-  static Symbol*        as_signature(oop mt, bool intern_if_not_found, TRAPS);
+  static Symbol*        as_signature(oop mt, bool intern_if_not_found);
   static void           print_signature(oop mt, outputStream* st);
 
   static bool is_instance(oop obj);
--- a/src/hotspot/share/classfile/modules.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/modules.cpp	Tue May 14 11:29:18 2019 -0400
@@ -111,7 +111,7 @@
 static PackageEntry* get_package_entry(ModuleEntry* module_entry, const char* package_name, TRAPS) {
   ResourceMark rm(THREAD);
   if (package_name == NULL) return NULL;
-  TempNewSymbol pkg_symbol = SymbolTable::new_symbol(package_name, CHECK_NULL);
+  TempNewSymbol pkg_symbol = SymbolTable::new_symbol(package_name);
   PackageEntryTable* package_entry_table = module_entry->loader_data()->packages();
   assert(package_entry_table != NULL, "Unexpected null package entry table");
   return package_entry_table->lookup_only(pkg_symbol);
@@ -148,7 +148,7 @@
   const char* module_version = get_module_version(version);
   TempNewSymbol version_symbol;
   if (module_version != NULL) {
-    version_symbol = SymbolTable::new_symbol(module_version, CHECK);
+    version_symbol = SymbolTable::new_symbol(module_version);
   } else {
     version_symbol = NULL;
   }
@@ -160,7 +160,7 @@
     module_location =
       java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(location));
     if (module_location != NULL) {
-      location_symbol = SymbolTable::new_symbol(module_location, CHECK);
+      location_symbol = SymbolTable::new_symbol(module_location);
     }
   }
 
@@ -173,7 +173,7 @@
       THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
                 err_msg("Invalid package name: %s for module: " JAVA_BASE_NAME, package_name));
     }
-    Symbol* pkg_symbol = SymbolTable::new_symbol(package_name, CHECK);
+    Symbol* pkg_symbol = SymbolTable::new_symbol(package_name);
     pkg_list->append(pkg_symbol);
   }
 
@@ -345,7 +345,7 @@
       THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), message);
     }
 
-    Symbol* pkg_symbol = SymbolTable::new_symbol(package_name, CHECK);
+    Symbol* pkg_symbol = SymbolTable::new_symbol(package_name);
     pkg_list->append(pkg_symbol);
   }
 
@@ -353,14 +353,14 @@
   assert(module_table != NULL, "module entry table shouldn't be null");
 
   // Create symbol* entry for module name.
-  TempNewSymbol module_symbol = SymbolTable::new_symbol(module_name, CHECK);
+  TempNewSymbol module_symbol = SymbolTable::new_symbol(module_name);
 
   bool dupl_modules = false;
 
   // Create symbol* entry for module version.
   TempNewSymbol version_symbol;
   if (module_version != NULL) {
-    version_symbol = SymbolTable::new_symbol(module_version, CHECK);
+    version_symbol = SymbolTable::new_symbol(module_version);
   } else {
     version_symbol = NULL;
   }
@@ -372,7 +372,7 @@
     module_location =
       java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(location));
     if (module_location != NULL) {
-      location_symbol = SymbolTable::new_symbol(module_location, CHECK);
+      location_symbol = SymbolTable::new_symbol(module_location);
     }
   }
 
@@ -657,7 +657,7 @@
   if (strlen(package_name) == 0) {
     return NULL;
   }
-  TempNewSymbol package_sym = SymbolTable::new_symbol(package_name, CHECK_NULL);
+  TempNewSymbol package_sym = SymbolTable::new_symbol(package_name);
   const PackageEntry* const pkg_entry =
     get_package_entry_by_name(package_sym, h_loader, THREAD);
   const ModuleEntry* const module_entry = (pkg_entry != NULL ? pkg_entry->module() : NULL);
--- a/src/hotspot/share/classfile/stackMapFrame.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/stackMapFrame.cpp	Tue May 14 11:29:18 2019 -0400
@@ -92,8 +92,7 @@
   // local num may be greater than size of parameters because long/double occupies two slots
   while(!ss.at_return_type()) {
     init_local_num += _verifier->change_sig_to_verificationType(
-      &ss, &_locals[init_local_num],
-      CHECK_VERIFY_(verifier(), VerificationType::bogus_type()));
+      &ss, &_locals[init_local_num]);
     ss.next();
   }
   _locals_size = init_local_num;
@@ -102,13 +101,12 @@
     case T_OBJECT:
     case T_ARRAY:
     {
-      Symbol* sig = ss.as_symbol(CHECK_(VerificationType::bogus_type()));
+      Symbol* sig = ss.as_symbol();
       if (!sig->is_permanent()) {
         // Create another symbol to save as signature stream unreferences
         // this symbol.
         Symbol *sig_copy =
-          verifier()->create_temporary_symbol(sig, 0, sig->utf8_length(),
-        CHECK_(VerificationType::bogus_type()));
+          verifier()->create_temporary_symbol(sig, 0, sig->utf8_length());
         assert(sig_copy == sig, "symbols don't match");
         sig = sig_copy;
       }
--- a/src/hotspot/share/classfile/symbolTable.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/symbolTable.cpp	Tue May 14 11:29:18 2019 -0400
@@ -195,7 +195,7 @@
   Service_lock->notify_all();
 }
 
-Symbol* SymbolTable::allocate_symbol(const char* name, int len, bool c_heap, TRAPS) {
+Symbol* SymbolTable::allocate_symbol(const char* name, int len, bool c_heap) {
   assert (len <= Symbol::max_length(), "should be checked by caller");
 
   Symbol* sym;
@@ -204,12 +204,12 @@
   }
   if (c_heap) {
     // refcount starts as 1
-    sym = new (len, THREAD) Symbol((const u1*)name, len, 1);
+    sym = new (len) Symbol((const u1*)name, len, 1);
     assert(sym != NULL, "new should call vm_exit_out_of_memory if C_HEAP is exhausted");
   } else {
     // Allocate to global arena
     MutexLocker ml(SymbolArena_lock, Mutex::_no_safepoint_check_flag); // Protect arena
-    sym = new (len, arena(), THREAD) Symbol((const u1*)name, len, PERM_REFCOUNT);
+    sym = new (len, arena()) Symbol((const u1*)name, len, PERM_REFCOUNT);
   }
   return sym;
 }
@@ -317,25 +317,26 @@
   return sym;
 }
 
-Symbol* SymbolTable::lookup(const char* name, int len, TRAPS) {
+Symbol* SymbolTable::new_symbol(const char* name, int len) {
   unsigned int hash = hash_symbol(name, len, SymbolTable::_alt_hash);
   Symbol* sym = SymbolTable::the_table()->lookup_common(name, len, hash);
   if (sym == NULL) {
-    sym = SymbolTable::the_table()->do_add_if_needed(name, len, hash, true, CHECK_NULL);
+    sym = SymbolTable::the_table()->do_add_if_needed(name, len, hash, true);
   }
   assert(sym->refcount() != 0, "lookup should have incremented the count");
   assert(sym->equals(name, len), "symbol must be properly initialized");
   return sym;
 }
 
-Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
+Symbol* SymbolTable::new_symbol(const Symbol* sym, int begin, int end) {
+  assert(begin <= end && end <= sym->utf8_length(), "just checking");
   assert(sym->refcount() != 0, "require a valid symbol");
   const char* name = (const char*)sym->base() + begin;
   int len = end - begin;
   unsigned int hash = hash_symbol(name, len, SymbolTable::_alt_hash);
   Symbol* found = SymbolTable::the_table()->lookup_common(name, len, hash);
   if (found == NULL) {
-    found = SymbolTable::the_table()->do_add_if_needed(name, len, hash, true, THREAD);
+    found = SymbolTable::the_table()->do_add_if_needed(name, len, hash, true);
   }
   return found;
 }
@@ -347,8 +348,8 @@
   int _len;
   const char* _str;
 public:
-  SymbolTableLookup(Thread* thread, const char* key, int len, uintx hash)
-  : _thread(thread), _hash(hash), _len(len), _str(key) {}
+  SymbolTableLookup(const char* key, int len, uintx hash)
+  : _hash(hash), _len(len), _str(key) {}
   uintx get_hash() const {
     return _hash;
   }
@@ -388,7 +389,7 @@
 
 Symbol* SymbolTable::do_lookup(const char* name, int len, uintx hash) {
   Thread* thread = Thread::current();
-  SymbolTableLookup lookup(thread, name, len, hash);
+  SymbolTableLookup lookup(name, len, hash);
   SymbolTableGet stg;
   bool rehash_warning = false;
   _local_table->get(thread, lookup, stg, &rehash_warning);
@@ -406,23 +407,23 @@
 // Suggestion: Push unicode-based lookup all the way into the hashing
 // and probing logic, so there is no need for convert_to_utf8 until
 // an actual new Symbol* is created.
-Symbol* SymbolTable::lookup_unicode(const jchar* name, int utf16_length, TRAPS) {
+Symbol* SymbolTable::new_symbol(const jchar* name, int utf16_length) {
   int utf8_length = UNICODE::utf8_length((jchar*) name, utf16_length);
   char stack_buf[ON_STACK_BUFFER_LENGTH];
   if (utf8_length < (int) sizeof(stack_buf)) {
     char* chars = stack_buf;
     UNICODE::convert_to_utf8(name, utf16_length, chars);
-    return lookup(chars, utf8_length, THREAD);
+    return new_symbol(chars, utf8_length);
   } else {
-    ResourceMark rm(THREAD);
+    ResourceMark rm;
     char* chars = NEW_RESOURCE_ARRAY(char, utf8_length + 1);
     UNICODE::convert_to_utf8(name, utf16_length, chars);
-    return lookup(chars, utf8_length, THREAD);
+    return new_symbol(chars, utf8_length);
   }
 }
 
 Symbol* SymbolTable::lookup_only_unicode(const jchar* name, int utf16_length,
-                                           unsigned int& hash) {
+                                         unsigned int& hash) {
   int utf8_length = UNICODE::utf8_length((jchar*) name, utf16_length);
   char stack_buf[ON_STACK_BUFFER_LENGTH];
   if (utf8_length < (int) sizeof(stack_buf)) {
@@ -439,32 +440,33 @@
 
 void SymbolTable::new_symbols(ClassLoaderData* loader_data, const constantPoolHandle& cp,
                               int names_count, const char** names, int* lengths,
-                              int* cp_indices, unsigned int* hashValues, TRAPS) {
+                              int* cp_indices, unsigned int* hashValues) {
   bool c_heap = !loader_data->is_the_null_class_loader_data();
   for (int i = 0; i < names_count; i++) {
     const char *name = names[i];
     int len = lengths[i];
     unsigned int hash = hashValues[i];
     assert(SymbolTable::the_table()->lookup_shared(name, len, hash) == NULL, "must have checked already");
-    Symbol* sym = SymbolTable::the_table()->do_add_if_needed(name, len, hash, c_heap, CHECK);
+    Symbol* sym = SymbolTable::the_table()->do_add_if_needed(name, len, hash, c_heap);
     assert(sym->refcount() != 0, "lookup should have incremented the count");
     cp->symbol_at_put(cp_indices[i], sym);
   }
 }
 
-Symbol* SymbolTable::do_add_if_needed(const char* name, int len, uintx hash, bool heap, TRAPS) {
-  SymbolTableLookup lookup(THREAD, name, len, hash);
+Symbol* SymbolTable::do_add_if_needed(const char* name, int len, uintx hash, bool heap) {
+  SymbolTableLookup lookup(name, len, hash);
   SymbolTableGet stg;
   bool clean_hint = false;
   bool rehash_warning = false;
   Symbol* sym = NULL;
+  Thread* THREAD = Thread::current();
 
   do {
     if (_local_table->get(THREAD, lookup, stg, &rehash_warning)) {
       sym = stg.get_res_sym();
       break;
     }
-    sym = SymbolTable::the_table()->allocate_symbol(name, len, heap, THREAD);
+    sym = SymbolTable::the_table()->allocate_symbol(name, len, heap);
     if (_local_table->insert(THREAD, lookup, sym, &rehash_warning, &clean_hint)) {
       break;
     }
@@ -481,12 +483,12 @@
   return sym;
 }
 
-Symbol* SymbolTable::new_permanent_symbol(const char* name, TRAPS) {
+Symbol* SymbolTable::new_permanent_symbol(const char* name) {
   unsigned int hash = 0;
   int len = (int)strlen(name);
   Symbol* sym = SymbolTable::lookup_only(name, len, hash);
   if (sym == NULL) {
-    sym = SymbolTable::the_table()->do_add_if_needed(name, len, hash, false, CHECK_NULL);
+    sym = SymbolTable::the_table()->do_add_if_needed(name, len, hash, false);
   }
   if (!sym->is_permanent()) {
     sym->make_permanent();
--- a/src/hotspot/share/classfile/symbolTable.hpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/symbolTable.hpp	Tue May 14 11:29:18 2019 -0400
@@ -43,7 +43,7 @@
 // it becomes "managed" by TempNewSymbol instances. As a handle class, TempNewSymbol
 // needs to maintain proper reference counting in context of copy semantics.
 //
-// In SymbolTable, new_symbol() and lookup() will create a Symbol* if not already in the
+// In SymbolTable, new_symbol() 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 {
@@ -139,16 +139,19 @@
 
   SymbolTable();
 
-  Symbol* allocate_symbol(const char* name, int len, bool c_heap, TRAPS); // Assumes no characters larger than 0x7F
+  Symbol* allocate_symbol(const char* name, int len, bool c_heap); // Assumes no characters larger than 0x7F
   Symbol* do_lookup(const char* name, int len, uintx hash);
-  Symbol* do_add_if_needed(const char* name, int len, uintx hash, bool heap, TRAPS);
+  Symbol* do_add_if_needed(const char* name, int len, uintx hash, bool heap);
+
+  // lookup only, won't add. Also calculate hash. Used by the ClassfileParser.
+  static Symbol* lookup_only(const char* name, int len, unsigned int& hash);
+  static Symbol* lookup_only_unicode(const jchar* name, int len, unsigned int& hash);
 
   // Adding elements
   static void new_symbols(ClassLoaderData* loader_data,
                           const constantPoolHandle& cp, int names_count,
                           const char** name, int* lengths,
-                          int* cp_indices, unsigned int* hashValues,
-                          TRAPS);
+                          int* cp_indices, unsigned int* hashValues);
 
   static Symbol* lookup_shared(const char* name, int len, unsigned int hash);
   Symbol* lookup_dynamic(const char* name, int len, unsigned int hash);
@@ -190,14 +193,6 @@
   static void trigger_cleanup();
 
   // Probing
-  static Symbol* lookup(const char* name, int len, TRAPS);
-  // lookup only, won't add. Also calculate hash.
-  static Symbol* lookup_only(const char* name, int len, unsigned int& hash);
-  // adds new symbol if not found
-  static Symbol* lookup(const Symbol* sym, int begin, int end, TRAPS);
-  // jchar (UTF16) version of lookups
-  static Symbol* lookup_unicode(const jchar* name, int len, TRAPS);
-  static Symbol* lookup_only_unicode(const jchar* name, int len, unsigned int& hash);
   // Needed for preloading classes in signatures when compiling.
   // Returns the symbol is already present in symbol table, otherwise
   // NULL.  NO ALLOCATION IS GUARANTEED!
@@ -210,20 +205,18 @@
     return lookup_only_unicode(name, len, ignore_hash);
   }
 
-  // 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);
+  // Symbol lookup and create if not found.
+  // jchar (UTF16) version of lookup
+  static Symbol* new_symbol(const jchar* name, int len);
+  // char (UTF8) versions
+  static Symbol* new_symbol(const Symbol* sym, int begin, int end);
+  static Symbol* new_symbol(const char* utf8_buffer, int length);
+  static Symbol* new_symbol(const char* name) {
+    return new_symbol(name, (int)strlen(name));
   }
-  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);
-  }
+
   // Create a symbol in the arena for symbols that are not deleted
-  static Symbol* new_permanent_symbol(const char* name, TRAPS);
+  static Symbol* new_permanent_symbol(const char* name);
 
   // Rehash the string table if it gets out of balance
   static void rehash_table();
@@ -245,7 +238,6 @@
   static void dump(outputStream* st, bool verbose=false);
   // Debugging
   static void verify();
-  static void read(const char* filename, TRAPS);
 
   // Histogram
   static void print_histogram() PRODUCT_RETURN;
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Tue May 14 11:29:18 2019 -0400
@@ -263,7 +263,7 @@
     ResourceMark rm(THREAD);
     // Ignore wrapping L and ;.
     TempNewSymbol name = SymbolTable::new_symbol(class_name->as_C_string() + 1,
-                                   class_name->utf8_length() - 2, CHECK_NULL);
+                                                 class_name->utf8_length() - 2);
     return resolve_instance_class_or_null(name, class_loader, protection_domain, THREAD);
   } else {
     return resolve_instance_class_or_null(class_name, class_loader, protection_domain, THREAD);
@@ -2356,7 +2356,7 @@
   SignatureStream sig_strm(signature, is_method);
   while (!sig_strm.is_done()) {
     if (sig_strm.is_object()) {
-      Symbol* sig = sig_strm.as_symbol(CHECK_NULL);
+      Symbol* sig = sig_strm.as_symbol();
       if (!add_loader_constraint(sig, loader1, loader2, THREAD)) {
         return sig;
       }
@@ -2626,7 +2626,7 @@
       mirror = ss.as_java_mirror(class_loader, protection_domain,
                                  SignatureStream::NCDFError, CHECK_(empty));
     }
-    assert(mirror != NULL, "%s", ss.as_symbol(THREAD)->as_C_string());
+    assert(mirror != NULL, "%s", ss.as_symbol()->as_C_string());
     if (ss.at_return_type())
       rt = Handle(THREAD, mirror);
     else
--- a/src/hotspot/share/classfile/verificationType.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/verificationType.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -129,13 +129,11 @@
     case 'D': return VerificationType(Double);
     case '[':
       component = context->create_temporary_symbol(
-        name(), 1, name()->utf8_length(),
-        CHECK_(VerificationType::bogus_type()));
+        name(), 1, name()->utf8_length());
       return VerificationType::reference_type(component);
     case 'L':
       component = context->create_temporary_symbol(
-        name(), 2, name()->utf8_length() - 1,
-        CHECK_(VerificationType::bogus_type()));
+        name(), 2, name()->utf8_length() - 1);
       return VerificationType::reference_type(component);
     default:
       // Met an invalid type signature, e.g. [X
--- a/src/hotspot/share/classfile/verifier.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/verifier.cpp	Tue May 14 11:29:18 2019 -0400
@@ -595,9 +595,9 @@
   return VerificationType::reference_type(vmSymbols::java_lang_Object());
 }
 
-TypeOrigin ClassVerifier::ref_ctx(const char* sig, TRAPS) {
+TypeOrigin ClassVerifier::ref_ctx(const char* sig) {
   VerificationType vt = VerificationType::reference_type(
-      create_temporary_symbol(sig, (int)strlen(sig), THREAD));
+                         create_temporary_symbol(sig, (int)strlen(sig)));
   return TypeOrigin::implicit(vt);
 }
 
@@ -647,7 +647,7 @@
 
   // Translate the signature arguments into verification types.
   while (!sig_stream.at_return_type()) {
-    int n = change_sig_to_verificationType(&sig_stream, sig_type, CHECK_VERIFY(this));
+    int n = change_sig_to_verificationType(&sig_stream, sig_type);
     assert(n <= 2, "Unexpected signature type");
 
     // Store verification type(s).  Longs and Doubles each have two verificationTypes.
@@ -664,7 +664,7 @@
 
   // Store verification type(s) for the return type, if there is one.
   if (sig_stream.type() != T_VOID) {
-    int n = change_sig_to_verificationType(&sig_stream, sig_type, CHECK_VERIFY(this));
+    int n = change_sig_to_verificationType(&sig_stream, sig_type);
     assert(n <= 2, "Unexpected signature return type");
     for (int y = 0; y < n; y++) {
       verif_types->push(sig_type[y]);
@@ -925,7 +925,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_int_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[I", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[I")),
                 bad_type_msg, "iaload");
             return;
           }
@@ -953,7 +953,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_char_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[C", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[C")),
                 bad_type_msg, "caload");
             return;
           }
@@ -967,7 +967,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_short_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[S", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[S")),
                 bad_type_msg, "saload");
             return;
           }
@@ -981,7 +981,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_long_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[J", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[J")),
                 bad_type_msg, "laload");
             return;
           }
@@ -996,7 +996,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_float_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[F", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[F")),
                 bad_type_msg, "faload");
             return;
           }
@@ -1010,7 +1010,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_double_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[D", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[D")),
                 bad_type_msg, "daload");
             return;
           }
@@ -1099,7 +1099,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_int_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[I", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[I")),
                 bad_type_msg, "iastore");
             return;
           }
@@ -1127,7 +1127,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_char_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[C", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[C")),
                 bad_type_msg, "castore");
             return;
           }
@@ -1141,7 +1141,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_short_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[S", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[S")),
                 bad_type_msg, "sastore");
             return;
           }
@@ -1156,7 +1156,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_long_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[J", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[J")),
                 bad_type_msg, "lastore");
             return;
           }
@@ -1170,7 +1170,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_float_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[F", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[F")),
                 bad_type_msg, "fastore");
             return;
           }
@@ -1185,7 +1185,7 @@
             VerificationType::reference_check(), CHECK_VERIFY(this));
           if (!atype.is_double_array()) {
             verify_error(ErrorContext::bad_type(bci,
-                current_frame.stack_top_ctx(), ref_ctx("[D", THREAD)),
+                current_frame.stack_top_ctx(), ref_ctx("[D")),
                 bad_type_msg, "dastore");
             return;
           }
@@ -2183,8 +2183,7 @@
     uintptr_t constant_type_buffer[2];
     VerificationType* v_constant_type = (VerificationType*)constant_type_buffer;
     SignatureStream sig_stream(constant_type, false);
-    int n = change_sig_to_verificationType(
-      &sig_stream, v_constant_type, CHECK_VERIFY(this));
+    int n = change_sig_to_verificationType(&sig_stream, v_constant_type);
     int opcode_n = (opcode == Bytecodes::_ldc2_w ? 2 : 1);
     if (n != opcode_n) {
       // wrong kind of ldc; reverify against updated type mask
@@ -2325,8 +2324,7 @@
 
   SignatureStream sig_stream(field_sig, false);
   VerificationType stack_object_type;
-  int n = change_sig_to_verificationType(
-    &sig_stream, field_type, CHECK_VERIFY(this));
+  int n = change_sig_to_verificationType(&sig_stream, field_type);
   u2 bci = bcs->bci();
   bool is_assignable;
   switch (bcs->raw_code()) {
@@ -3002,8 +3000,7 @@
   }
 
   // from_bt[index] contains the array signature which has a length of 2
-  Symbol* sig = create_temporary_symbol(
-    from_bt[index], 2, CHECK_(VerificationType::bogus_type()));
+  Symbol* sig = create_temporary_symbol(from_bt[index], 2);
   return VerificationType::reference_type(sig);
 }
 
@@ -3041,8 +3038,7 @@
     int n = os::snprintf(arr_sig_str, length + 1, "[L%s;", component_name);
     assert(n == length, "Unexpected number of characters in string");
   }
-  Symbol* arr_sig = create_temporary_symbol(
-    arr_sig_str, length, CHECK_VERIFY(this));
+  Symbol* arr_sig = create_temporary_symbol(arr_sig_str, length);
   VerificationType new_array_type = VerificationType::reference_type(arr_sig);
   current_frame->push_stack(new_array_type, CHECK_VERIFY(this));
 }
@@ -3150,18 +3146,18 @@
 // These are stored in the verifier until the end of verification so that
 // they can be reference counted.
 Symbol* ClassVerifier::create_temporary_symbol(const Symbol *s, int begin,
-                                               int end, TRAPS) {
+                                               int end) {
   const char* name = (const char*)s->base() + begin;
   int length = end - begin;
-  return create_temporary_symbol(name, length, CHECK_NULL);
+  return create_temporary_symbol(name, length);
 }
 
-Symbol* ClassVerifier::create_temporary_symbol(const char *name, int length, TRAPS) {
+Symbol* ClassVerifier::create_temporary_symbol(const char *name, int length) {
   // Quick deduplication check
   if (_previous_symbol != NULL && _previous_symbol->equals(name, length)) {
     return _previous_symbol;
   }
-  Symbol* sym = SymbolTable::new_symbol(name, length, CHECK_NULL);
+  Symbol* sym = SymbolTable::new_symbol(name, length);
   if (!sym->is_permanent()) {
     if (_symbols == NULL) {
       _symbols = new GrowableArray<Symbol*>(50, 0, NULL);
--- a/src/hotspot/share/classfile/verifier.hpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/verifier.hpp	Tue May 14 11:29:18 2019 -0400
@@ -446,7 +446,7 @@
   }
 
   int change_sig_to_verificationType(
-    SignatureStream* sig_type, VerificationType* inference_type, TRAPS);
+    SignatureStream* sig_type, VerificationType* inference_type);
 
   VerificationType cp_index_to_type(int index, const constantPoolHandle& cp, TRAPS) {
     return VerificationType::reference_type(cp->klass_name_at(index));
@@ -456,8 +456,8 @@
   // their reference counts need to be decremented when the verifier object
   // goes out of scope.  Since these symbols escape the scope in which they're
   // created, we can't use a TempNewSymbol.
-  Symbol* create_temporary_symbol(const Symbol* s, int begin, int end, TRAPS);
-  Symbol* create_temporary_symbol(const char *s, int length, TRAPS);
+  Symbol* create_temporary_symbol(const Symbol* s, int begin, int end);
+  Symbol* create_temporary_symbol(const char *s, int length);
   Symbol* create_temporary_symbol(Symbol* s) {
     if (s == _previous_symbol) {
       return s;
@@ -473,18 +473,18 @@
     return s;
   }
 
-  TypeOrigin ref_ctx(const char* str, TRAPS);
+  TypeOrigin ref_ctx(const char* str);
 
 };
 
 inline int ClassVerifier::change_sig_to_verificationType(
-    SignatureStream* sig_type, VerificationType* inference_type, TRAPS) {
+    SignatureStream* sig_type, VerificationType* inference_type) {
   BasicType bt = sig_type->type();
   switch (bt) {
     case T_OBJECT:
     case T_ARRAY:
       {
-        Symbol* name = sig_type->as_symbol(CHECK_0);
+        Symbol* name = sig_type->as_symbol();
         // Create another symbol to save as signature stream unreferences this symbol.
         Symbol* name_copy = create_temporary_symbol(name);
         assert(name_copy == name, "symbols don't match");
--- a/src/hotspot/share/classfile/vmSymbols.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/classfile/vmSymbols.cpp	Tue May 14 11:29:18 2019 -0400
@@ -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
@@ -84,7 +84,7 @@
   if (!UseSharedSpaces) {
     const char* string = &vm_symbol_bodies[0];
     for (int index = (int)FIRST_SID; index < (int)SID_LIMIT; index++) {
-      Symbol* sym = SymbolTable::new_permanent_symbol(string, CHECK);
+      Symbol* sym = SymbolTable::new_permanent_symbol(string);
       _symbols[index] = sym;
       string += strlen(string); // skip string body
       string += 1;              // skip trailing null
@@ -141,7 +141,7 @@
     // Spot-check correspondence between strings, symbols, and enums:
     assert(_symbols[NO_SID] == NULL, "must be");
     const char* str = "java/lang/Object";
-    TempNewSymbol jlo = SymbolTable::new_permanent_symbol(str, CHECK);
+    TempNewSymbol jlo = SymbolTable::new_permanent_symbol(str);
     assert(strncmp(str, (char*)jlo->base(), jlo->utf8_length()) == 0, "");
     assert(jlo == java_lang_Object(), "");
     SID sid = VM_SYMBOL_ENUM_NAME(java_lang_Object);
@@ -160,7 +160,7 @@
     // The string "format" happens (at the moment) not to be a vmSymbol,
     // though it is a method name in java.lang.String.
     str = "format";
-    TempNewSymbol fmt = SymbolTable::new_permanent_symbol(str, CHECK);
+    TempNewSymbol fmt = SymbolTable::new_permanent_symbol(str);
     sid = find_sid(fmt);
     assert(sid == NO_SID, "symbol index works (negative test)");
   }
--- a/src/hotspot/share/compiler/compilerOracle.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/compiler/compilerOracle.cpp	Tue May 14 11:29:18 2019 -0400
@@ -829,8 +829,8 @@
       }
 
       EXCEPTION_MARK;
-      Symbol* c_name = SymbolTable::new_symbol(className, CHECK);
-      Symbol* m_name = SymbolTable::new_symbol(methodName, CHECK);
+      Symbol* c_name = SymbolTable::new_symbol(className);
+      Symbol* m_name = SymbolTable::new_symbol(methodName);
       Symbol* signature = NULL;
 
       BasicMatcher* bm = new BasicMatcher();
--- a/src/hotspot/share/compiler/methodMatcher.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/compiler/methodMatcher.cpp	Tue May 14 11:29:18 2019 -0400
@@ -300,10 +300,10 @@
         }
         line += bytes_read;
       }
-      signature = SymbolTable::new_symbol(sig, CHECK);
+      signature = SymbolTable::new_symbol(sig);
     }
-    Symbol* c_name = SymbolTable::new_symbol(class_name, CHECK);
-    Symbol* m_name = SymbolTable::new_symbol(method_name, CHECK);
+    Symbol* c_name = SymbolTable::new_symbol(class_name);
+    Symbol* m_name = SymbolTable::new_symbol(method_name);
 
     matcher->init(c_name, c_match, m_name, m_match, signature);
     return;
--- a/src/hotspot/share/interpreter/interpreterRuntime.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/interpreter/interpreterRuntime.cpp	Tue May 14 11:29:18 2019 -0400
@@ -417,7 +417,7 @@
 
 JRT_ENTRY(void, InterpreterRuntime::create_exception(JavaThread* thread, char* name, char* message))
   // lookup exception klass
-  TempNewSymbol s = SymbolTable::new_symbol(name, CHECK);
+  TempNewSymbol s = SymbolTable::new_symbol(name);
   if (ProfileTraps) {
     if (s == vmSymbols::java_lang_ArithmeticException()) {
       note_trap(thread, Deoptimization::Reason_div0_check, CHECK);
@@ -436,7 +436,7 @@
   ResourceMark rm(thread);
   const char* klass_name = obj->klass()->external_name();
   // lookup exception klass
-  TempNewSymbol s = SymbolTable::new_symbol(name, CHECK);
+  TempNewSymbol s = SymbolTable::new_symbol(name);
   if (ProfileTraps) {
     note_trap(thread, Deoptimization::Reason_class_check, CHECK);
   }
--- a/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jfr/dcmd/jfrDcmds.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -171,8 +171,8 @@
   assert(args != NULL, "invariant");
   DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_vm(THREAD));
   assert(args->klass() != NULL, "invariant");
-  args->set_name("<init>", CHECK_NULL);
-  args->set_signature("()V", CHECK_NULL);
+  args->set_name("<init>");
+  args->set_signature("()V");
   JfrJavaSupport::new_object(args, CHECK_NULL);
   return (oop)args->result()->get_jobject();
 }
--- a/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jfr/instrumentation/jfrEventClassTransformer.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -357,7 +357,6 @@
   }
 };
 
-static unsigned int unused_hash = 0;
 static const char value_name[] = "value";
 static bool has_annotation(const InstanceKlass* ik, const Symbol* annotation_type, bool& value) {
   assert(annotation_type != NULL, "invariant");
@@ -372,7 +371,7 @@
     if (annotation_iterator.type() == annotation_type) {
       // target annotation found
       static const Symbol* value_symbol =
-        SymbolTable::lookup_only(value_name, sizeof value_name - 1, unused_hash);
+        SymbolTable::probe(value_name, sizeof value_name - 1);
       assert(value_symbol != NULL, "invariant");
       const AnnotationElementIterator element_iterator = annotation_iterator.elements();
       while (element_iterator.has_next()) {
@@ -412,7 +411,7 @@
   }
   static Symbol* jdk_jfr_module_symbol = NULL;
   if (jdk_jfr_module_symbol == NULL) {
-    jdk_jfr_module_symbol = SymbolTable::lookup_only(jdk_jfr_module_name, sizeof jdk_jfr_module_name - 1, unused_hash);
+    jdk_jfr_module_symbol = SymbolTable::probe(jdk_jfr_module_name, sizeof jdk_jfr_module_name - 1);
     if (jdk_jfr_module_symbol == NULL) {
       return false;
     }
@@ -447,7 +446,7 @@
   assert(!untypedEventHandler, "invariant");
   static const Symbol* registered_symbol = NULL;
   if (registered_symbol == NULL) {
-    registered_symbol = SymbolTable::lookup_only(registered_constant, sizeof registered_constant - 1, unused_hash);
+    registered_symbol = SymbolTable::probe(registered_constant, sizeof registered_constant - 1);
     if (registered_symbol == NULL) {
       untypedEventHandler = true;
       return false;
@@ -1167,7 +1166,7 @@
                                 u2& added_cp_entries,
                                 TRAPS) {
   assert(utf8_constant != NULL, "invariant");
-  TempNewSymbol utf8_sym = SymbolTable::new_symbol(utf8_constant, THREAD);
+  TempNewSymbol utf8_sym = SymbolTable::new_symbol(utf8_constant);
   // lookup existing
   const int utf8_orig_idx = utf8_info_index(ik, utf8_sym, THREAD);
   if (utf8_orig_idx != invalid_cp_index) {
--- a/src/hotspot/share/jfr/jni/jfrGetAllEventClasses.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jfr/jni/jfrGetAllEventClasses.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -134,8 +134,7 @@
   initialize(THREAD);
   assert(empty_java_util_arraylist != NULL, "should have been setup already!");
   static const char jdk_jfr_event_name[] = "jdk/internal/event/Event";
-  unsigned int unused_hash = 0;
-  Symbol* const event_klass_name = SymbolTable::lookup_only(jdk_jfr_event_name, sizeof jdk_jfr_event_name - 1, unused_hash);
+  Symbol* const event_klass_name = SymbolTable::probe(jdk_jfr_event_name, sizeof jdk_jfr_event_name - 1);
 
   if (NULL == event_klass_name) {
     // not loaded yet
@@ -168,10 +167,10 @@
   const Klass* const array_list_klass = JfrJavaSupport::klass(empty_java_util_arraylist);
   assert(array_list_klass != NULL, "invariant");
 
-  const Symbol* const add_method_sym = SymbolTable::lookup(add_method_name, sizeof add_method_name - 1, THREAD);
+  const Symbol* const add_method_sym = SymbolTable::new_symbol(add_method_name);
   assert(add_method_sym != NULL, "invariant");
 
-  const Symbol* const add_method_sig_sym = SymbolTable::lookup(add_method_signature, sizeof add_method_signature - 1, THREAD);
+  const Symbol* const add_method_sig_sym = SymbolTable::new_symbol(add_method_signature);
   assert(add_method_signature != NULL, "invariant");
 
   JavaValue result(T_BOOLEAN);
--- a/src/hotspot/share/jfr/jni/jfrJavaCall.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jfr/jni/jfrJavaCall.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -38,9 +38,9 @@
 }
 #endif // ASSERT
 
-static Symbol* resolve(const char* str, TRAPS) {
+static Symbol* resolve(const char* str) {
   assert(str != NULL, "invariant");
-  return SymbolTable::lookup(str, (int)strlen(str), THREAD);
+  return SymbolTable::new_symbol(str);
 }
 
 static Klass* resolve(Symbol* k_sym, TRAPS) {
@@ -199,10 +199,10 @@
     set_klass(klass_name, CHECK);
   }
   if (name != NULL) {
-    set_name(name, CHECK);
+    set_name(name);
   }
   if (signature != NULL) {
-    set_signature(signature, THREAD);
+    set_signature(signature);
   }
 }
 
@@ -230,7 +230,7 @@
 
 void JfrJavaArguments::set_klass(const char* klass_name, TRAPS) {
   assert(klass_name != NULL, "invariant");
-  Symbol* const k_sym = resolve(klass_name, CHECK);
+  Symbol* const k_sym = resolve(klass_name);
   assert(k_sym != NULL, "invariant");
   const Klass* const klass = resolve(k_sym, CHECK);
   set_klass(klass);
@@ -246,9 +246,9 @@
   return const_cast<Symbol*>(_name);
 }
 
-void JfrJavaArguments::set_name(const char* name, TRAPS) {
+void JfrJavaArguments::set_name(const char* name) {
   assert(name != NULL, "invariant");
-  const Symbol* const sym = resolve(name, CHECK);
+  const Symbol* const sym = resolve(name);
   set_name(sym);
 }
 
@@ -262,9 +262,9 @@
   return const_cast<Symbol*>(_signature);
 }
 
-void JfrJavaArguments::set_signature(const char* signature, TRAPS) {
+void JfrJavaArguments::set_signature(const char* signature) {
   assert(signature != NULL, "invariant");
-  const Symbol* const sym = resolve(signature, CHECK);
+  const Symbol* const sym = resolve(signature);
   set_signature(sym);
 }
 
--- a/src/hotspot/share/jfr/jni/jfrJavaCall.hpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jfr/jni/jfrJavaCall.hpp	Tue May 14 11:29:18 2019 -0400
@@ -47,11 +47,11 @@
   void set_klass(const Klass* klass);
 
   Symbol* name() const;
-  void set_name(const char* name, TRAPS);
+  void set_name(const char* name);
   void set_name(const Symbol* name);
 
   Symbol* signature() const;
-  void set_signature(const char* signature, TRAPS);
+  void set_signature(const char* signature);
   void set_signature(const Symbol* signature);
 
   int array_length() const;
--- a/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jfr/jni/jfrJavaSupport.cpp	Tue May 14 11:29:18 2019 -0400
@@ -579,7 +579,7 @@
 static bool is_jdk_jfr_module_in_readability_graph() {
   Thread* const t = Thread::current();
   // take one of the packages in the module to be located and query for its definition.
-  TempNewSymbol pkg_sym = SymbolTable::new_symbol(JDK_JFR_PACKAGE_NAME, t);
+  TempNewSymbol pkg_sym = SymbolTable::new_symbol(JDK_JFR_PACKAGE_NAME);
   return Modules::is_package_defined(pkg_sym, Handle(), t);
 }
 
--- a/src/hotspot/share/jfr/jni/jfrUpcalls.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jfr/jni/jfrUpcalls.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -49,11 +49,11 @@
   static bool initialized = false;
   if (!initialized) {
     DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_vm(THREAD));
-    jvm_upcalls_class_sym = SymbolTable::new_permanent_symbol("jdk/jfr/internal/JVMUpcalls", CHECK_false);
-    on_retransform_method_sym = SymbolTable::new_permanent_symbol("onRetransform", CHECK_false);
-    on_retransform_signature_sym = SymbolTable::new_permanent_symbol("(JZLjava/lang/Class;[B)[B", CHECK_false);
-    bytes_for_eager_instrumentation_sym = SymbolTable::new_permanent_symbol("bytesForEagerInstrumentation", CHECK_false);
-    bytes_for_eager_instrumentation_sig_sym = SymbolTable::new_permanent_symbol("(JZLjava/lang/Class;[B)[B", THREAD);
+    jvm_upcalls_class_sym = SymbolTable::new_permanent_symbol("jdk/jfr/internal/JVMUpcalls");
+    on_retransform_method_sym = SymbolTable::new_permanent_symbol("onRetransform");
+    on_retransform_signature_sym = SymbolTable::new_permanent_symbol("(JZLjava/lang/Class;[B)[B");
+    bytes_for_eager_instrumentation_sym = SymbolTable::new_permanent_symbol("bytesForEagerInstrumentation");
+    bytes_for_eager_instrumentation_sig_sym = SymbolTable::new_permanent_symbol("(JZLjava/lang/Class;[B)[B");
     initialized = bytes_for_eager_instrumentation_sig_sym != NULL;
   }
   return initialized;
--- a/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleDescription.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jfr/leakprofiler/checkpoint/objectSampleDescription.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 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
@@ -91,7 +91,7 @@
 
 void ObjectSampleDescription::ensure_initialized() {
   if (symbol_size == NULL) {
-    symbol_size = SymbolTable::new_permanent_symbol("size", Thread::current());
+    symbol_size = SymbolTable::new_permanent_symbol("size");
   }
 }
 
--- a/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.cpp	Tue May 14 11:29:18 2019 -0400
@@ -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
@@ -87,14 +87,14 @@
   static const Symbol* jdk_internal_event_sym = NULL;
   if (jdk_internal_event_sym == NULL) {
     // setup when loading the first TypeArrayKlass (Universe::genesis) hence single threaded invariant
-    jdk_internal_event_sym = SymbolTable::new_permanent_symbol("jdk/internal/event/Event", Thread::current());
+    jdk_internal_event_sym = SymbolTable::new_permanent_symbol("jdk/internal/event/Event");
   }
   assert(jdk_internal_event_sym != NULL, "invariant");
 
   static const Symbol* jdk_jfr_event_sym = NULL;
   if (jdk_jfr_event_sym == NULL) {
     // setup when loading the first TypeArrayKlass (Universe::genesis) hence single threaded invariant
-    jdk_jfr_event_sym = SymbolTable::new_permanent_symbol("jdk/jfr/Event", Thread::current());
+    jdk_jfr_event_sym = SymbolTable::new_permanent_symbol("jdk/jfr/Event");
   }
   assert(jdk_jfr_event_sym != NULL, "invariant");
   const Symbol* const klass_name = klass->name();
--- a/src/hotspot/share/jfr/utilities/jfrJavaLog.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jfr/utilities/jfrJavaLog.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -62,8 +62,8 @@
   JavaValue result(T_VOID);
   JfrJavaArguments args(&result);
   args.set_klass(JfrJavaSupport::klass(lt));
-  args.set_name("tagSetLevel", CHECK);
-  args.set_signature("I", CHECK);
+  args.set_name("tagSetLevel");
+  args.set_signature("I");
   args.set_receiver(JfrJavaSupport::resolve_non_null(lt));
   args.push_int(llt);
   JfrJavaSupport::set_field(&args, THREAD);
--- a/src/hotspot/share/jfr/writers/jfrJavaEventWriter.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jfr/writers/jfrJavaEventWriter.cpp	Tue May 14 11:29:18 2019 -0400
@@ -76,55 +76,55 @@
 
 static bool setup_event_writer_offsets(TRAPS) {
   const char class_name[] = "jdk/jfr/internal/EventWriter";
-  Symbol* const k_sym = SymbolTable::lookup(class_name, sizeof class_name - 1, CHECK_false);
+  Symbol* const k_sym = SymbolTable::new_symbol(class_name);
   assert(k_sym != NULL, "invariant");
   Klass* klass = SystemDictionary::resolve_or_fail(k_sym, true, CHECK_false);
   assert(klass != NULL, "invariant");
 
   const char start_pos_name[] = "startPosition";
-  Symbol* const start_pos_sym = SymbolTable::lookup(start_pos_name, sizeof start_pos_name - 1, CHECK_false);
+  Symbol* const start_pos_sym = SymbolTable::new_symbol(start_pos_name);
   assert(start_pos_sym != NULL, "invariant");
   assert(invalid_offset == start_pos_offset, "invariant");
   compute_offset(start_pos_offset, klass, start_pos_sym, vmSymbols::long_signature());
   assert(start_pos_offset != invalid_offset, "invariant");
 
   const char start_pos_address_name[] = "startPositionAddress";
-  Symbol* const start_pos_address_sym = SymbolTable::lookup(start_pos_address_name, sizeof start_pos_address_name - 1, CHECK_false);
+  Symbol* const start_pos_address_sym = SymbolTable::new_symbol(start_pos_address_name);
   assert(start_pos_address_sym != NULL, "invariant");
   assert(invalid_offset == start_pos_address_offset, "invariant");
   compute_offset(start_pos_address_offset, klass, start_pos_address_sym, vmSymbols::long_signature());
   assert(start_pos_address_offset != invalid_offset, "invariant");
 
   const char event_pos_name[] = "currentPosition";
-  Symbol* const event_pos_sym = SymbolTable::lookup(event_pos_name, sizeof event_pos_name - 1, CHECK_false);
+  Symbol* const event_pos_sym = SymbolTable::new_symbol(event_pos_name);
   assert(event_pos_sym != NULL, "invariant");
   assert(invalid_offset == current_pos_offset, "invariant");
   compute_offset(current_pos_offset, klass, event_pos_sym,vmSymbols::long_signature());
   assert(current_pos_offset != invalid_offset, "invariant");
 
   const char max_pos_name[] = "maxPosition";
-  Symbol* const max_pos_sym = SymbolTable::lookup(max_pos_name, sizeof max_pos_name - 1, CHECK_false);
+  Symbol* const max_pos_sym = SymbolTable::new_symbol(max_pos_name);
   assert(max_pos_sym != NULL, "invariant");
   assert(invalid_offset == max_pos_offset, "invariant");
   compute_offset(max_pos_offset, klass, max_pos_sym, vmSymbols::long_signature());
   assert(max_pos_offset != invalid_offset, "invariant");
 
   const char max_event_size_name[] = "maxEventSize";
-  Symbol* const max_event_size_sym = SymbolTable::lookup(max_event_size_name, sizeof max_event_size_name - 1, CHECK_false);
+  Symbol* const max_event_size_sym = SymbolTable::new_symbol(max_event_size_name);
   assert (max_event_size_sym != NULL, "invariant");
   assert(invalid_offset == max_event_size_offset, "invariant");
   compute_offset(max_event_size_offset, klass, max_event_size_sym, vmSymbols::int_signature());
   assert(max_event_size_offset != invalid_offset, "invariant");
 
   const char notified_name[] = "notified";
-  Symbol* const notified_sym = SymbolTable::lookup(notified_name, sizeof notified_name - 1, CHECK_false);
+  Symbol* const notified_sym = SymbolTable::new_symbol(notified_name);
   assert (notified_sym != NULL, "invariant");
   assert(invalid_offset == notified_offset, "invariant");
   compute_offset(notified_offset, klass, notified_sym, vmSymbols::bool_signature());
   assert(notified_offset != invalid_offset, "invariant");
 
   const char valid_name[] = "valid";
-  Symbol* const valid_sym = SymbolTable::lookup(valid_name, sizeof valid_name - 1, CHECK_false);
+  Symbol* const valid_sym = SymbolTable::new_symbol(valid_name);
   assert (valid_sym != NULL, "invariant");
   assert(invalid_offset == valid_offset, "invariant");
   compute_offset(valid_offset, klass, valid_sym, vmSymbols::bool_signature());
--- a/src/hotspot/share/jvmci/compilerRuntime.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jvmci/compilerRuntime.cpp	Tue May 14 11:29:18 2019 -0400
@@ -45,8 +45,7 @@
       // First 2 bytes of name contains length (number of bytes).
       int len = Bytes::get_Java_u2((address)name);
       name += 2;
-      TempNewSymbol sym = SymbolTable::new_symbol(name, len, CHECK);
-      str = StringTable::intern(sym, CHECK);
+      str = StringTable::intern(name, CHECK);
       assert(java_lang_String::is_instance(str), "must be string");
       *(oop*)string_result = str; // Store result
     }
@@ -78,7 +77,7 @@
     name++;
     len -= 2;
   }
-  TempNewSymbol sym = SymbolTable::new_symbol(name, len, CHECK_NULL);
+  TempNewSymbol sym = SymbolTable::new_symbol(name, len);
   if (sym == NULL) {
     return NULL;
   }
--- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp	Tue May 14 11:29:18 2019 -0400
@@ -506,7 +506,7 @@
 C2V_VMENTRY_NULL(jobject, lookupType, (JNIEnv* env, jobject, jstring jname, jclass accessing_class, jboolean resolve))
   JVMCIObject name = JVMCIENV->wrap(jname);
   const char* str = JVMCIENV->as_utf8_string(name);
-  TempNewSymbol class_name = SymbolTable::new_symbol(str, CHECK_NULL);
+  TempNewSymbol class_name = SymbolTable::new_symbol(str);
 
   if (class_name->utf8_length() <= 1) {
     JVMCI_THROW_MSG_0(InternalError, err_msg("Primitive type %s should be handled in Java code", class_name->as_C_string()));
@@ -537,8 +537,7 @@
       // This is a name from a signature.  Strip off the trimmings.
       // Call recursive to keep scope of strippedsym.
       TempNewSymbol strippedsym = SymbolTable::new_symbol(class_name->as_utf8()+1,
-                                                          class_name->utf8_length()-2,
-                                                          CHECK_0);
+                                                          class_name->utf8_length()-2);
       resolved_klass = SystemDictionary::find(strippedsym, class_loader, protection_domain, CHECK_0);
     } else if (FieldType::is_array(class_name)) {
       FieldArrayInfo fd;
@@ -547,8 +546,7 @@
       BasicType t = FieldType::get_array_info(class_name, fd, CHECK_0);
       if (t == T_OBJECT) {
         TempNewSymbol strippedsym = SymbolTable::new_symbol(class_name->as_utf8()+1+fd.dimension(),
-                                                            class_name->utf8_length()-2-fd.dimension(),
-                                                            CHECK_0);
+                                                            class_name->utf8_length()-2-fd.dimension());
         resolved_klass = SystemDictionary::find(strippedsym,
                                                              class_loader,
                                                              protection_domain,
@@ -1762,7 +1760,7 @@
 C2V_VMENTRY(void, compileToBytecode, (JNIEnv* env, jobject, jobject lambda_form_handle))
   Handle lambda_form = JVMCIENV->asConstant(JVMCIENV->wrap(lambda_form_handle), JVMCI_CHECK);
   if (lambda_form->is_a(SystemDictionary::LambdaForm_klass())) {
-    TempNewSymbol compileToBytecode = SymbolTable::new_symbol("compileToBytecode", CHECK);
+    TempNewSymbol compileToBytecode = SymbolTable::new_symbol("compileToBytecode");
     JavaValue result(T_VOID);
     JavaCalls::call_special(&result, lambda_form, SystemDictionary::LambdaForm_klass(), compileToBytecode, vmSymbols::void_method_signature(), CHECK);
   } else {
--- a/src/hotspot/share/jvmci/jvmciEnv.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jvmci/jvmciEnv.cpp	Tue May 14 11:29:18 2019 -0400
@@ -92,7 +92,7 @@
   }
 
   // Get the serialized saved properties from HotSpot
-  TempNewSymbol serializeSavedProperties = SymbolTable::new_symbol("serializeSavedProperties", CHECK_EXIT);
+  TempNewSymbol serializeSavedProperties = SymbolTable::new_symbol("serializeSavedProperties");
   JavaValue result(T_OBJECT);
   JavaCallArguments args;
   JavaCalls::call_static(&result, ik, serializeSavedProperties, vmSymbols::serializePropertiesToByteArray_signature(), &args, THREAD);
--- a/src/hotspot/share/jvmci/jvmciJavaClasses.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jvmci/jvmciJavaClasses.cpp	Tue May 14 11:29:18 2019 -0400
@@ -139,7 +139,7 @@
 #define METHOD(jniCallType, jniGetMethod, hsCallType, returnType, className, methodName, signatureSymbolName, args) \
   check_resolve_method(#hsCallType, k, vmSymbols::methodName##_name(), vmSymbols::signatureSymbolName(), CHECK);
 #define CONSTRUCTOR(className, signature) { \
-  TempNewSymbol sig = SymbolTable::new_symbol(signature, CHECK); \
+  TempNewSymbol sig = SymbolTable::new_symbol(signature); \
   check_resolve_method("call_special", k, vmSymbols::object_initializer_name(), sig, CHECK); \
   }
 #endif
--- a/src/hotspot/share/jvmci/jvmciRuntime.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/jvmci/jvmciRuntime.cpp	Tue May 14 11:29:18 2019 -0400
@@ -469,20 +469,20 @@
 JRT_END
 
 JRT_ENTRY(void, JVMCIRuntime::throw_and_post_jvmti_exception(JavaThread* thread, const char* exception, const char* message))
-  TempNewSymbol symbol = SymbolTable::new_symbol(exception, CHECK);
+  TempNewSymbol symbol = SymbolTable::new_symbol(exception);
   SharedRuntime::throw_and_post_jvmti_exception(thread, symbol, message);
 JRT_END
 
 JRT_ENTRY(void, JVMCIRuntime::throw_klass_external_name_exception(JavaThread* thread, const char* exception, Klass* klass))
   ResourceMark rm(thread);
-  TempNewSymbol symbol = SymbolTable::new_symbol(exception, CHECK);
+  TempNewSymbol symbol = SymbolTable::new_symbol(exception);
   SharedRuntime::throw_and_post_jvmti_exception(thread, symbol, klass->external_name());
 JRT_END
 
 JRT_ENTRY(void, JVMCIRuntime::throw_class_cast_exception(JavaThread* thread, const char* exception, Klass* caster_klass, Klass* target_klass))
   ResourceMark rm(thread);
   const char* message = SharedRuntime::generate_class_cast_message(caster_klass, target_klass);
-  TempNewSymbol symbol = SymbolTable::new_symbol(exception, CHECK);
+  TempNewSymbol symbol = SymbolTable::new_symbol(exception);
   SharedRuntime::throw_and_post_jvmti_exception(thread, symbol, message);
 JRT_END
 
@@ -1011,8 +1011,7 @@
     // This is a name from a signature.  Strip off the trimmings.
     // Call recursive to keep scope of strippedsym.
     TempNewSymbol strippedsym = SymbolTable::new_symbol(sym->as_utf8()+1,
-                    sym->utf8_length()-2,
-                    CHECK_NULL);
+                                                        sym->utf8_length()-2);
     return get_klass_by_name_impl(accessing_klass, cpool, strippedsym, require_local);
   }
 
@@ -1045,8 +1044,7 @@
     // We have an unloaded array.
     // Build it on the fly if the element class exists.
     TempNewSymbol elem_sym = SymbolTable::new_symbol(sym->as_utf8()+1,
-                                                 sym->utf8_length()-1,
-                                                 CHECK_NULL);
+                                                     sym->utf8_length()-1);
 
     // Get element Klass recursively.
     Klass* elem_klass =
--- a/src/hotspot/share/memory/heapShared.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/memory/heapShared.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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
@@ -884,8 +884,8 @@
                                             int num, Thread* THREAD) {
   for (int i = 0; i < num; i++) {
     ArchivableStaticFieldInfo* info = &fields[i];
-    TempNewSymbol klass_name =  SymbolTable::new_symbol(info->klass_name, THREAD);
-    TempNewSymbol field_name =  SymbolTable::new_symbol(info->field_name, THREAD);
+    TempNewSymbol klass_name =  SymbolTable::new_symbol(info->klass_name);
+    TempNewSymbol field_name =  SymbolTable::new_symbol(info->field_name);
 
     Klass* k = SystemDictionary::resolve_or_null(klass_name, THREAD);
     assert(k != NULL && !HAS_PENDING_EXCEPTION, "class must exist");
--- a/src/hotspot/share/memory/metaspaceShared.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/memory/metaspaceShared.cpp	Tue May 14 11:29:18 2019 -0400
@@ -371,7 +371,7 @@
     utf8_buffer[utf8_length] = '\0';
 
     if (prefix_type == HashtableTextDump::SymbolPrefix) {
-      SymbolTable::new_permanent_symbol(utf8_buffer, THREAD);
+      SymbolTable::new_permanent_symbol(utf8_buffer);
     } else{
       assert(prefix_type == HashtableTextDump::StringPrefix, "Sanity");
       oop s = StringTable::intern(utf8_buffer, THREAD);
--- a/src/hotspot/share/memory/universe.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/memory/universe.cpp	Tue May 14 11:29:18 2019 -0400
@@ -807,7 +807,7 @@
                              Symbol* signature,
                              bool is_static, TRAPS)
 {
-  TempNewSymbol name = SymbolTable::new_symbol(method, CHECK);
+  TempNewSymbol name = SymbolTable::new_symbol(method);
   Method* m = NULL;
   // The klass must be linked before looking up the method.
   if (!ik->link_class_or_fail(THREAD) ||
--- a/src/hotspot/share/oops/instanceKlass.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/oops/instanceKlass.cpp	Tue May 14 11:29:18 2019 -0400
@@ -2611,7 +2611,7 @@
     if (package_name == NULL) {
       return NULL;
     }
-    Symbol* pkg_name = SymbolTable::new_symbol(package_name, THREAD);
+    Symbol* pkg_name = SymbolTable::new_symbol(package_name);
     return pkg_name;
   }
 }
--- a/src/hotspot/share/oops/method.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/oops/method.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1579,7 +1579,7 @@
   Symbol*  signature = m->signature();
   for(SignatureStream ss(signature); !ss.is_done(); ss.next()) {
     if (ss.is_object()) {
-      Symbol* sym = ss.as_symbol(CHECK_(false));
+      Symbol* sym = ss.as_symbol();
       Symbol*  name  = sym;
       Klass* klass = SystemDictionary::resolve_or_null(name, class_loader,
                                              protection_domain, THREAD);
--- a/src/hotspot/share/oops/objArrayKlass.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/oops/objArrayKlass.cpp	Tue May 14 11:29:18 2019 -0400
@@ -116,7 +116,7 @@
       new_str[idx++] = ';';
     }
     new_str[idx++] = '\0';
-    name = SymbolTable::new_permanent_symbol(new_str, CHECK_0);
+    name = SymbolTable::new_permanent_symbol(new_str);
     if (element_klass->is_instance_klass()) {
       InstanceKlass* ik = InstanceKlass::cast(element_klass);
       ik->set_array_name(name);
--- a/src/hotspot/share/oops/symbol.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/oops/symbol.cpp	Tue May 14 11:29:18 2019 -0400
@@ -57,13 +57,13 @@
   }
 }
 
-void* Symbol::operator new(size_t sz, int len, TRAPS) throw() {
+void* Symbol::operator new(size_t sz, int len) throw() {
   int alloc_size = size(len)*wordSize;
   address res = (address) AllocateHeap(alloc_size, mtSymbol);
   return res;
 }
 
-void* Symbol::operator new(size_t sz, int len, Arena* arena, TRAPS) throw() {
+void* Symbol::operator new(size_t sz, int len, Arena* arena) throw() {
   int alloc_size = size(len)*wordSize;
   address res = (address)arena->Amalloc_4(alloc_size);
   return res;
--- a/src/hotspot/share/oops/symbol.hpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/oops/symbol.hpp	Tue May 14 11:29:18 2019 -0400
@@ -132,8 +132,8 @@
   }
 
   Symbol(const u1* name, int length, int refcount);
-  void* operator new(size_t size, int len, TRAPS) throw();
-  void* operator new(size_t size, int len, Arena* arena, TRAPS) throw();
+  void* operator new(size_t size, int len) throw();
+  void* operator new(size_t size, int len, Arena* arena) throw();
 
   void  operator delete(void* p);
 
--- a/src/hotspot/share/oops/typeArrayKlass.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/oops/typeArrayKlass.cpp	Tue May 14 11:29:18 2019 -0400
@@ -47,7 +47,7 @@
                                       const char* name_str, TRAPS) {
   Symbol* sym = NULL;
   if (name_str != NULL) {
-    sym = SymbolTable::new_permanent_symbol(name_str, CHECK_NULL);
+    sym = SymbolTable::new_permanent_symbol(name_str);
   }
 
   ClassLoaderData* null_loader_data = ClassLoaderData::the_null_class_loader_data();
--- a/src/hotspot/share/prims/jni.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/prims/jni.cpp	Tue May 14 11:29:18 2019 -0400
@@ -329,7 +329,7 @@
                          name);
       return 0;
     }
-    class_name = SymbolTable::new_symbol(name, CHECK_NULL);
+    class_name = SymbolTable::new_symbol(name);
   }
   ResourceMark rm(THREAD);
   ClassFileStream st((u1*)buf, bufLen, NULL, ClassFileStream::verify);
@@ -416,7 +416,7 @@
     }
   }
 
-  TempNewSymbol sym = SymbolTable::new_symbol(name, CHECK_NULL);
+  TempNewSymbol sym = SymbolTable::new_symbol(name);
   result = find_class_from_class_loader(env, sym, true, loader,
                                         protection_domain, true, thread);
 
@@ -3288,7 +3288,7 @@
   Handle loader;            // null (bootstrap) loader
   Handle protection_domain; // null protection domain
 
-  TempNewSymbol sym = SymbolTable::new_symbol(name, CHECK_NULL);
+  TempNewSymbol sym = SymbolTable::new_symbol(name);
   jclass result =  find_class_from_class_loader(env, sym, true, loader, protection_domain, true, CHECK_NULL);
 
   if (log_is_enabled(Debug, class, resolve) && result != NULL) {
--- a/src/hotspot/share/prims/jvm.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/prims/jvm.cpp	Tue May 14 11:29:18 2019 -0400
@@ -138,9 +138,9 @@
     vframeStream vfst(jthread);
 
     // scan up the stack skipping ClassLoader, AccessController and PrivilegedAction frames
-    TempNewSymbol access_controller = SymbolTable::new_symbol("java/security/AccessController", CHECK);
+    TempNewSymbol access_controller = SymbolTable::new_symbol("java/security/AccessController");
     Klass* access_controller_klass = SystemDictionary::resolve_or_fail(access_controller, false, CHECK);
-    TempNewSymbol privileged_action = SymbolTable::new_symbol("java/security/PrivilegedAction", CHECK);
+    TempNewSymbol privileged_action = SymbolTable::new_symbol("java/security/PrivilegedAction");
     Klass* privileged_action_klass = SystemDictionary::resolve_or_fail(privileged_action, false, CHECK);
 
     Method* last_caller = NULL;
@@ -786,7 +786,7 @@
     return NULL;
   }
 
-  TempNewSymbol h_name = SymbolTable::new_symbol(name, CHECK_NULL);
+  TempNewSymbol h_name = SymbolTable::new_symbol(name);
   Klass* k = SystemDictionary::resolve_or_null(h_name, CHECK_NULL);
   if (k == NULL) {
     return NULL;
@@ -810,7 +810,7 @@
     THROW_MSG_0(vmSymbols::java_lang_ClassNotFoundException(), name);
   }
 
-  TempNewSymbol h_name = SymbolTable::new_symbol(name, CHECK_NULL);
+  TempNewSymbol h_name = SymbolTable::new_symbol(name);
 
   oop loader_oop = JNIHandles::resolve(loader);
   oop from_class = JNIHandles::resolve(caller);
@@ -852,7 +852,7 @@
                        name);
     return 0;
   }
-  TempNewSymbol h_name = SymbolTable::new_symbol(name, CHECK_NULL);
+  TempNewSymbol h_name = SymbolTable::new_symbol(name);
   oop from_class_oop = JNIHandles::resolve(from);
   Klass* from_class = (from_class_oop == NULL)
                            ? (Klass*)NULL
@@ -933,7 +933,7 @@
                          name);
       return 0;
     }
-    class_name = SymbolTable::new_symbol(name, str_len, CHECK_NULL);
+    class_name = SymbolTable::new_symbol(name, str_len);
   }
 
   ResourceMark rm(THREAD);
@@ -989,7 +989,7 @@
     // into the constant pool.
     return NULL;
   }
-  TempNewSymbol klass_name = SymbolTable::new_symbol(str, str_len, CHECK_NULL);
+  TempNewSymbol klass_name = SymbolTable::new_symbol(str, str_len);
 
   // Security Note:
   //   The Java level wrapper will perform the necessary security check allowing
--- a/src/hotspot/share/prims/jvmtiImpl.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/prims/jvmtiImpl.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -609,7 +609,7 @@
     ty_sign++;
     len -= 2;
   }
-  TempNewSymbol ty_sym = SymbolTable::new_symbol(ty_sign, len, thread);
+  TempNewSymbol ty_sym = SymbolTable::new_symbol(ty_sign, len);
   if (klass->name() == ty_sym) {
     return true;
   }
--- a/src/hotspot/share/prims/methodHandles.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/prims/methodHandles.cpp	Tue May 14 11:29:18 2019 -0400
@@ -519,12 +519,12 @@
 // convert the external string or reflective type to an internal signature
 Symbol* MethodHandles::lookup_signature(oop type_str, bool intern_if_not_found, TRAPS) {
   if (java_lang_invoke_MethodType::is_instance(type_str)) {
-    return java_lang_invoke_MethodType::as_signature(type_str, intern_if_not_found, THREAD);
+    return java_lang_invoke_MethodType::as_signature(type_str, intern_if_not_found);
   } else if (java_lang_Class::is_instance(type_str)) {
-    return java_lang_Class::as_signature(type_str, false, THREAD);
+    return java_lang_Class::as_signature(type_str, false);
   } else if (java_lang_String::is_instance_inlined(type_str)) {
     if (intern_if_not_found) {
-      return java_lang_String::as_symbol(type_str, THREAD);
+      return java_lang_String::as_symbol(type_str);
     } else {
       return java_lang_String::as_symbol_or_null(type_str);
     }
@@ -602,7 +602,7 @@
     }
     const char* sigstr =       buffer.base();
     int         siglen = (int) buffer.size();
-    bsig = SymbolTable::new_symbol(sigstr, siglen, THREAD);
+    bsig = SymbolTable::new_symbol(sigstr, siglen);
   }
   assert(is_basic_type_signature(bsig) ||
          // detune assert in case the injected argument is not a basic type:
--- a/src/hotspot/share/prims/nativeLookup.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/prims/nativeLookup.cpp	Tue May 14 11:29:18 2019 -0400
@@ -407,9 +407,9 @@
 address NativeLookup::base_library_lookup(const char* class_name, const char* method_name, const char* signature) {
   EXCEPTION_MARK;
   bool in_base_library = true;  // SharedRuntime inits some math methods.
-  TempNewSymbol c_name = SymbolTable::new_symbol(class_name,  CATCH);
-  TempNewSymbol m_name = SymbolTable::new_symbol(method_name, CATCH);
-  TempNewSymbol s_name = SymbolTable::new_symbol(signature,   CATCH);
+  TempNewSymbol c_name = SymbolTable::new_symbol(class_name);
+  TempNewSymbol m_name = SymbolTable::new_symbol(method_name);
+  TempNewSymbol s_name = SymbolTable::new_symbol(signature);
 
   // Find the class
   Klass* k = SystemDictionary::resolve_or_fail(c_name, true, CATCH);
--- a/src/hotspot/share/prims/wbtestmethods/parserTests.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/prims/wbtestmethods/parserTests.cpp	Tue May 14 11:29:18 2019 -0400
@@ -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
@@ -51,7 +51,7 @@
 static const char* lookup_diagnosticArgumentEnum(const char* field_name, oop object) {
   Thread* THREAD = Thread::current();
   const char* enum_sig = "Lsun/hotspot/parser/DiagnosticCommand$DiagnosticArgumentType;";
-  TempNewSymbol enumSigSymbol = SymbolTable::lookup(enum_sig, (int) strlen(enum_sig), THREAD);
+  TempNewSymbol enumSigSymbol = SymbolTable::new_symbol(enum_sig);
   int offset = WhiteBox::offset_for_field(field_name, object, enumSigSymbol);
   oop enumOop = object->obj_field(offset);
 
--- a/src/hotspot/share/prims/whitebox.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/prims/whitebox.cpp	Tue May 14 11:29:18 2019 -0400
@@ -179,7 +179,7 @@
 WB_ENTRY(jboolean, WB_IsClassAlive(JNIEnv* env, jobject target, jstring name))
   oop h_name = JNIHandles::resolve(name);
   if (h_name == NULL) return false;
-  Symbol* sym = java_lang_String::as_symbol(h_name, CHECK_false);
+  Symbol* sym = java_lang_String::as_symbol(h_name);
   TempNewSymbol tsym(sym); // Make sure to decrement reference count on sym on return
 
   WBIsKlassAliveClosure closure(sym);
@@ -191,7 +191,7 @@
 WB_ENTRY(jint, WB_GetSymbolRefcount(JNIEnv* env, jobject unused, jstring name))
   oop h_name = JNIHandles::resolve(name);
   if (h_name == NULL) return false;
-  Symbol* sym = java_lang_String::as_symbol(h_name, CHECK_0);
+  Symbol* sym = java_lang_String::as_symbol(h_name);
   TempNewSymbol tsym(sym); // Make sure to decrement reference count on sym on return
   return (jint)sym->refcount();
 WB_END
@@ -1996,8 +1996,7 @@
   InstanceKlass* ik = InstanceKlass::cast(arg_klass);
 
   //Create symbols to look for in the class
-  TempNewSymbol name_symbol = SymbolTable::lookup(field_name, (int) strlen(field_name),
-      THREAD);
+  TempNewSymbol name_symbol = SymbolTable::new_symbol(field_name);
 
   //To be filled in with an offset of the field we're looking for
   fieldDescriptor fd;
--- a/src/hotspot/share/runtime/deoptimization.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/runtime/deoptimization.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1430,7 +1430,7 @@
   ResourceMark rm(THREAD);
   for (SignatureStream ss(symbol); !ss.is_done(); ss.next()) {
     if (ss.is_object()) {
-      Symbol* class_name = ss.as_symbol(CHECK);
+      Symbol* class_name = ss.as_symbol();
       Handle protection_domain (THREAD, constant_pool->pool_holder()->protection_domain());
       SystemDictionary::resolve_or_null(class_name, class_loader, protection_domain, CHECK);
     }
--- a/src/hotspot/share/runtime/fieldType.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/runtime/fieldType.cpp	Tue May 14 11:29:18 2019 -0400
@@ -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
@@ -82,7 +82,7 @@
     int len = (int)strlen(element);
     assert(element[len-1] == ';', "last char should be a semicolon");
     element[len-1] = '\0';        // chop off semicolon
-    fd._object_key = SymbolTable::new_symbol(element + 1, CHECK_(T_BYTE));
+    fd._object_key = SymbolTable::new_symbol(element + 1);
   }
   // Pass dimension back to caller
   fd._dimension = dim;
--- a/src/hotspot/share/runtime/reflection.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/runtime/reflection.cpp	Tue May 14 11:29:18 2019 -0400
@@ -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
@@ -757,7 +757,7 @@
 
 
   if (T_OBJECT == ss->type() || T_ARRAY == ss->type()) {
-    Symbol* name = ss->as_symbol(CHECK_NULL);
+    Symbol* name = ss->as_symbol();
     oop loader = method->method_holder()->class_loader();
     oop protection_domain = method->method_holder()->protection_domain();
     const Klass* k = SystemDictionary::resolve_or_fail(name,
--- a/src/hotspot/share/runtime/signature.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/runtime/signature.cpp	Tue May 14 11:29:18 2019 -0400
@@ -336,7 +336,7 @@
   return _type == T_ARRAY;
 }
 
-Symbol* SignatureStream::as_symbol(TRAPS) {
+Symbol* SignatureStream::as_symbol() {
   // Create a symbol from for string _begin _end
   int begin = _begin;
   int end   = _end;
@@ -368,7 +368,7 @@
 
   // Save names for cleaning up reference count at the end of
   // SignatureStream scope.
-  name = SymbolTable::new_symbol(symbol_chars, len, CHECK_NULL);
+  name = SymbolTable::new_symbol(symbol_chars, len);
   if (!name->is_permanent()) {
     if (_names == NULL) {
       _names = new GrowableArray<Symbol*>(10);
@@ -380,9 +380,9 @@
 }
 
 Klass* SignatureStream::as_klass(Handle class_loader, Handle protection_domain,
-                                   FailureMode failure_mode, TRAPS) {
+                                 FailureMode failure_mode, TRAPS) {
   if (!is_object())  return NULL;
-  Symbol* name = as_symbol(CHECK_NULL);
+  Symbol* name = as_symbol();
   if (failure_mode == ReturnNull) {
     return SystemDictionary::resolve_or_null(name, class_loader, protection_domain, THREAD);
   } else {
--- a/src/hotspot/share/runtime/signature.hpp	Tue May 14 11:28:44 2019 -0400
+++ b/src/hotspot/share/runtime/signature.hpp	Tue May 14 11:29:18 2019 -0400
@@ -400,7 +400,7 @@
   bool is_object() const;                        // True if this argument is an object
   bool is_array() const;                         // True if this argument is an array
   BasicType type() const                         { return _type; }
-  Symbol* as_symbol(TRAPS);
+  Symbol* as_symbol();
   enum FailureMode { ReturnNull, NCDFError };
   Klass* as_klass(Handle class_loader, Handle protection_domain, FailureMode failure_mode, TRAPS);
   oop as_java_mirror(Handle class_loader, Handle protection_domain, FailureMode failure_mode, TRAPS);
--- a/test/hotspot/gtest/classfile/test_symbolTable.cpp	Tue May 14 11:28:44 2019 -0400
+++ b/test/hotspot/gtest/classfile/test_symbolTable.cpp	Tue May 14 11:29:18 2019 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 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
@@ -34,14 +34,14 @@
   // the thread should be in vm to use locks
   ThreadInVMfromNative ThreadInVMfromNative(THREAD);
 
-  Symbol* abc = SymbolTable::new_symbol("abc", CATCH);
+  Symbol* abc = SymbolTable::new_symbol("abc");
   int abccount = abc->refcount();
   TempNewSymbol ss = abc;
   ASSERT_EQ(ss->refcount(), abccount) << "only one abc";
   ASSERT_EQ(ss->refcount(), abc->refcount()) << "should match TempNewSymbol";
 
-  Symbol* efg = SymbolTable::new_symbol("efg", CATCH);
-  Symbol* hij = SymbolTable::new_symbol("hij", CATCH);
+  Symbol* efg = SymbolTable::new_symbol("efg");
+  Symbol* hij = SymbolTable::new_symbol("hij");
   int efgcount = efg->refcount();
   int hijcount = hij->refcount();
 
@@ -63,12 +63,12 @@
   ASSERT_EQ(s1->refcount(), abccount + 1) << "should still be two abc (s1 and ss)";
 
   TempNewSymbol s3;
-  Symbol* klm = SymbolTable::new_symbol("klm", CATCH);
+  Symbol* klm = SymbolTable::new_symbol("klm");
   int klmcount = klm->refcount();
   s3 = klm; // assignment
   ASSERT_EQ(s3->refcount(), klmcount) << "only one klm now";
 
-  Symbol* xyz = SymbolTable::new_symbol("xyz", CATCH);
+  Symbol* xyz = SymbolTable::new_symbol("xyz");
   int xyzcount = xyz->refcount();
   { // inner scope
     TempNewSymbol s_inner = xyz;
@@ -77,7 +77,7 @@
           << "Should have been decremented by dtor in inner scope";
 
   // Test overflowing refcount making symbol permanent
-  Symbol* bigsym = SymbolTable::new_symbol("bigsym", CATCH);
+  Symbol* bigsym = SymbolTable::new_symbol("bigsym");
   for (int i = 0; i < PERM_REFCOUNT + 100; i++) {
     bigsym->increment_refcount();
   }
@@ -101,9 +101,8 @@
   SymbolThread(Semaphore* post) : JavaTestThread(post) {}
   virtual ~SymbolThread() {}
   void main_run() {
-    Thread* THREAD = Thread::current();
     for (int i = 0; i < 1000; i++) {
-      TempNewSymbol sym = SymbolTable::new_symbol(symbol_name, CATCH);
+      TempNewSymbol sym = SymbolTable::new_symbol(symbol_name);
       // Create and destroy new symbol
       EXPECT_TRUE(sym->refcount() != 0) << "Symbol refcount unexpectedly zeroed";
     }
@@ -121,12 +120,10 @@
   void main_run() {
     Semaphore done(0);
 
-    Thread* THREAD = Thread::current();
-
     // Find a symbol where there will probably be only one instance.
     for (int i = 0; i < 100; i++) {
        os::snprintf(symbol_name, SYM_NAME_LENGTH, "some_symbol%d", i);
-       TempNewSymbol ts = SymbolTable::new_symbol(symbol_name, CATCH);
+       TempNewSymbol ts = SymbolTable::new_symbol(symbol_name);
        if (ts->refcount() == 1) {
          EXPECT_TRUE(ts->refcount() == 1) << "Symbol is just created";
          break;  // found a unique symbol