1 /* |
1 /* |
2 * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
677 BarrierSet* bs = Universe::heap()->barrier_set(); |
677 BarrierSet* bs = Universe::heap()->barrier_set(); |
678 switch (bs->kind()) { |
678 switch (bs->kind()) { |
679 case BarrierSet::G1SATBCTLogging: |
679 case BarrierSet::G1SATBCTLogging: |
680 // With G1, don't generate the call if we statically know that the target in uninitialized |
680 // With G1, don't generate the call if we statically know that the target in uninitialized |
681 if (!uninitialized_target) { |
681 if (!uninitialized_target) { |
|
682 Register thread = rax; |
|
683 Label filtered; |
|
684 __ push(thread); |
|
685 __ get_thread(thread); |
|
686 Address in_progress(thread, in_bytes(JavaThread::satb_mark_queue_offset() + |
|
687 SATBMarkQueue::byte_offset_of_active())); |
|
688 // Is marking active? |
|
689 if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) { |
|
690 __ cmpl(in_progress, 0); |
|
691 } else { |
|
692 assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption"); |
|
693 __ cmpb(in_progress, 0); |
|
694 } |
|
695 __ pop(thread); |
|
696 __ jcc(Assembler::equal, filtered); |
|
697 |
682 __ pusha(); // push registers |
698 __ pusha(); // push registers |
683 __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_pre), |
699 __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_pre), |
684 start, count); |
700 start, count); |
685 __ popa(); |
701 __ popa(); |
|
702 |
|
703 __ bind(filtered); |
686 } |
704 } |
687 break; |
705 break; |
688 case BarrierSet::CardTableForRS: |
706 case BarrierSet::CardTableForRS: |
689 case BarrierSet::CardTableExtension: |
707 case BarrierSet::CardTableExtension: |
690 case BarrierSet::ModRef: |
708 case BarrierSet::ModRef: |