equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2015, 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. |
26 #include "classfile/dictionary.hpp" |
26 #include "classfile/dictionary.hpp" |
27 #include "classfile/javaClasses.hpp" |
27 #include "classfile/javaClasses.hpp" |
28 #include "classfile/systemDictionary.hpp" |
28 #include "classfile/systemDictionary.hpp" |
29 #include "classfile/vmSymbols.hpp" |
29 #include "classfile/vmSymbols.hpp" |
30 #include "gc/shared/collectedHeap.inline.hpp" |
30 #include "gc/shared/collectedHeap.inline.hpp" |
|
31 #include "logging/log.hpp" |
31 #include "memory/heapInspection.hpp" |
32 #include "memory/heapInspection.hpp" |
32 #include "memory/metadataFactory.hpp" |
33 #include "memory/metadataFactory.hpp" |
33 #include "memory/oopFactory.hpp" |
34 #include "memory/oopFactory.hpp" |
34 #include "memory/resourceArea.hpp" |
35 #include "memory/resourceArea.hpp" |
35 #include "oops/instanceKlass.hpp" |
36 #include "oops/instanceKlass.hpp" |
384 |
385 |
385 // Find and set the first alive subklass |
386 // Find and set the first alive subklass |
386 Klass* sub = current->subklass(); |
387 Klass* sub = current->subklass(); |
387 while (sub != NULL && !sub->is_loader_alive(is_alive)) { |
388 while (sub != NULL && !sub->is_loader_alive(is_alive)) { |
388 #ifndef PRODUCT |
389 #ifndef PRODUCT |
389 if (TraceClassUnloading && WizardMode) { |
390 if (log_is_enabled(Trace, classunload)) { |
390 ResourceMark rm; |
391 ResourceMark rm; |
391 tty->print_cr("[Unlinking class (subclass) %s]", sub->external_name()); |
392 log_trace(classunload)("unlinking class (subclass): %s", sub->external_name()); |
392 } |
393 } |
393 #endif |
394 #endif |
394 sub = sub->next_sibling(); |
395 sub = sub->next_sibling(); |
395 } |
396 } |
396 current->set_subklass(sub); |
397 current->set_subklass(sub); |
399 } |
400 } |
400 |
401 |
401 // Find and set the first alive sibling |
402 // Find and set the first alive sibling |
402 Klass* sibling = current->next_sibling(); |
403 Klass* sibling = current->next_sibling(); |
403 while (sibling != NULL && !sibling->is_loader_alive(is_alive)) { |
404 while (sibling != NULL && !sibling->is_loader_alive(is_alive)) { |
404 if (TraceClassUnloading && WizardMode) { |
405 if (log_is_enabled(Trace, classunload)) { |
405 ResourceMark rm; |
406 ResourceMark rm; |
406 tty->print_cr("[Unlinking class (sibling) %s]", sibling->external_name()); |
407 log_trace(classunload)("[Unlinking class (sibling) %s]", sibling->external_name()); |
407 } |
408 } |
408 sibling = sibling->next_sibling(); |
409 sibling = sibling->next_sibling(); |
409 } |
410 } |
410 current->set_next_sibling(sibling); |
411 current->set_next_sibling(sibling); |
411 if (sibling != NULL) { |
412 if (sibling != NULL) { |