--- old/src/share/vm/memory/universe.cpp Fri Jan 2 22:00:36 2015 +++ new/src/share/vm/memory/universe.cpp Fri Jan 2 22:00:35 2015 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -115,6 +115,7 @@ LatestMethodCache* Universe::_finalizer_register_cache = NULL; LatestMethodCache* Universe::_loader_addClass_cache = NULL; LatestMethodCache* Universe::_pd_implies_cache = NULL; +LatestMethodCache* Universe::_throw_illegal_access_error_cache = NULL; oop Universe::_out_of_memory_error_java_heap = NULL; oop Universe::_out_of_memory_error_metaspace = NULL; oop Universe::_out_of_memory_error_class_metaspace = NULL; @@ -130,7 +131,6 @@ oop Universe::_vm_exception = NULL; oop Universe::_allocation_context_notification_obj = NULL; -Method* Universe::_throw_illegal_access_error = NULL; Array* Universe::_the_empty_int_array = NULL; Array* Universe::_the_empty_short_array = NULL; Array* Universe::_the_empty_klass_array = NULL; @@ -236,6 +236,7 @@ _finalizer_register_cache->serialize(f); _loader_addClass_cache->serialize(f); _pd_implies_cache->serialize(f); + _throw_illegal_access_error_cache->serialize(f); } void Universe::check_alignment(uintx size, uintx alignment, const char* name) { @@ -664,6 +665,7 @@ Universe::_finalizer_register_cache = new LatestMethodCache(); Universe::_loader_addClass_cache = new LatestMethodCache(); Universe::_pd_implies_cache = new LatestMethodCache(); + Universe::_throw_illegal_access_error_cache = new LatestMethodCache(); if (UseSharedSpaces) { // Read the data structures supporting the shared spaces (shared @@ -1129,7 +1131,8 @@ tty->print_cr("Unable to link/verify Unsafe.throwIllegalAccessError method"); return false; // initialization failed (cannot throw exception yet) } - Universe::_throw_illegal_access_error = m; + Universe::_throw_illegal_access_error_cache->init( + SystemDictionary::misc_Unsafe_klass(), m); // Setup method for registering loaded classes in class loader vector InstanceKlass::cast(SystemDictionary::ClassLoader_klass())->link_class(CHECK_false); @@ -1155,7 +1158,7 @@ return false; // initialization failed } Universe::_pd_implies_cache->init( - SystemDictionary::ProtectionDomain_klass(), m);; + SystemDictionary::ProtectionDomain_klass(), m); } // This needs to be done before the first scavenge/gc, since