21 * |
21 * |
22 */ |
22 */ |
23 |
23 |
24 #include "precompiled.hpp" |
24 #include "precompiled.hpp" |
25 #include "gc/shared/barrierSet.hpp" |
25 #include "gc/shared/barrierSet.hpp" |
|
26 #include "gc/shenandoah/shenandoahForwarding.hpp" |
26 #include "gc/shenandoah/shenandoahHeap.hpp" |
27 #include "gc/shenandoah/shenandoahHeap.hpp" |
27 #include "gc/shenandoah/shenandoahHeuristics.hpp" |
28 #include "gc/shenandoah/shenandoahHeuristics.hpp" |
28 #include "gc/shenandoah/shenandoahRuntime.hpp" |
29 #include "gc/shenandoah/shenandoahRuntime.hpp" |
29 #include "gc/shenandoah/shenandoahThreadLocalData.hpp" |
30 #include "gc/shenandoah/shenandoahThreadLocalData.hpp" |
30 #include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp" |
31 #include "gc/shenandoah/c2/shenandoahBarrierSetC2.hpp" |
714 Node*& fast_oop_ctrl, Node*& fast_oop_rawmem, |
715 Node*& fast_oop_ctrl, Node*& fast_oop_rawmem, |
715 intx prefetch_lines) const { |
716 intx prefetch_lines) const { |
716 PhaseIterGVN& igvn = macro->igvn(); |
717 PhaseIterGVN& igvn = macro->igvn(); |
717 |
718 |
718 // Allocate several words more for the Shenandoah brooks pointer. |
719 // Allocate several words more for the Shenandoah brooks pointer. |
719 size_in_bytes = new AddXNode(size_in_bytes, igvn.MakeConX(ShenandoahBrooksPointer::byte_size())); |
720 size_in_bytes = new AddXNode(size_in_bytes, igvn.MakeConX(ShenandoahForwarding::byte_size())); |
720 macro->transform_later(size_in_bytes); |
721 macro->transform_later(size_in_bytes); |
721 |
722 |
722 Node* fast_oop = BarrierSetC2::obj_allocate(macro, ctrl, mem, toobig_false, size_in_bytes, |
723 Node* fast_oop = BarrierSetC2::obj_allocate(macro, ctrl, mem, toobig_false, size_in_bytes, |
723 i_o, needgc_ctrl, fast_oop_ctrl, fast_oop_rawmem, |
724 i_o, needgc_ctrl, fast_oop_ctrl, fast_oop_rawmem, |
724 prefetch_lines); |
725 prefetch_lines); |
725 |
726 |
726 // Bump up object for Shenandoah brooks pointer. |
727 // Bump up object for Shenandoah brooks pointer. |
727 fast_oop = new AddPNode(macro->top(), fast_oop, igvn.MakeConX(ShenandoahBrooksPointer::byte_size())); |
728 fast_oop = new AddPNode(macro->top(), fast_oop, igvn.MakeConX(ShenandoahForwarding::byte_size())); |
728 macro->transform_later(fast_oop); |
729 macro->transform_later(fast_oop); |
729 |
730 |
730 // Initialize Shenandoah brooks pointer to point to the object itself. |
731 // Initialize Shenandoah brooks pointer to point to the object itself. |
731 fast_oop_rawmem = macro->make_store(fast_oop_ctrl, fast_oop_rawmem, fast_oop, ShenandoahBrooksPointer::byte_offset(), fast_oop, T_OBJECT); |
732 fast_oop_rawmem = macro->make_store(fast_oop_ctrl, fast_oop_rawmem, fast_oop, ShenandoahForwarding::byte_offset(), fast_oop, T_OBJECT); |
732 |
733 |
733 return fast_oop; |
734 return fast_oop; |
734 } |
735 } |
735 |
736 |
736 // Support for GC barriers emitted during parsing |
737 // Support for GC barriers emitted during parsing |