--- old/src/hotspot/share/c1/c1_LIRAssembler.cpp 2019-05-01 16:15:27.000000000 -0700 +++ new/src/hotspot/share/c1/c1_LIRAssembler.cpp 2019-05-01 16:15:27.000000000 -0700 @@ -162,6 +162,9 @@ return !method->is_static(); } +bool LIR_Assembler::needs_clinit_barrier_on_entry(ciMethod* method) const { + return UseFastClassInitChecks && method->needs_clinit_barrier(); +} int LIR_Assembler::code_offset() const { return _masm->offset(); @@ -621,6 +624,9 @@ } offsets()->set_value(CodeOffsets::Verified_Entry, _masm->offset()); _masm->verified_entry(); + if (needs_clinit_barrier_on_entry(compilation()->method())) { + clinit_barrier(compilation()->method()); + } build_frame(); offsets()->set_value(CodeOffsets::Frame_Complete, _masm->offset()); break;