src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/opto/compile.cpp	Thu Mar 20 11:29:01 2014
--- new/src/share/vm/opto/compile.cpp	Thu Mar 20 11:29:01 2014

*** 437,446 **** --- 437,454 ---- int words = _frame_slots >> shift; assert( words << shift == _frame_slots, "frame size must be properly aligned in LP64" ); return words; } + // To bang the stack of this compiled method we use the stack size + // that the interpreter would need in case of a deoptimization. This + // removes the need to bang the stack in the deoptimization blob which + // in turn simplifies stack overflow handling. + int Compile::bang_size_in_bytes() const { + return MAX2(_interpreter_frame_size, frame_size_in_bytes()); + } + // ============================================================================ //------------------------------CompileWrapper--------------------------------- class CompileWrapper : public StackObj { Compile *const _compile; public:
*** 660,670 **** --- 668,679 ---- _number_of_mh_late_inlines(0), _inlining_progress(false), _inlining_incrementally(false), _print_inlining_list(NULL), _print_inlining_idx(0), ! _preserve_jvm_state(0) { ! _preserve_jvm_state(0), + _interpreter_frame_size(0) { C = this; CompileWrapper cw(this); #ifndef PRODUCT if (TimeCompiler2) {
*** 964,974 **** --- 973,984 ---- _inlining_progress(false), _inlining_incrementally(false), _print_inlining_list(NULL), _print_inlining_idx(0), _preserve_jvm_state(0), ! _allowed_reasons(0) { ! _allowed_reasons(0), + _interpreter_frame_size(0) { C = this; #ifndef PRODUCT TraceTime t1(NULL, &_t_totalCompilation, TimeCompiler, false); TraceTime t2(NULL, &_t_stubCompilation, TimeCompiler, false);
*** 3054,3065 **** --- 3064,3079 ---- if (i < cnt) { // Place all non-visited non-null inputs onto stack Node* m = n->in(i); ++i; if (m != NULL && !frc._visited.test_set(m->_idx)) { ! if (m->is_SafePoint() && m->as_SafePoint()->jvms() != NULL) { + // compute worst case interpreter size in case of a deoptimization + update_interpreter_frame_size(m->as_SafePoint()->jvms()->interpreter_frame_size()); + sfpt.push(m); + } cnt = m->req(); nstack.push(n, i); // put on stack parent and next input's index n = m; i = 0; }

src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File