Skip to content

Commit aa43824

Browse files
committed
8289138: G1: Remove redundant is-marking-active checks in C1 barrier
Reviewed-by: tschatzl, ehelin
1 parent b4ab5fe commit aa43824

6 files changed

+0
-51
lines changed

src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -381,15 +381,6 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
381381
Label done;
382382
Label runtime;
383383

384-
// Is marking still active?
385-
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
386-
__ ldrw(tmp, in_progress);
387-
} else {
388-
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
389-
__ ldrb(tmp, in_progress);
390-
}
391-
__ cbzw(tmp, done);
392-
393384
// Can we store original value in the thread's buffer?
394385
__ ldr(tmp, queue_index);
395386
__ cbz(tmp, runtime);

src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -382,11 +382,6 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
382382
Label done;
383383
Label runtime;
384384

385-
// Is marking still active?
386-
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
387-
__ ldrb(R1, queue_active);
388-
__ cbz(R1, done);
389-
390385
__ ldr(r_index_1, queue_index);
391386
__ ldr(r_pre_val_0, Address(SP, nb_saved_regs*wordSize));
392387
__ ldr(r_buffer_2, buffer);

src/hotspot/cpu/ppc/gc/g1/g1BarrierSetAssembler_ppc.cpp

-10
Original file line numberDiff line numberDiff line change
@@ -469,16 +469,6 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
469469
__ std(tmp, -16, R1_SP);
470470
__ std(tmp2, -24, R1_SP);
471471

472-
// Is marking still active?
473-
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
474-
__ lwz(tmp, satb_q_active_byte_offset, R16_thread);
475-
} else {
476-
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
477-
__ lbz(tmp, satb_q_active_byte_offset, R16_thread);
478-
}
479-
__ cmpdi(CCR0, tmp, 0);
480-
__ beq(CCR0, marking_not_active);
481-
482472
__ bind(restart);
483473
// Load the index into the SATB buffer. SATBMarkQueue::_index is a
484474
// size_t so ld_ptr is appropriate.

src/hotspot/cpu/riscv/gc/g1/g1BarrierSetAssembler_riscv.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,6 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
379379
Label done;
380380
Label runtime;
381381

382-
// Is marking still active?
383-
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) { // 4-byte width
384-
__ lwu(tmp, in_progress);
385-
} else {
386-
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
387-
__ lbu(tmp, in_progress);
388-
}
389-
__ beqz(tmp, done);
390-
391382
// Can we store original value in the thread's buffer?
392383
__ ld(tmp, queue_index);
393384
__ beqz(tmp, runtime);

src/hotspot/cpu/s390/gc/g1/g1BarrierSetAssembler_s390.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -488,15 +488,6 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
488488
__ z_stg(tmp, 0*BytesPerWord + FrameMap::first_available_sp_in_frame, Z_SP);
489489
__ z_stg(tmp2, 1*BytesPerWord + FrameMap::first_available_sp_in_frame, Z_SP);
490490

491-
// Is marking still active?
492-
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
493-
__ load_and_test_int(tmp, Address(Z_thread, satb_q_active_byte_offset));
494-
} else {
495-
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
496-
__ load_and_test_byte(tmp, Address(Z_thread, satb_q_active_byte_offset));
497-
}
498-
__ z_bre(marking_not_active); // Activity indicator is zero, so there is no marking going on currently.
499-
500491
__ bind(restart);
501492
// Load the index into the SATB buffer. SATBMarkQueue::_index is a
502493
// size_t so ld_ptr is appropriate.

src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp

-9
Original file line numberDiff line numberDiff line change
@@ -468,15 +468,6 @@ void G1BarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAssembler*
468468
Label done;
469469
Label runtime;
470470

471-
// Is marking still active?
472-
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
473-
__ cmpl(queue_active, 0);
474-
} else {
475-
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
476-
__ cmpb(queue_active, 0);
477-
}
478-
__ jcc(Assembler::equal, done);
479-
480471
// Can we store original value in the thread's buffer?
481472

482473
__ movptr(tmp, queue_index);

0 commit comments

Comments
 (0)