< prev index next >

src/hotspot/share/gc/g1/c2/g1BarrierSetC2.cpp

Print this page

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

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