< prev index next >
src/share/vm/prims/jvm.cpp
Print this page
*** 71,80 ****
--- 71,81 ----
#include "utilities/copy.hpp"
#include "utilities/defaultStream.hpp"
#include "utilities/dtrace.hpp"
#include "utilities/events.hpp"
#include "utilities/histogram.hpp"
+ #include "utilities/macros.hpp"
#include "utilities/top.hpp"
#include "utilities/utf8.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "jvm_linux.h"
#endif
*** 91,100 ****
--- 92,102 ----
# include "jvm_bsd.h"
#endif
#if INCLUDE_ALL_GCS
#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
+ #include "gc_implementation/shenandoah/shenandoahBarrierSetClone.inline.hpp"
#endif // INCLUDE_ALL_GCS
#include <errno.h>
#ifndef USDT2
*** 606,616 ****
static void fixup_cloned_reference(ReferenceType ref_type, oop src, oop clone) {
// If G1 is enabled then we need to register a non-null referent
// with the SATB barrier.
#if INCLUDE_ALL_GCS
! if (UseG1GC) {
oop referent = java_lang_ref_Reference::referent(clone);
if (referent != NULL) {
G1SATBCardTableModRefBS::enqueue(referent);
}
}
--- 608,618 ----
static void fixup_cloned_reference(ReferenceType ref_type, oop src, oop clone) {
// If G1 is enabled then we need to register a non-null referent
// with the SATB barrier.
#if INCLUDE_ALL_GCS
! if (UseG1GC || (UseShenandoahGC && ShenandoahSATBBarrier)) {
oop referent = java_lang_ref_Reference::referent(clone);
if (referent != NULL) {
G1SATBCardTableModRefBS::enqueue(referent);
}
}
*** 663,672 ****
--- 665,680 ----
!klass->is_subclass_of(SystemDictionary::Reference_klass()),
"invariant");
new_obj_oop = CollectedHeap::obj_allocate(klass, size, CHECK_NULL);
}
+ #if INCLUDE_ALL_GCS
+ if (UseShenandoahGC && ShenandoahCloneBarrier) {
+ ShenandoahBarrierSet::barrier_set()->clone_barrier_runtime(obj());
+ }
+ #endif
+
// 4839641 (4840070): We must do an oop-atomic copy, because if another thread
// is modifying a reference field in the clonee, a non-oop-atomic copy might
// be suspended in the middle of copying the pointer and end up with parts
// of two different pointers in the field. Subsequent dereferences will crash.
// 4846409: an oop-copy of objects with long or double fields or arrays of same
*** 1169,1179 ****
}
return (jclass) JNIHandles::make_local(env, k->java_mirror());
}
-
JVM_ENTRY(jclass, JVM_DefineClass(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd))
JVMWrapper2("JVM_DefineClass %s", name);
return jvm_define_class_common(env, name, loader, buf, len, pd, NULL, true, THREAD);
JVM_END
--- 1177,1186 ----
< prev index next >