--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp Tue Oct 09 10:09:34 2012 -0700
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp Fri Oct 12 09:22:52 2012 -0700
@@ -291,16 +291,6 @@
Handle protection_domain,
bool is_superclass,
TRAPS) {
-
- // Try to get one of the well-known klasses.
- // They are trusted, and do not participate in circularities.
- if (LinkWellKnownClasses) {
- Klass* k = find_well_known_klass(class_name);
- if (k != NULL) {
- return k;
- }
- }
-
// Double-check, if child class is already loaded, just return super-class,interface
// Don't add a placedholder if already loaded, i.e. already in system dictionary
// Make sure there's a placeholder for the *child* before resolving.
@@ -926,14 +916,6 @@
Klass* k = NULL;
assert(class_name != NULL, "class name must be non NULL");
- // Try to get one of the well-known klasses.
- if (LinkWellKnownClasses) {
- k = find_well_known_klass(class_name);
- if (k != NULL) {
- return k;
- }
- }
-
if (FieldType::is_array(class_name)) {
// The name refers to an array. Parse the name.
// dimension and object_key in FieldArrayInfo are assigned as a
@@ -954,38 +936,6 @@
return k;
}
-// Quick range check for names of well-known classes:
-static Symbol* wk_klass_name_limits[2] = {NULL, NULL};
-
-#ifndef PRODUCT
-static int find_wkk_calls, find_wkk_probes, find_wkk_wins;
-// counts for "hello world": 3983, 1616, 1075
-// => 60% hit after limit guard, 25% total win rate
-#endif
-
-Klass* SystemDictionary::find_well_known_klass(Symbol* class_name) {
- // A bounds-check on class_name will quickly get a negative result.
- NOT_PRODUCT(find_wkk_calls++);
- if (class_name >= wk_klass_name_limits[0] &&
- class_name <= wk_klass_name_limits[1]) {
- NOT_PRODUCT(find_wkk_probes++);
- vmSymbols::SID sid = vmSymbols::find_sid(class_name);
- if (sid != vmSymbols::NO_SID) {
- Klass* k = NULL;
- switch (sid) {
- #define WK_KLASS_CASE(name, symbol, ignore_option) \
- case vmSymbols::VM_SYMBOL_ENUM_NAME(symbol): \
- k = WK_KLASS(name); break;
- WK_KLASSES_DO(WK_KLASS_CASE)
- #undef WK_KLASS_CASE
- }
- NOT_PRODUCT(if (k != NULL) find_wkk_wins++);
- return k;
- }
- }
- return NULL;
-}
-
// Note: this method is much like resolve_from_stream, but
// updates no supplemental data structures.
// TODO consolidate the two methods with a helper routine?
@@ -1939,23 +1889,12 @@
int opt = (info & right_n_bits(CEIL_LG_OPTION_LIMIT));
initialize_wk_klass((WKID)id, opt, CHECK);
-
- // Update limits, so find_well_known_klass can be very fast:
- Symbol* s = vmSymbols::symbol_at((vmSymbols::SID)sid);
- if (wk_klass_name_limits[1] == NULL) {
- wk_klass_name_limits[0] = wk_klass_name_limits[1] = s;
- } else if (wk_klass_name_limits[1] < s) {
- wk_klass_name_limits[1] = s;
- } else if (wk_klass_name_limits[0] > s) {
- wk_klass_name_limits[0] = s;
- }
}
// move the starting value forward to the limit:
start_id = limit_id;
}
-
void SystemDictionary::initialize_preloaded_classes(TRAPS) {
assert(WK_KLASS(Object_klass) == NULL, "preloaded classes should only be initialized once");
// Preload commonly used klasses