# HG changeset patch # User chagedorn # Date 1570696032 -7200 # Node ID 1b76d17440a051b2f017b51b9600002f40508a34 # Parent ccb7bf459cbd926a877bdddf275e20c522b1c996 8231720: Some perf regressions after 8225653 Summary: Fixed emitting of unused assembly code in 8225653​ which had a negative impact on performance in tight loops. Reviewed-by: kvn, thartmann diff -r ccb7bf459cbd -r 1b76d17440a0 src/hotspot/cpu/x86/macroAssembler_x86.cpp --- a/src/hotspot/cpu/x86/macroAssembler_x86.cpp Wed Oct 09 09:57:33 2019 +0200 +++ b/src/hotspot/cpu/x86/macroAssembler_x86.cpp Thu Oct 10 10:27:12 2019 +0200 @@ -824,11 +824,13 @@ } void MacroAssembler::stop(const char* msg) { - address rip = pc(); - pusha(); // get regs on stack + if (ShowMessageBoxOnError) { + address rip = pc(); + pusha(); // get regs on stack + lea(c_rarg1, InternalAddress(rip)); + movq(c_rarg2, rsp); // pass pointer to regs array + } lea(c_rarg0, ExternalAddress((address) msg)); - lea(c_rarg1, InternalAddress(rip)); - movq(c_rarg2, rsp); // pass pointer to regs array andq(rsp, -16); // align stack as required by ABI call(RuntimeAddress(CAST_FROM_FN_PTR(address, MacroAssembler::debug64))); hlt();