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
--- 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();