Mercurial > hg > graal-compiler
comparison src/share/vm/c1/c1_IR.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 | 55fb97c4c58d |
children | 52b4284cb496 |
comparison
equal
deleted
inserted
replaced
17978:ad51f24671c2 | 17980:0bf37f737702 |
---|---|
224 | 224 |
225 VMReg name = frame_map()->regname(opr); | 225 VMReg name = frame_map()->regname(opr); |
226 _oop_map->set_oop(name); | 226 _oop_map->set_oop(name); |
227 } | 227 } |
228 | 228 |
229 | 229 // Mirror the stack size calculation in the deopt code |
230 | 230 // How much stack space would we need at this point in the program in |
231 // case of deoptimization? | |
232 int CodeEmitInfo::interpreter_frame_size() const { | |
233 ValueStack* state = _stack; | |
234 int size = 0; | |
235 int callee_parameters = 0; | |
236 int callee_locals = 0; | |
237 int extra_args = state->scope()->method()->max_stack() - state->stack_size(); | |
238 | |
239 while (state != NULL) { | |
240 int locks = state->locks_size(); | |
241 int temps = state->stack_size(); | |
242 bool is_top_frame = (state == _stack); | |
243 ciMethod* method = state->scope()->method(); | |
244 | |
245 int frame_size = BytesPerWord * Interpreter::size_activation(method->max_stack(), | |
246 temps + callee_parameters, | |
247 extra_args, | |
248 locks, | |
249 callee_parameters, | |
250 callee_locals, | |
251 is_top_frame); | |
252 size += frame_size; | |
253 | |
254 callee_parameters = method->size_of_parameters(); | |
255 callee_locals = method->max_locals(); | |
256 extra_args = 0; | |
257 state = state->caller_state(); | |
258 } | |
259 return size + Deoptimization::last_frame_adjust(0, callee_locals) * BytesPerWord; | |
260 } | |
231 | 261 |
232 // Implementation of IR | 262 // Implementation of IR |
233 | 263 |
234 IR::IR(Compilation* compilation, ciMethod* method, int osr_bci) : | 264 IR::IR(Compilation* compilation, ciMethod* method, int osr_bci) : |
235 _locals_size(in_WordSize(-1)) | 265 _locals_size(in_WordSize(-1)) |