< prev index next >

src/share/vm/prims/jvmtiGetLoadedClasses.cpp

Print this page

        

*** 44,54 **** // CLD/SD, and its _java_mirror or _class_loader can be stored in a root // or a reachable object making it alive again. The SATB part of G1 needs // to get notified about this potential resurrection, otherwise the marking // might not find the object. #if INCLUDE_ALL_GCS ! if (UseG1GC && o != NULL) { G1SATBCardTableModRefBS::enqueue(o); } #endif } --- 44,54 ---- // CLD/SD, and its _java_mirror or _class_loader can be stored in a root // or a reachable object making it alive again. The SATB part of G1 needs // to get notified about this potential resurrection, otherwise the marking // might not find the object. #if INCLUDE_ALL_GCS ! if ((o != NULL) && (UseG1GC || (UseShenandoahGC && ShenandoahKeepAliveBarrier))) { G1SATBCardTableModRefBS::enqueue(o); } #endif }
*** 58,78 **** } void do_klass(Klass* k) { // Collect all jclasses _classStack.push((jclass) _env->jni_reference(k->java_mirror())); - ensure_klass_alive(k->java_mirror()); } int extract(jclass* result_list) { // The size of the Stack will be 0 after extract, so get it here int count = (int)_classStack.size(); int i = count; // Pop all jclasses, fill backwards while (!_classStack.is_empty()) { ! result_list[--i] = _classStack.pop(); } // Return the number of elements written return count; } --- 58,80 ---- } void do_klass(Klass* k) { // Collect all jclasses _classStack.push((jclass) _env->jni_reference(k->java_mirror())); } int extract(jclass* result_list) { // The size of the Stack will be 0 after extract, so get it here int count = (int)_classStack.size(); int i = count; // Pop all jclasses, fill backwards while (!_classStack.is_empty()) { ! jclass klass_handle = _classStack.pop(); ! oop klass_mirror = JNIHandles::resolve(klass_handle); ! ensure_klass_alive(klass_mirror); ! result_list[--i] = klass_handle; } // Return the number of elements written return count; }
< prev index next >