diff --git a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp index 9c19cd47ac0..52a417b2003 100644 --- a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp +++ b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp @@ -1896,7 +1896,7 @@ void LIR_Assembler::comp_fl2i(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Op void LIR_Assembler::align_call(LIR_Code code) { - // Not needed + __ save_profile_rng(); } @@ -1904,6 +1904,7 @@ void LIR_Assembler::call(LIR_OpJavaCall *op, relocInfo::relocType rtype) { int ret_addr_offset = __ patchable_call(op->addr(), rtype); assert(ret_addr_offset == __ offset(), "embedded return address not allowed"); add_call_info_here(op->info()); + __ restore_profile_rng(); } @@ -1946,6 +1947,7 @@ void LIR_Assembler::ic_call(LIR_OpJavaCall *op) { __ bind(call_return); } add_call_info(code_offset(), op->info()); + __ restore_profile_rng(); } void LIR_Assembler::emit_static_call_stub() { diff --git a/src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp b/src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp index 33310c2f663..3b6de4535ba 100644 --- a/src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp +++ b/src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp @@ -54,6 +54,8 @@ void C1_MacroAssembler::build_frame(int frame_size_in_bytes, int bang_size_in_by raw_push(FP, LR); sub_slow(SP, SP, frame_size_in_bytes); + restore_profile_rng(); + // Insert nmethod entry barrier into frame. BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler(); bs->nmethod_entry_barrier(this); @@ -62,6 +64,7 @@ void C1_MacroAssembler::build_frame(int frame_size_in_bytes, int bang_size_in_by void C1_MacroAssembler::remove_frame(int frame_size_in_bytes) { add_slow(SP, SP, frame_size_in_bytes); raw_pop(FP, LR); + save_profile_rng(); } void C1_MacroAssembler::verified_entry(bool breakAtEntry) {