hotspot/src/share/vm/classfile/systemDictionary.cpp
changeset 46746 ea379ebb9447
parent 46742 24ec8a039c90
child 46747 7b6570052b58
equal deleted inserted replaced
46745:f7b9bb98bb72 46746:ea379ebb9447
    47 #include "interpreter/bytecodeStream.hpp"
    47 #include "interpreter/bytecodeStream.hpp"
    48 #include "interpreter/interpreter.hpp"
    48 #include "interpreter/interpreter.hpp"
    49 #include "logging/log.hpp"
    49 #include "logging/log.hpp"
    50 #include "logging/logStream.hpp"
    50 #include "logging/logStream.hpp"
    51 #include "memory/filemap.hpp"
    51 #include "memory/filemap.hpp"
       
    52 #include "memory/metaspaceClosure.hpp"
    52 #include "memory/oopFactory.hpp"
    53 #include "memory/oopFactory.hpp"
    53 #include "memory/resourceArea.hpp"
    54 #include "memory/resourceArea.hpp"
    54 #include "oops/instanceKlass.hpp"
    55 #include "oops/instanceKlass.hpp"
    55 #include "oops/instanceRefKlass.hpp"
    56 #include "oops/instanceRefKlass.hpp"
    56 #include "oops/klass.inline.hpp"
    57 #include "oops/klass.inline.hpp"
  1948 
  1949 
  1949   // Visit extra methods
  1950   // Visit extra methods
  1950   invoke_method_table()->oops_do(f);
  1951   invoke_method_table()->oops_do(f);
  1951 
  1952 
  1952   ResolvedMethodTable::oops_do(f);
  1953   ResolvedMethodTable::oops_do(f);
       
  1954 }
       
  1955 
       
  1956 // CDS: scan and relocate all classes in the system dictionary.
       
  1957 void SystemDictionary::classes_do(MetaspaceClosure* it) {
       
  1958   ClassLoaderData::the_null_class_loader_data()->dictionary()->classes_do(it);
       
  1959 }
       
  1960 
       
  1961 // CDS: scan and relocate all classes referenced by _well_known_klasses[].
       
  1962 void SystemDictionary::well_known_klasses_do(MetaspaceClosure* it) {
       
  1963   for (int id = FIRST_WKID; id < WKID_LIMIT; id++) {
       
  1964     it->push(well_known_klass_addr((WKID)id));
       
  1965   }
  1953 }
  1966 }
  1954 
  1967 
  1955 void SystemDictionary::methods_do(void f(Method*)) {
  1968 void SystemDictionary::methods_do(void f(Method*)) {
  1956   // Walk methods in loaded classes
  1969   // Walk methods in loaded classes
  1957   ClassLoaderDataGraph::methods_do(f);
  1970   ClassLoaderDataGraph::methods_do(f);
  2791 
  2804 
  2792 ProtectionDomainCacheEntry* SystemDictionary::cache_get(Handle protection_domain) {
  2805 ProtectionDomainCacheEntry* SystemDictionary::cache_get(Handle protection_domain) {
  2793   return _pd_cache_table->get(protection_domain);
  2806   return _pd_cache_table->get(protection_domain);
  2794 }
  2807 }
  2795 
  2808 
  2796 
  2809 void SystemDictionary::reorder_dictionary_for_sharing() {
  2797 void SystemDictionary::reorder_dictionary() {
  2810   ClassLoaderData::the_null_class_loader_data()->dictionary()->reorder_dictionary_for_sharing();
  2798   ClassLoaderData::the_null_class_loader_data()->dictionary()->reorder_dictionary();
  2811 }
  2799 }
  2812 
  2800 
  2813 size_t SystemDictionary::count_bytes_for_buckets() {
  2801 
  2814   return ClassLoaderData::the_null_class_loader_data()->dictionary()->count_bytes_for_buckets();
  2802 void SystemDictionary::copy_buckets(char** top, char* end) {
  2815 }
       
  2816 
       
  2817 size_t SystemDictionary::count_bytes_for_table() {
       
  2818   return ClassLoaderData::the_null_class_loader_data()->dictionary()->count_bytes_for_table();
       
  2819 }
       
  2820 
       
  2821 void SystemDictionary::copy_buckets(char* top, char* end) {
  2803   ClassLoaderData::the_null_class_loader_data()->dictionary()->copy_buckets(top, end);
  2822   ClassLoaderData::the_null_class_loader_data()->dictionary()->copy_buckets(top, end);
  2804 }
  2823 }
  2805 
  2824 
  2806 
  2825 void SystemDictionary::copy_table(char* top, char* end) {
  2807 void SystemDictionary::copy_table(char** top, char* end) {
       
  2808   ClassLoaderData::the_null_class_loader_data()->dictionary()->copy_table(top, end);
  2826   ClassLoaderData::the_null_class_loader_data()->dictionary()->copy_table(top, end);
  2809 }
  2827 }
  2810 
  2828 
  2811 // ----------------------------------------------------------------------------
  2829 // ----------------------------------------------------------------------------
  2812 void SystemDictionary::print_shared(outputStream *st) {
  2830 void SystemDictionary::print_shared(outputStream *st) {