< prev index next >

src/share/vm/prims/jvm.cpp

Print this page
rev 11463 : Backport Traversal GC


 570 
 571 
 572 JVM_ENTRY(void, JVM_MonitorNotify(JNIEnv* env, jobject handle))
 573   JVMWrapper("JVM_MonitorNotify");
 574   Handle obj(THREAD, JNIHandles::resolve_non_null(handle));
 575   ObjectSynchronizer::notify(obj, CHECK);
 576 JVM_END
 577 
 578 
 579 JVM_ENTRY(void, JVM_MonitorNotifyAll(JNIEnv* env, jobject handle))
 580   JVMWrapper("JVM_MonitorNotifyAll");
 581   Handle obj(THREAD, JNIHandles::resolve_non_null(handle));
 582   ObjectSynchronizer::notifyall(obj, CHECK);
 583 JVM_END
 584 
 585 
 586 static void fixup_cloned_reference(ReferenceType ref_type, oop src, oop clone) {
 587   // If G1 is enabled then we need to register a non-null referent
 588   // with the SATB barrier.
 589 #if INCLUDE_ALL_GCS
 590   if (UseG1GC || UseShenandoahGC) {
 591     oop referent = java_lang_ref_Reference::referent(clone);
 592     if (referent != NULL) {
 593       G1SATBCardTableModRefBS::enqueue(referent);
 594     }
 595   }
 596 #endif // INCLUDE_ALL_GCS
 597   if ((java_lang_ref_Reference::next(clone) != NULL) ||
 598       (java_lang_ref_Reference::queue(clone) == java_lang_ref_ReferenceQueue::ENQUEUED_queue())) {
 599     // If the source has been enqueued or is being enqueued, don't
 600     // register the clone with a queue.
 601     java_lang_ref_Reference::set_queue(clone, java_lang_ref_ReferenceQueue::NULL_queue());
 602   }
 603   // discovered and next are list links; the clone is not in those lists.
 604   java_lang_ref_Reference::set_discovered(clone, NULL);
 605   java_lang_ref_Reference::set_next(clone, NULL);
 606 }
 607 
 608 JVM_ENTRY(jobject, JVM_Clone(JNIEnv* env, jobject handle))
 609   JVMWrapper("JVM_Clone");
 610   Handle obj(THREAD, JNIHandles::resolve_non_null(handle));




 570 
 571 
 572 JVM_ENTRY(void, JVM_MonitorNotify(JNIEnv* env, jobject handle))
 573   JVMWrapper("JVM_MonitorNotify");
 574   Handle obj(THREAD, JNIHandles::resolve_non_null(handle));
 575   ObjectSynchronizer::notify(obj, CHECK);
 576 JVM_END
 577 
 578 
 579 JVM_ENTRY(void, JVM_MonitorNotifyAll(JNIEnv* env, jobject handle))
 580   JVMWrapper("JVM_MonitorNotifyAll");
 581   Handle obj(THREAD, JNIHandles::resolve_non_null(handle));
 582   ObjectSynchronizer::notifyall(obj, CHECK);
 583 JVM_END
 584 
 585 
 586 static void fixup_cloned_reference(ReferenceType ref_type, oop src, oop clone) {
 587   // If G1 is enabled then we need to register a non-null referent
 588   // with the SATB barrier.
 589 #if INCLUDE_ALL_GCS
 590   if (UseG1GC || (UseShenandoahGC && ShenandoahKeepAliveBarrier)) {
 591     oop referent = java_lang_ref_Reference::referent(clone);
 592     if (referent != NULL) {
 593       G1SATBCardTableModRefBS::enqueue(referent);
 594     }
 595   }
 596 #endif // INCLUDE_ALL_GCS
 597   if ((java_lang_ref_Reference::next(clone) != NULL) ||
 598       (java_lang_ref_Reference::queue(clone) == java_lang_ref_ReferenceQueue::ENQUEUED_queue())) {
 599     // If the source has been enqueued or is being enqueued, don't
 600     // register the clone with a queue.
 601     java_lang_ref_Reference::set_queue(clone, java_lang_ref_ReferenceQueue::NULL_queue());
 602   }
 603   // discovered and next are list links; the clone is not in those lists.
 604   java_lang_ref_Reference::set_discovered(clone, NULL);
 605   java_lang_ref_Reference::set_next(clone, NULL);
 606 }
 607 
 608 JVM_ENTRY(jobject, JVM_Clone(JNIEnv* env, jobject handle))
 609   JVMWrapper("JVM_Clone");
 610   Handle obj(THREAD, JNIHandles::resolve_non_null(handle));


< prev index next >