Mercurial > hg > graal-jvmci-8
comparison src/share/vm/prims/jni.cpp @ 8001:db9981fd3124
8005915: Unify SERIALGC and INCLUDE_ALTERNATE_GCS
Summary: Rename INCLUDE_ALTERNATE_GCS to INCLUDE_ALL_GCS and replace SERIALGC with INCLUDE_ALL_GCS.
Reviewed-by: coleenp, stefank
author | jprovino |
---|---|
date | Wed, 23 Jan 2013 13:02:39 -0500 |
parents | c24f778e9401 |
children | 5fc51c1ecdeb 499ccc15bbc8 |
comparison
equal
deleted
inserted
replaced
7619:46e60405583b | 8001:db9981fd3124 |
---|---|
30 #include "classfile/javaClasses.hpp" | 30 #include "classfile/javaClasses.hpp" |
31 #include "classfile/symbolTable.hpp" | 31 #include "classfile/symbolTable.hpp" |
32 #include "classfile/systemDictionary.hpp" | 32 #include "classfile/systemDictionary.hpp" |
33 #include "classfile/vmSymbols.hpp" | 33 #include "classfile/vmSymbols.hpp" |
34 #include "interpreter/linkResolver.hpp" | 34 #include "interpreter/linkResolver.hpp" |
35 #ifndef SERIALGC | 35 #include "utilities/macros.hpp" |
36 #if INCLUDE_ALL_GCS | |
36 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" | 37 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp" |
37 #endif // SERIALGC | 38 #endif // INCLUDE_ALL_GCS |
38 #include "memory/allocation.hpp" | 39 #include "memory/allocation.hpp" |
39 #include "memory/allocation.inline.hpp" | 40 #include "memory/allocation.inline.hpp" |
40 #include "memory/gcLocker.inline.hpp" | 41 #include "memory/gcLocker.inline.hpp" |
41 #include "memory/oopFactory.hpp" | 42 #include "memory/oopFactory.hpp" |
42 #include "memory/universe.inline.hpp" | 43 #include "memory/universe.inline.hpp" |
2639 // jni_GetField_probe() assumes that is okay to create handles. | 2640 // jni_GetField_probe() assumes that is okay to create handles. |
2640 if (JvmtiExport::should_post_field_access()) { | 2641 if (JvmtiExport::should_post_field_access()) { |
2641 o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false); | 2642 o = JvmtiExport::jni_GetField_probe(thread, obj, o, k, fieldID, false); |
2642 } | 2643 } |
2643 jobject ret = JNIHandles::make_local(env, o->obj_field(offset)); | 2644 jobject ret = JNIHandles::make_local(env, o->obj_field(offset)); |
2644 #ifndef SERIALGC | 2645 #if INCLUDE_ALL_GCS |
2645 // If G1 is enabled and we are accessing the value of the referent | 2646 // If G1 is enabled and we are accessing the value of the referent |
2646 // field in a reference object then we need to register a non-null | 2647 // field in a reference object then we need to register a non-null |
2647 // referent with the SATB barrier. | 2648 // referent with the SATB barrier. |
2648 if (UseG1GC) { | 2649 if (UseG1GC) { |
2649 bool needs_barrier = false; | 2650 bool needs_barrier = false; |
2658 if (needs_barrier) { | 2659 if (needs_barrier) { |
2659 oop referent = JNIHandles::resolve(ret); | 2660 oop referent = JNIHandles::resolve(ret); |
2660 G1SATBCardTableModRefBS::enqueue(referent); | 2661 G1SATBCardTableModRefBS::enqueue(referent); |
2661 } | 2662 } |
2662 } | 2663 } |
2663 #endif // SERIALGC | 2664 #endif // INCLUDE_ALL_GCS |
2664 #ifndef USDT2 | 2665 #ifndef USDT2 |
2665 DTRACE_PROBE1(hotspot_jni, GetObjectField__return, ret); | 2666 DTRACE_PROBE1(hotspot_jni, GetObjectField__return, ret); |
2666 #else /* USDT2 */ | 2667 #else /* USDT2 */ |
2667 HOTSPOT_JNI_GETOBJECTFIELD_RETURN( | 2668 HOTSPOT_JNI_GETOBJECTFIELD_RETURN( |
2668 ret); | 2669 ret); |