G1BarrierSet_merge
679 // Generating the mark triggers notifying the oprofile jvmti agent
680 // about the dynamic code generation, but the stub without
681 // code (code_size == 0) confuses opjitconv
682 // StubCodeMark mark(this, "StubRoutines", "verify_oop_stub");
683
684 address start = 0;
685 return start;
686 }
687
688 // Generate pre-write barrier for array.
689 //
690 // Input:
691 // addr - register containing starting address
692 // count - register containing element count
693 //
694 // The input registers are overwritten.
695 void gen_write_ref_array_pre_barrier(Register addr, Register count, bool dest_uninitialized) {
696
697 BarrierSet* const bs = Universe::heap()->barrier_set();
698 switch (bs->kind()) {
699 case BarrierSet::G1SATBCTLogging:
700 // With G1, don't generate the call if we statically know that the target is uninitialized.
701 if (!dest_uninitialized) {
702 // Is marking active?
703 Label filtered;
704 assert_different_registers(addr, Z_R0_scratch); // would be destroyed by push_frame()
705 assert_different_registers(count, Z_R0_scratch); // would be destroyed by push_frame()
706 Register Rtmp1 = Z_R0_scratch;
707 const int active_offset = in_bytes(JavaThread::satb_mark_queue_offset() +
708 SATBMarkQueue::byte_offset_of_active());
709 if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
710 __ load_and_test_int(Rtmp1, Address(Z_thread, active_offset));
711 } else {
712 guarantee(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
713 __ load_and_test_byte(Rtmp1, Address(Z_thread, active_offset));
714 }
715 __ z_bre(filtered); // Activity indicator is zero, so there is no marking going on currently.
716
717 // __ push_frame_abi160(0); // implicitly done in save_live_registers()
718 (void) RegisterSaver::save_live_registers(_masm, RegisterSaver::arg_registers);
|
679 // Generating the mark triggers notifying the oprofile jvmti agent
680 // about the dynamic code generation, but the stub without
681 // code (code_size == 0) confuses opjitconv
682 // StubCodeMark mark(this, "StubRoutines", "verify_oop_stub");
683
684 address start = 0;
685 return start;
686 }
687
688 // Generate pre-write barrier for array.
689 //
690 // Input:
691 // addr - register containing starting address
692 // count - register containing element count
693 //
694 // The input registers are overwritten.
695 void gen_write_ref_array_pre_barrier(Register addr, Register count, bool dest_uninitialized) {
696
697 BarrierSet* const bs = Universe::heap()->barrier_set();
698 switch (bs->kind()) {
699 case BarrierSet::G1BarrierSet:
700 // With G1, don't generate the call if we statically know that the target is uninitialized.
701 if (!dest_uninitialized) {
702 // Is marking active?
703 Label filtered;
704 assert_different_registers(addr, Z_R0_scratch); // would be destroyed by push_frame()
705 assert_different_registers(count, Z_R0_scratch); // would be destroyed by push_frame()
706 Register Rtmp1 = Z_R0_scratch;
707 const int active_offset = in_bytes(JavaThread::satb_mark_queue_offset() +
708 SATBMarkQueue::byte_offset_of_active());
709 if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
710 __ load_and_test_int(Rtmp1, Address(Z_thread, active_offset));
711 } else {
712 guarantee(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
713 __ load_and_test_byte(Rtmp1, Address(Z_thread, active_offset));
714 }
715 __ z_bre(filtered); // Activity indicator is zero, so there is no marking going on currently.
716
717 // __ push_frame_abi160(0); // implicitly done in save_live_registers()
718 (void) RegisterSaver::save_live_registers(_masm, RegisterSaver::arg_registers);
|
724 }
725 break;
726 case BarrierSet::CardTableModRef:
727 case BarrierSet::ModRef:
728 break;
729 default:
730 ShouldNotReachHere();
731 }
732 }
733
734 // Generate post-write barrier for array.
735 //
736 // Input:
737 // addr - register containing starting address
738 // count - register containing element count
739 //
740 // The input registers are overwritten.
741 void gen_write_ref_array_post_barrier(Register addr, Register count, bool branchToEnd) {
742 BarrierSet* const bs = Universe::heap()->barrier_set();
743 switch (bs->kind()) {
744 case BarrierSet::G1SATBCTLogging:
745 {
746 if (branchToEnd) {
747 assert_different_registers(addr, Z_R0_scratch); // would be destroyed by push_frame()
748 assert_different_registers(count, Z_R0_scratch); // would be destroyed by push_frame()
749 // __ push_frame_abi160(0); // implicitly done in save_live_registers()
750 (void) RegisterSaver::save_live_registers(_masm, RegisterSaver::arg_registers);
751 __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_post), addr, count);
752 (void) RegisterSaver::restore_live_registers(_masm, RegisterSaver::arg_registers);
753 // __ pop_frame(); // implicitly done in restore_live_registers()
754 } else {
755 // Tail call: call c and return to stub caller.
756 address entry_point = CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_post);
757 __ lgr_if_needed(Z_ARG1, addr);
758 __ lgr_if_needed(Z_ARG2, count);
759 __ load_const(Z_R1, entry_point);
760 __ z_br(Z_R1); // Branch without linking, callee will return to stub caller.
761 }
762 }
763 break;
|
724 }
725 break;
726 case BarrierSet::CardTableModRef:
727 case BarrierSet::ModRef:
728 break;
729 default:
730 ShouldNotReachHere();
731 }
732 }
733
734 // Generate post-write barrier for array.
735 //
736 // Input:
737 // addr - register containing starting address
738 // count - register containing element count
739 //
740 // The input registers are overwritten.
741 void gen_write_ref_array_post_barrier(Register addr, Register count, bool branchToEnd) {
742 BarrierSet* const bs = Universe::heap()->barrier_set();
743 switch (bs->kind()) {
744 case BarrierSet::G1BarrierSet:
745 {
746 if (branchToEnd) {
747 assert_different_registers(addr, Z_R0_scratch); // would be destroyed by push_frame()
748 assert_different_registers(count, Z_R0_scratch); // would be destroyed by push_frame()
749 // __ push_frame_abi160(0); // implicitly done in save_live_registers()
750 (void) RegisterSaver::save_live_registers(_masm, RegisterSaver::arg_registers);
751 __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_post), addr, count);
752 (void) RegisterSaver::restore_live_registers(_masm, RegisterSaver::arg_registers);
753 // __ pop_frame(); // implicitly done in restore_live_registers()
754 } else {
755 // Tail call: call c and return to stub caller.
756 address entry_point = CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_post);
757 __ lgr_if_needed(Z_ARG1, addr);
758 __ lgr_if_needed(Z_ARG2, count);
759 __ load_const(Z_R1, entry_point);
760 __ z_br(Z_R1); // Branch without linking, callee will return to stub caller.
761 }
762 }
763 break;
|