--- a/src/hotspot/share/oops/instanceKlass.cpp Wed Oct 11 17:11:28 2017 -0700
+++ b/src/hotspot/share/oops/instanceKlass.cpp Thu Oct 19 19:23:48 2017 -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,