1962
1963 // Adjust dictionary
1964 dictionary()->roots_oops_do(strong, weak);
1965
1966 // Visit extra methods
1967 invoke_method_table()->oops_do(strong);
1968 }
1969
1970 void SystemDictionary::oops_do(OopClosure* f) {
1971 f->do_oop(&_java_system_loader);
1972 f->do_oop(&_system_loader_lock_obj);
1973 CDS_ONLY(SystemDictionaryShared::oops_do(f);)
1974
1975 // Adjust dictionary
1976 dictionary()->oops_do(f);
1977
1978 // Visit extra methods
1979 invoke_method_table()->oops_do(f);
1980 }
1981
1982 // Extended Class redefinition support.
1983 // If one of these classes is replaced, we need to replace it in these places.
1984 // KlassClosure::do_klass should take the address of a class but we can
1985 // change that later.
1986 void SystemDictionary::preloaded_classes_do(KlassClosure* f) {
1987 for (int k = (int)FIRST_WKID; k < (int)WKID_LIMIT; k++) {
1988 f->do_klass(_well_known_klasses[k]);
1989 }
1990
1991 {
1992 for (int i = 0; i < T_VOID+1; i++) {
1993 if (_box_klasses[i] != NULL) {
1994 assert(i >= T_BOOLEAN, "checking");
1995 f->do_klass(_box_klasses[i]);
1996 }
1997 }
1998 }
1999
2000 FilteredFieldsMap::classes_do(f);
2001 }
2002
2003 void SystemDictionary::lazily_loaded_classes_do(KlassClosure* f) {
2004 f->do_klass(_abstract_ownable_synchronizer_klass);
2005 }
2006
2007 // Just the classes from defining class loaders
2008 // Don't iterate over placeholders
2009 void SystemDictionary::classes_do(void f(Klass*)) {
2010 dictionary()->classes_do(f);
2011 }
2012
2013 // Added for initialize_itable_for_klass
2014 // Just the classes from defining class loaders
2015 // Don't iterate over placeholders
2016 void SystemDictionary::classes_do(void f(Klass*, TRAPS), TRAPS) {
2017 dictionary()->classes_do(f, CHECK);
2018 }
2019
2020 // All classes, and their class loaders
2021 // Don't iterate over placeholders
2022 void SystemDictionary::classes_do(void f(Klass*, ClassLoaderData*)) {
2023 dictionary()->classes_do(f);
2024 }
2025
2026 void SystemDictionary::placeholders_do(void f(Symbol*)) {
2027 placeholders()->entries_do(f);
2028 }
2029
2030 void SystemDictionary::methods_do(void f(Method*)) {
2031 dictionary()->methods_do(f);
2032 invoke_method_table()->methods_do(f);
2033 }
2034
2035 void SystemDictionary::remove_classes_in_error_state() {
2036 dictionary()->remove_classes_in_error_state();
2037 }
2038
2039 // ----------------------------------------------------------------------------
2040 // Lazily load klasses
2041
2042 void SystemDictionary::load_abstract_ownable_synchronizer_klass(TRAPS) {
2043 // if multiple threads calling this function, only one thread will load
2044 // the class. The other threads will find the loaded version once the
2045 // class is loaded.
2046 Klass* aos = _abstract_ownable_synchronizer_klass;
2047 if (aos == NULL) {
2048 Klass* k = resolve_or_fail(vmSymbols::java_util_concurrent_locks_AbstractOwnableSynchronizer(), true, CHECK);
2049 // Force a fence to prevent any read before the write completes
2050 OrderAccess::fence();
2051 _abstract_ownable_synchronizer_klass = InstanceKlass::cast(k);
|
1962
1963 // Adjust dictionary
1964 dictionary()->roots_oops_do(strong, weak);
1965
1966 // Visit extra methods
1967 invoke_method_table()->oops_do(strong);
1968 }
1969
1970 void SystemDictionary::oops_do(OopClosure* f) {
1971 f->do_oop(&_java_system_loader);
1972 f->do_oop(&_system_loader_lock_obj);
1973 CDS_ONLY(SystemDictionaryShared::oops_do(f);)
1974
1975 // Adjust dictionary
1976 dictionary()->oops_do(f);
1977
1978 // Visit extra methods
1979 invoke_method_table()->oops_do(f);
1980 }
1981
1982 // Just the classes from defining class loaders
1983 // Don't iterate over placeholders
1984 void SystemDictionary::classes_do(void f(Klass*)) {
1985 dictionary()->classes_do(f);
1986 }
1987
1988 // Added for initialize_itable_for_klass
1989 // Just the classes from defining class loaders
1990 // Don't iterate over placeholders
1991 void SystemDictionary::classes_do(void f(Klass*, TRAPS), TRAPS) {
1992 dictionary()->classes_do(f, CHECK);
1993 }
1994
1995 // All classes, and their class loaders
1996 // Don't iterate over placeholders
1997 void SystemDictionary::classes_do(void f(Klass*, ClassLoaderData*)) {
1998 dictionary()->classes_do(f);
1999 }
2000
2001 void SystemDictionary::methods_do(void f(Method*)) {
2002 ClassLoaderDataGraph::methods_do(f);
2003 invoke_method_table()->methods_do(f);
2004 }
2005
2006 void SystemDictionary::remove_classes_in_error_state() {
2007 dictionary()->remove_classes_in_error_state();
2008 }
2009
2010 // ----------------------------------------------------------------------------
2011 // Lazily load klasses
2012
2013 void SystemDictionary::load_abstract_ownable_synchronizer_klass(TRAPS) {
2014 // if multiple threads calling this function, only one thread will load
2015 // the class. The other threads will find the loaded version once the
2016 // class is loaded.
2017 Klass* aos = _abstract_ownable_synchronizer_klass;
2018 if (aos == NULL) {
2019 Klass* k = resolve_or_fail(vmSymbols::java_util_concurrent_locks_AbstractOwnableSynchronizer(), true, CHECK);
2020 // Force a fence to prevent any read before the write completes
2021 OrderAccess::fence();
2022 _abstract_ownable_synchronizer_klass = InstanceKlass::cast(k);
|