555 break;
556 }
557 }
558 }
559
560 // Find dominating allocations for each memory access (store or atomic
561 // operation) and elide barriers if there is no safepoint poll in between.
562 elide_dominated_barriers(accesses, allocations);
563 }
564
565 void G1BarrierSetC2::late_barrier_analysis() const {
566 compute_liveness_at_stubs();
567 analyze_dominating_barriers();
568 }
569
570 void G1BarrierSetC2::emit_stubs(CodeBuffer& cb) const {
571 MacroAssembler masm(&cb);
572 GrowableArray<G1BarrierStubC2*>* const stubs = barrier_set_state()->stubs();
573 for (int i = 0; i < stubs->length(); i++) {
574 // Make sure there is enough space in the code buffer
575 if (cb.insts()->maybe_expand_to_ensure_remaining(PhaseOutput::MAX_inst_size) && cb.blob() == nullptr) {
576 ciEnv::current()->record_failure("CodeCache is full");
577 return;
578 }
579 stubs->at(i)->emit_code(masm);
580 }
581 masm.flush();
582 }
583
584 #ifndef PRODUCT
585 void G1BarrierSetC2::dump_barrier_data(const MachNode* mach, outputStream* st) const {
586 if ((mach->barrier_data() & G1C2BarrierPre) != 0) {
587 st->print("pre ");
588 }
589 if ((mach->barrier_data() & G1C2BarrierPost) != 0) {
590 st->print("post ");
591 }
592 if ((mach->barrier_data() & G1C2BarrierPostNotNull) != 0) {
593 st->print("notnull ");
594 }
595 }
|
555 break;
556 }
557 }
558 }
559
560 // Find dominating allocations for each memory access (store or atomic
561 // operation) and elide barriers if there is no safepoint poll in between.
562 elide_dominated_barriers(accesses, allocations);
563 }
564
565 void G1BarrierSetC2::late_barrier_analysis() const {
566 compute_liveness_at_stubs();
567 analyze_dominating_barriers();
568 }
569
570 void G1BarrierSetC2::emit_stubs(CodeBuffer& cb) const {
571 MacroAssembler masm(&cb);
572 GrowableArray<G1BarrierStubC2*>* const stubs = barrier_set_state()->stubs();
573 for (int i = 0; i < stubs->length(); i++) {
574 // Make sure there is enough space in the code buffer
575 if (cb.insts()->maybe_expand_to_ensure_remaining(PhaseOutput::max_inst_gcstub_size()) && cb.blob() == nullptr) {
576 ciEnv::current()->record_failure("CodeCache is full");
577 return;
578 }
579 stubs->at(i)->emit_code(masm);
580 }
581 masm.flush();
582 }
583
584 #ifndef PRODUCT
585 void G1BarrierSetC2::dump_barrier_data(const MachNode* mach, outputStream* st) const {
586 if ((mach->barrier_data() & G1C2BarrierPre) != 0) {
587 st->print("pre ");
588 }
589 if ((mach->barrier_data() & G1C2BarrierPost) != 0) {
590 st->print("post ");
591 }
592 if ((mach->barrier_data() & G1C2BarrierPostNotNull) != 0) {
593 st->print("notnull ");
594 }
595 }
|