--- old/src/hotspot/share/oops/klass.cpp 2018-04-17 11:59:44.564909472 -0400 +++ new/src/hotspot/share/oops/klass.cpp 2018-04-17 11:59:43.912849280 -0400 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "classfile/classLoaderData.inline.hpp" #include "classfile/dictionary.hpp" #include "classfile/javaClasses.hpp" #include "classfile/systemDictionary.hpp" @@ -378,21 +379,6 @@ debug_only(verify();) } -bool Klass::is_loader_alive(BoolObjectClosure* is_alive) { -#ifdef ASSERT - // The class is alive iff the class loader is alive. - oop loader = class_loader(); - bool loader_alive = (loader == NULL) || is_alive->do_object_b(loader); -#endif // ASSERT - - // The class is alive if it's mirror is alive (which should be marked if the - // loader is alive) unless it's an anoymous class. - bool mirror_alive = is_alive->do_object_b(java_mirror()); - assert(!mirror_alive || loader_alive, "loader must be alive if the mirror is" - " but not the other way around with anonymous classes"); - return mirror_alive; -} - void Klass::clean_weak_klass_links(BoolObjectClosure* is_alive, bool clean_alive_klasses) { if (!ClassUnloading) { return;