< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahRuntime.cpp

Print this page

 6  * under the terms of the GNU General Public License version 2 only, as
 7  * published by the Free Software Foundation.
 8  *
 9  * This code is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * version 2 for more details (a copy is included in the LICENSE file that
13  * accompanied this code).
14  *
15  * You should have received a copy of the GNU General Public License version
16  * 2 along with this work; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  *
23  */
24 
25 #include "gc/shenandoah/shenandoahBarrierSet.inline.hpp"
26 #include "gc/shenandoah/shenandoahBarrierSetClone.inline.hpp"
27 #include "gc/shenandoah/shenandoahRuntime.hpp"
28 #include "gc/shenandoah/shenandoahThreadLocalData.hpp"
29 #include "oops/oop.inline.hpp"
30 #include "runtime/interfaceSupport.inline.hpp"
31 #include "utilities/copy.hpp"
32 
33 JRT_LEAF(void, ShenandoahRuntime::arraycopy_barrier_oop(oop* src, oop* dst, size_t length))
34   ShenandoahBarrierSet::barrier_set()->arraycopy_barrier(src, dst, length);
35 JRT_END
36 
37 JRT_LEAF(void, ShenandoahRuntime::arraycopy_barrier_narrow_oop(narrowOop* src, narrowOop* dst, size_t length))
38   ShenandoahBarrierSet::barrier_set()->arraycopy_barrier(src, dst, length);
39 JRT_END
40 
41 JRT_LEAF(void, ShenandoahRuntime::write_barrier_pre(oopDesc* orig))
42   assert(orig != nullptr, "should be optimized out");
43   shenandoah_assert_correct(nullptr, orig);
44   // Capture the original value that was in the field reference.
45   JavaThread* thread = JavaThread::current();
46   assert(ShenandoahThreadLocalData::satb_mark_queue(thread).is_active(), "Shouldn't be here otherwise");
47   SATBMarkQueue& queue = ShenandoahThreadLocalData::satb_mark_queue(thread);
48   ShenandoahBarrierSet::satb_mark_queue_set().enqueue_known_active(queue, orig);
49 JRT_END
50 
51 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_strong(oopDesc* src, oop* load_addr))
52   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_STRONG_OOP_REF, oop>(src, load_addr);
53 JRT_END
54 
55 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_strong_narrow(oopDesc* src, narrowOop* load_addr))
56   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_STRONG_OOP_REF, narrowOop>(src, load_addr);
57 JRT_END
58 






59 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_weak(oopDesc* src, oop* load_addr))
60   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_WEAK_OOP_REF, oop>(src, load_addr);
61 JRT_END
62 
63 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_weak_narrow(oopDesc* src, narrowOop* load_addr))
64   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_WEAK_OOP_REF, narrowOop>(src, load_addr);
65 JRT_END
66 






67 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_phantom(oopDesc* src, oop* load_addr))
68   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_PHANTOM_OOP_REF, oop>(src, load_addr);
69 JRT_END
70 
71 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_phantom_narrow(oopDesc* src, narrowOop* load_addr))
72   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_PHANTOM_OOP_REF, narrowOop>(src, load_addr);
73 JRT_END
74 
75 JRT_LEAF(void, ShenandoahRuntime::clone_barrier(oopDesc* src))
76   oop s = oop(src);
77   shenandoah_assert_correct(nullptr, s);
78   ShenandoahBarrierSet::barrier_set()->clone_barrier(s);




79 JRT_END

 6  * under the terms of the GNU General Public License version 2 only, as
 7  * published by the Free Software Foundation.
 8  *
 9  * This code is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * version 2 for more details (a copy is included in the LICENSE file that
13  * accompanied this code).
14  *
15  * You should have received a copy of the GNU General Public License version
16  * 2 along with this work; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  *
23  */
24 
25 #include "gc/shenandoah/shenandoahBarrierSet.inline.hpp"

26 #include "gc/shenandoah/shenandoahRuntime.hpp"
27 #include "gc/shenandoah/shenandoahThreadLocalData.hpp"
28 #include "oops/oop.inline.hpp"
29 #include "runtime/interfaceSupport.inline.hpp"
30 #include "utilities/copy.hpp"
31 
32 JRT_LEAF(void, ShenandoahRuntime::arraycopy_barrier_oop(oop* src, oop* dst, size_t length))
33   ShenandoahBarrierSet::barrier_set()->arraycopy_barrier(src, dst, length);
34 JRT_END
35 
36 JRT_LEAF(void, ShenandoahRuntime::arraycopy_barrier_narrow_oop(narrowOop* src, narrowOop* dst, size_t length))
37   ShenandoahBarrierSet::barrier_set()->arraycopy_barrier(src, dst, length);
38 JRT_END
39 
40 JRT_LEAF(void, ShenandoahRuntime::write_barrier_pre(oopDesc* obj))
41   ShenandoahBarrierSet::barrier_set()->enqueue(obj, /* filter = */ false);
42 JRT_END
43 
44 JRT_LEAF(void, ShenandoahRuntime::write_barrier_pre_narrow(narrowOop nobj))
45   oop obj = CompressedOops::decode(nobj);
46   ShenandoahBarrierSet::barrier_set()->enqueue(obj, /* filter = */ false);

47 JRT_END
48 
49 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_strong(oopDesc* src, oop* load_addr))
50   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_STRONG_OOP_REF, oop>(src, load_addr);
51 JRT_END
52 
53 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_strong_narrow(oopDesc* src, narrowOop* load_addr))
54   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_STRONG_OOP_REF, narrowOop>(src, load_addr);
55 JRT_END
56 
57 JRT_LEAF(narrowOop, ShenandoahRuntime::load_reference_barrier_strong_narrow_narrow(narrowOop src, narrowOop* load_addr))
58   oop s = CompressedOops::decode(src);
59   oop r = ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_STRONG_OOP_REF, narrowOop>(s, load_addr);
60   return CompressedOops::encode(r);
61 JRT_END
62 
63 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_weak(oopDesc* src, oop* load_addr))
64   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_WEAK_OOP_REF, oop>(src, load_addr);
65 JRT_END
66 
67 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_weak_narrow(oopDesc* src, narrowOop* load_addr))
68   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_WEAK_OOP_REF, narrowOop>(src, load_addr);
69 JRT_END
70 
71 JRT_LEAF(narrowOop, ShenandoahRuntime::load_reference_barrier_weak_narrow_narrow(narrowOop src, narrowOop* load_addr))
72   oop s = CompressedOops::decode(src);
73   oop r = ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_WEAK_OOP_REF, narrowOop>(s, load_addr);
74   return CompressedOops::encode(r);
75 JRT_END
76 
77 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_phantom(oopDesc* src, oop* load_addr))
78   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_PHANTOM_OOP_REF, oop>(src, load_addr);
79 JRT_END
80 
81 JRT_LEAF(oopDesc*, ShenandoahRuntime::load_reference_barrier_phantom_narrow(oopDesc* src, narrowOop* load_addr))
82   return ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_PHANTOM_OOP_REF, narrowOop>(src, load_addr);
83 JRT_END
84 
85 JRT_LEAF(narrowOop, ShenandoahRuntime::load_reference_barrier_phantom_narrow_narrow(narrowOop src, narrowOop* load_addr))
86   oop s = CompressedOops::decode(src);
87   oop r = ShenandoahBarrierSet::barrier_set()->load_reference_barrier_mutator<ON_PHANTOM_OOP_REF, narrowOop>(s, load_addr);
88   return CompressedOops::encode(r);
89 JRT_END
90 
91 JRT_LEAF(void, ShenandoahRuntime::clone(oopDesc* src, oopDesc* dst, size_t size))
92   HeapAccess<>::clone(src, dst, size);
93 JRT_END
< prev index next >