comparison src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 17980:0bf37f737702

8032410: compiler/uncommontrap/TestStackBangRbp.java times out on Solaris-Sparc V9 Summary: make compiled code bang the stack by the worst case size of the interpreter frame at deoptimization points. Reviewed-by: twisti, kvn
author roland
date Tue, 01 Apr 2014 09:36:49 +0200
parents 2100bf712e2a
children 52b4284cb496
comparison
equal deleted inserted replaced
17978:ad51f24671c2 17980:0bf37f737702
3482 3482
3483 // Pick up the initial fp we should save 3483 // Pick up the initial fp we should save
3484 // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved) 3484 // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
3485 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes())); 3485 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
3486 3486
3487 // Stack bang to make sure there's enough room for these interpreter frames. 3487 #ifdef ASSERT
3488 // Compilers generate code that bang the stack by as much as the
3489 // interpreter would need. So this stack banging should never
3490 // trigger a fault. Verify that it does not on non product builds.
3488 if (UseStackBanging) { 3491 if (UseStackBanging) {
3489 __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes())); 3492 __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
3490 __ bang_stack_size(rbx, rcx); 3493 __ bang_stack_size(rbx, rcx);
3491 } 3494 }
3495 #endif
3492 3496
3493 // Load address of array of frame pcs into rcx 3497 // Load address of array of frame pcs into rcx
3494 __ movptr(rcx, Address(rdi, Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes())); 3498 __ movptr(rcx, Address(rdi, Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes()));
3495 3499
3496 // Trash the old pc 3500 // Trash the old pc
3680 3684
3681 // Pick up the initial fp we should save 3685 // Pick up the initial fp we should save
3682 // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved) 3686 // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
3683 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes())); 3687 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
3684 3688
3685 // Stack bang to make sure there's enough room for these interpreter frames. 3689 #ifdef ASSERT
3690 // Compilers generate code that bang the stack by as much as the
3691 // interpreter would need. So this stack banging should never
3692 // trigger a fault. Verify that it does not on non product builds.
3686 if (UseStackBanging) { 3693 if (UseStackBanging) {
3687 __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes())); 3694 __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
3688 __ bang_stack_size(rbx, rcx); 3695 __ bang_stack_size(rbx, rcx);
3689 } 3696 }
3697 #endif
3690 3698
3691 // Load address of array of frame pcs into rcx (address*) 3699 // Load address of array of frame pcs into rcx (address*)
3692 __ movptr(rcx, Address(rdi, Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes())); 3700 __ movptr(rcx, Address(rdi, Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes()));
3693 3701
3694 // Trash the return pc 3702 // Trash the return pc