Mercurial > hg > graal-jvmci-8
comparison src/share/vm/classfile/classLoaderData.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 | ba42fd5e00e6 |
children | d58c62b7447d |
comparison
equal
deleted
inserted
replaced
10147:cc70cbbd422e | 10149:d587a5c30bd8 |
---|---|
275 } | 275 } |
276 | 276 |
277 void ClassLoaderData::unload() { | 277 void ClassLoaderData::unload() { |
278 _unloading = true; | 278 _unloading = true; |
279 | 279 |
280 // Tell serviceability tools these classes are unloading | |
281 classes_do(InstanceKlass::notify_unload_class); | |
282 | |
280 if (TraceClassLoaderData) { | 283 if (TraceClassLoaderData) { |
281 ResourceMark rm; | 284 ResourceMark rm; |
282 tty->print("[ClassLoaderData: unload loader data "PTR_FORMAT, this); | 285 tty->print("[ClassLoaderData: unload loader data "PTR_FORMAT, this); |
283 tty->print(" for instance "PTR_FORMAT" of %s", class_loader(), | 286 tty->print(" for instance "PTR_FORMAT" of %s", class_loader(), |
284 loader_name()); | 287 loader_name()); |
298 return alive; | 301 return alive; |
299 } | 302 } |
300 | 303 |
301 | 304 |
302 ClassLoaderData::~ClassLoaderData() { | 305 ClassLoaderData::~ClassLoaderData() { |
306 // Release C heap structures for all the classes. | |
307 classes_do(InstanceKlass::release_C_heap_structures); | |
308 | |
303 Metaspace *m = _metaspace; | 309 Metaspace *m = _metaspace; |
304 if (m != NULL) { | 310 if (m != NULL) { |
305 _metaspace = NULL; | 311 _metaspace = NULL; |
306 // release the metaspace | 312 // release the metaspace |
307 delete m; | 313 delete m; |