hotspot/src/share/vm/classfile/systemDictionary.cpp
changeset 46380 4a51438196cf
parent 46329 53ccc37bda19
child 46387 c46632622b17
equal deleted inserted replaced
46379:43ec76e10184 46380:4a51438196cf
  1883 
  1883 
  1884 void SystemDictionary::always_strong_oops_do(OopClosure* blk) {
  1884 void SystemDictionary::always_strong_oops_do(OopClosure* blk) {
  1885   roots_oops_do(blk, NULL);
  1885   roots_oops_do(blk, NULL);
  1886 }
  1886 }
  1887 
  1887 
  1888 void SystemDictionary::always_strong_classes_do(KlassClosure* closure) {
       
  1889   // Follow all system classes and temporary placeholders in dictionary
       
  1890   dictionary()->always_strong_classes_do(closure);
       
  1891 
       
  1892   // Placeholders. These represent classes we're actively loading.
       
  1893   placeholders()->classes_do(closure);
       
  1894 }
       
  1895 
       
  1896 // Calculate a "good" systemdictionary size based
  1888 // Calculate a "good" systemdictionary size based
  1897 // on predicted or current loaded classes count
  1889 // on predicted or current loaded classes count
  1898 int SystemDictionary::calculate_systemdictionary_size(int classcount) {
  1890 int SystemDictionary::calculate_systemdictionary_size(int classcount) {
  1899   int newsize = _old_default_sdsize;
  1891   int newsize = _old_default_sdsize;
  1900   if ((classcount > 0)  && !DumpSharedSpaces) {
  1892   if ((classcount > 0)  && !DumpSharedSpaces) {
  1972 
  1964 
  1973   // Visit extra methods
  1965   // Visit extra methods
  1974   invoke_method_table()->oops_do(f);
  1966   invoke_method_table()->oops_do(f);
  1975 }
  1967 }
  1976 
  1968 
  1977 // Extended Class redefinition support.
       
  1978 // If one of these classes is replaced, we need to replace it in these places.
       
  1979 // KlassClosure::do_klass should take the address of a class but we can
       
  1980 // change that later.
       
  1981 void SystemDictionary::preloaded_classes_do(KlassClosure* f) {
       
  1982   for (int k = (int)FIRST_WKID; k < (int)WKID_LIMIT; k++) {
       
  1983     f->do_klass(_well_known_klasses[k]);
       
  1984   }
       
  1985 
       
  1986   {
       
  1987     for (int i = 0; i < T_VOID+1; i++) {
       
  1988       if (_box_klasses[i] != NULL) {
       
  1989         assert(i >= T_BOOLEAN, "checking");
       
  1990         f->do_klass(_box_klasses[i]);
       
  1991       }
       
  1992     }
       
  1993   }
       
  1994 
       
  1995   FilteredFieldsMap::classes_do(f);
       
  1996 }
       
  1997 
       
  1998 void SystemDictionary::lazily_loaded_classes_do(KlassClosure* f) {
       
  1999   f->do_klass(_abstract_ownable_synchronizer_klass);
       
  2000 }
       
  2001 
       
  2002 // Just the classes from defining class loaders
  1969 // Just the classes from defining class loaders
  2003 // Don't iterate over placeholders
  1970 // Don't iterate over placeholders
  2004 void SystemDictionary::classes_do(void f(Klass*)) {
  1971 void SystemDictionary::classes_do(void f(Klass*)) {
  2005   dictionary()->classes_do(f);
  1972   dictionary()->classes_do(f);
  2006 }
  1973 }
  2016 // Don't iterate over placeholders
  1983 // Don't iterate over placeholders
  2017 void SystemDictionary::classes_do(void f(Klass*, ClassLoaderData*)) {
  1984 void SystemDictionary::classes_do(void f(Klass*, ClassLoaderData*)) {
  2018   dictionary()->classes_do(f);
  1985   dictionary()->classes_do(f);
  2019 }
  1986 }
  2020 
  1987 
  2021 void SystemDictionary::placeholders_do(void f(Symbol*)) {
       
  2022   placeholders()->entries_do(f);
       
  2023 }
       
  2024 
       
  2025 void SystemDictionary::methods_do(void f(Method*)) {
  1988 void SystemDictionary::methods_do(void f(Method*)) {
  2026   dictionary()->methods_do(f);
  1989   // Walk methods in loaded classes
       
  1990   ClassLoaderDataGraph::methods_do(f);
       
  1991   // Walk method handle intrinsics
  2027   invoke_method_table()->methods_do(f);
  1992   invoke_method_table()->methods_do(f);
  2028 }
  1993 }
  2029 
  1994 
  2030 void SystemDictionary::remove_classes_in_error_state() {
  1995 void SystemDictionary::remove_classes_in_error_state() {
  2031   dictionary()->remove_classes_in_error_state();
  1996   dictionary()->remove_classes_in_error_state();