--- old/src/hotspot/share/oops/instanceKlass.cpp 2017-10-17 18:30:41.147836270 -0700 +++ new/src/hotspot/share/oops/instanceKlass.cpp 2017-10-17 18:30:40.783820152 -0700 @@ -151,7 +151,7 @@ nonstatic_oop_map_size(parser.total_oop_map_count()), parser.is_interface(), parser.is_anonymous(), - should_store_fingerprint()); + should_store_fingerprint(parser.is_anonymous())); const Symbol* const class_name = parser.class_name(); assert(class_name != NULL, "invariant"); @@ -1957,7 +1957,7 @@ return true; } -bool InstanceKlass::should_store_fingerprint() { +bool InstanceKlass::should_store_fingerprint(bool is_anonymous) { #if INCLUDE_AOT // We store the fingerprint into the InstanceKlass only in the following 2 cases: if (CalculateClassFingerprint) { @@ -1968,6 +1968,10 @@ // (2) We are running -Xshare:dump to create a shared archive return true; } + if (UseAOT && is_anonymous) { + // (3) We are using AOT code from a shared library and see an anonymous class + return true; + } #endif // In all other cases we might set the _misc_has_passed_fingerprint_check bit,