comparison src/share/vm/classfile/systemDictionary.cpp @ 17674:85318d1fe8fe

8027146: Class loading verification failure if GC occurs in Universe::flush_dependents_on Summary: Remove search in system dictionary and hacks, replace with verifying in CLD::_klasses list. Reviewed-by: dcubed, acorn
author coleenp
date Sat, 15 Feb 2014 13:03:38 -0500
parents 22c88c127fa4
children d8041d695d19 9428a0b94204
comparison
equal deleted inserted replaced
17673:231051bff068 17674:85318d1fe8fe
1 /* 1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
2648 // Verify constraint table 2648 // Verify constraint table
2649 guarantee(constraints() != NULL, "Verify of loader constraints failed"); 2649 guarantee(constraints() != NULL, "Verify of loader constraints failed");
2650 constraints()->verify(dictionary(), placeholders()); 2650 constraints()->verify(dictionary(), placeholders());
2651 } 2651 }
2652 2652
2653
2654 void SystemDictionary::verify_obj_klass_present(Symbol* class_name,
2655 ClassLoaderData* loader_data) {
2656 GCMutexLocker mu(SystemDictionary_lock);
2657 Symbol* name;
2658
2659 Klass* probe = find_class(class_name, loader_data);
2660 if (probe == NULL) {
2661 probe = SystemDictionary::find_shared_class(class_name);
2662 if (probe == NULL) {
2663 name = find_placeholder(class_name, loader_data);
2664 }
2665 }
2666 guarantee(probe != NULL || name != NULL,
2667 "Loaded klasses should be in SystemDictionary");
2668 }
2669
2670 // utility function for class load event 2653 // utility function for class load event
2671 void SystemDictionary::post_class_load_event(const Ticks& start_time, 2654 void SystemDictionary::post_class_load_event(const Ticks& start_time,
2672 instanceKlassHandle k, 2655 instanceKlassHandle k,
2673 Handle initiating_loader) { 2656 Handle initiating_loader) {
2674 #if INCLUDE_TRACE 2657 #if INCLUDE_TRACE