Mercurial > hg > truffle
comparison src/share/vm/classfile/dictionary.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 | 1f9994892f89 |
children | 43083e670adf |
comparison
equal
deleted
inserted
replaced
10147:cc70cbbd422e | 10149:d587a5c30bd8 |
---|---|
25 #include "precompiled.hpp" | 25 #include "precompiled.hpp" |
26 #include "classfile/dictionary.hpp" | 26 #include "classfile/dictionary.hpp" |
27 #include "classfile/systemDictionary.hpp" | 27 #include "classfile/systemDictionary.hpp" |
28 #include "oops/oop.inline.hpp" | 28 #include "oops/oop.inline.hpp" |
29 #include "prims/jvmtiRedefineClassesTrace.hpp" | 29 #include "prims/jvmtiRedefineClassesTrace.hpp" |
30 #include "services/classLoadingService.hpp" | |
31 #include "utilities/hashtable.inline.hpp" | 30 #include "utilities/hashtable.inline.hpp" |
32 | 31 |
33 | 32 |
34 DictionaryEntry* Dictionary::_current_class_entry = NULL; | 33 DictionaryEntry* Dictionary::_current_class_entry = NULL; |
35 int Dictionary::_current_class_index = 0; | 34 int Dictionary::_current_class_index = 0; |
154 // removed (will never be looked up again). Note that this is | 153 // removed (will never be looked up again). Note that this is |
155 // not the same as unloading the referred class. | 154 // not the same as unloading the referred class. |
156 if (k_def_class_loader_data == loader_data) { | 155 if (k_def_class_loader_data == loader_data) { |
157 // This is the defining entry, so the referred class is about | 156 // This is the defining entry, so the referred class is about |
158 // to be unloaded. | 157 // to be unloaded. |
159 // Notify the debugger and clean up the class. | |
160 class_was_unloaded = true; | 158 class_was_unloaded = true; |
161 // notify the debugger | |
162 if (JvmtiExport::should_post_class_unload()) { | |
163 JvmtiExport::post_class_unload(ik); | |
164 } | |
165 | |
166 // notify ClassLoadingService of class unload | |
167 ClassLoadingService::notify_class_unloaded(ik); | |
168 | |
169 // Clean up C heap | |
170 ik->release_C_heap_structures(); | |
171 ik->constants()->release_C_heap_structures(); | |
172 } | 159 } |
173 // Also remove this system dictionary entry. | 160 // Also remove this system dictionary entry. |
174 purge_entry = true; | 161 purge_entry = true; |
175 | 162 |
176 } else { | 163 } else { |