src/hotspot/share/oops/instanceKlass.cpp
changeset 47668 fc4cfca10556
parent 47634 6a0c42c40cd1
child 47673 6126617b8508
equal deleted inserted replaced
47667:390896759aa2 47668:fc4cfca10556
   149   const int size = InstanceKlass::size(parser.vtable_size(),
   149   const int size = InstanceKlass::size(parser.vtable_size(),
   150                                        parser.itable_size(),
   150                                        parser.itable_size(),
   151                                        nonstatic_oop_map_size(parser.total_oop_map_count()),
   151                                        nonstatic_oop_map_size(parser.total_oop_map_count()),
   152                                        parser.is_interface(),
   152                                        parser.is_interface(),
   153                                        parser.is_anonymous(),
   153                                        parser.is_anonymous(),
   154                                        should_store_fingerprint());
   154                                        should_store_fingerprint(parser.is_anonymous()));
   155 
   155 
   156   const Symbol* const class_name = parser.class_name();
   156   const Symbol* const class_name = parser.class_name();
   157   assert(class_name != NULL, "invariant");
   157   assert(class_name != NULL, "invariant");
   158   ClassLoaderData* loader_data = parser.loader_data();
   158   ClassLoaderData* loader_data = parser.loader_data();
   159   assert(loader_data != NULL, "invariant");
   159   assert(loader_data != NULL, "invariant");
  1955   }
  1955   }
  1956 
  1956 
  1957   return true;
  1957   return true;
  1958 }
  1958 }
  1959 
  1959 
  1960 bool InstanceKlass::should_store_fingerprint() {
  1960 bool InstanceKlass::should_store_fingerprint(bool is_anonymous) {
  1961 #if INCLUDE_AOT
  1961 #if INCLUDE_AOT
  1962   // We store the fingerprint into the InstanceKlass only in the following 2 cases:
  1962   // We store the fingerprint into the InstanceKlass only in the following 2 cases:
  1963   if (CalculateClassFingerprint) {
  1963   if (CalculateClassFingerprint) {
  1964     // (1) We are running AOT to generate a shared library.
  1964     // (1) We are running AOT to generate a shared library.
  1965     return true;
  1965     return true;
  1966   }
  1966   }
  1967   if (DumpSharedSpaces) {
  1967   if (DumpSharedSpaces) {
  1968     // (2) We are running -Xshare:dump to create a shared archive
  1968     // (2) We are running -Xshare:dump to create a shared archive
       
  1969     return true;
       
  1970   }
       
  1971   if (UseAOT && is_anonymous) {
       
  1972     // (3) We are using AOT code from a shared library and see an anonymous class
  1969     return true;
  1973     return true;
  1970   }
  1974   }
  1971 #endif
  1975 #endif
  1972 
  1976 
  1973   // In all other cases we might set the _misc_has_passed_fingerprint_check bit,
  1977   // In all other cases we might set the _misc_has_passed_fingerprint_check bit,