comparison src/share/vm/oops/instanceKlass.cpp @ 10149:d587a5c30bd8

8011803: release_C_heap_structures is never called for anonymous classes. Summary: Call this function from the ClassLoaderData destructor instead of the system dictionary walk. Reviewed-by: stefank, mgerdin
author coleenp
date Wed, 24 Apr 2013 16:19:35 -0400
parents 6337ca4dcad8
children c115fac239eb
comparison
equal deleted inserted replaced
10147:cc70cbbd422e 10149:d587a5c30bd8
52 #include "runtime/fieldDescriptor.hpp" 52 #include "runtime/fieldDescriptor.hpp"
53 #include "runtime/handles.inline.hpp" 53 #include "runtime/handles.inline.hpp"
54 #include "runtime/javaCalls.hpp" 54 #include "runtime/javaCalls.hpp"
55 #include "runtime/mutexLocker.hpp" 55 #include "runtime/mutexLocker.hpp"
56 #include "runtime/thread.inline.hpp" 56 #include "runtime/thread.inline.hpp"
57 #include "services/classLoadingService.hpp"
57 #include "services/threadService.hpp" 58 #include "services/threadService.hpp"
58 #include "utilities/dtrace.hpp" 59 #include "utilities/dtrace.hpp"
59 #include "utilities/macros.hpp" 60 #include "utilities/macros.hpp"
60 #if INCLUDE_ALL_GCS 61 #if INCLUDE_ALL_GCS
61 #include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp" 62 #include "gc_implementation/concurrentMarkSweep/cmsOopClosures.inline.hpp"
2310 2311
2311 static void clear_all_breakpoints(Method* m) { 2312 static void clear_all_breakpoints(Method* m) {
2312 m->clear_all_breakpoints(); 2313 m->clear_all_breakpoints();
2313 } 2314 }
2314 2315
2316
2317 void InstanceKlass::notify_unload_class(InstanceKlass* ik) {
2318 // notify the debugger
2319 if (JvmtiExport::should_post_class_unload()) {
2320 JvmtiExport::post_class_unload(ik);
2321 }
2322
2323 // notify ClassLoadingService of class unload
2324 ClassLoadingService::notify_class_unloaded(ik);
2325 }
2326
2327 void InstanceKlass::release_C_heap_structures(InstanceKlass* ik) {
2328 // Clean up C heap
2329 ik->release_C_heap_structures();
2330 ik->constants()->release_C_heap_structures();
2331 }
2332
2315 void InstanceKlass::release_C_heap_structures() { 2333 void InstanceKlass::release_C_heap_structures() {
2334
2335 // Can't release the constant pool here because the constant pool can be
2336 // deallocated separately from the InstanceKlass for default methods and
2337 // redefine classes.
2338
2316 // Deallocate oop map cache 2339 // Deallocate oop map cache
2317 if (_oop_map_cache != NULL) { 2340 if (_oop_map_cache != NULL) {
2318 delete _oop_map_cache; 2341 delete _oop_map_cache;
2319 _oop_map_cache = NULL; 2342 _oop_map_cache = NULL;
2320 } 2343 }