comparison src/share/vm/runtime/deoptimization.hpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents d8041d695d19
children 36e1a11a72b3
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
70 Reason_constraint, // arbitrary runtime constraint violated 70 Reason_constraint, // arbitrary runtime constraint violated
71 Reason_div0_check, // a null_check due to division by zero 71 Reason_div0_check, // a null_check due to division by zero
72 Reason_age, // nmethod too old; tier threshold reached 72 Reason_age, // nmethod too old; tier threshold reached
73 Reason_predicate, // compiler generated predicate failed 73 Reason_predicate, // compiler generated predicate failed
74 Reason_loop_limit_check, // compiler generated loop limits check failed 74 Reason_loop_limit_check, // compiler generated loop limits check failed
75 Reason_speculate_class_check, // saw unexpected object class from type speculation
76 #ifdef GRAAL 75 #ifdef GRAAL
77 Reason_aliasing, // optimistic assumption about aliasing failed 76 Reason_aliasing, // optimistic assumption about aliasing failed
78 #endif 77 #endif
79 Reason_LIMIT, 78 Reason_LIMIT,
80 79
232 231
233 //** Unpacks vframeArray onto execution stack 232 //** Unpacks vframeArray onto execution stack
234 // Called by assembly stub after execution has returned to 233 // Called by assembly stub after execution has returned to
235 // deoptimized frame and after the stack unrolling. 234 // deoptimized frame and after the stack unrolling.
236 // @argument thread. Thread where stub_frame resides. 235 // @argument thread. Thread where stub_frame resides.
237 // @argument exec_mode. Determines how execution should be continued in top frame. 236 // @argument exec_mode. Determines how execution should be continuted in top frame.
238 // 0 means continue after current byte code 237 // 0 means continue after current byte code
239 // 1 means exception has happened, handle exception 238 // 1 means exception has happened, handle exception
240 // 2 means reexecute current bytecode (for uncommon traps). 239 // 2 means reexecute current bytecode (for uncommon traps).
241 // @see OptoRuntime::deoptimization_unpack_frames_C 240 // @see OptoRuntime::deoptimization_unpack_frames_C
242 // Return BasicType of call return type, if any 241 // Return BasicType of call return type, if any
349 static DeoptReason reason_recorded_per_bytecode_if_any(DeoptReason reason) { 348 static DeoptReason reason_recorded_per_bytecode_if_any(DeoptReason reason) {
350 if (reason_is_recorded_per_bytecode(reason)) 349 if (reason_is_recorded_per_bytecode(reason))
351 return reason; 350 return reason;
352 else if (reason == Reason_div0_check) // null check due to divide-by-zero? 351 else if (reason == Reason_div0_check) // null check due to divide-by-zero?
353 return Reason_null_check; // recorded per BCI as a null check 352 return Reason_null_check; // recorded per BCI as a null check
354 else if (reason == Reason_speculate_class_check)
355 return Reason_class_check;
356 else 353 else
357 return Reason_none; 354 return Reason_none;
358 }
359
360 static bool reason_is_speculate(int reason) {
361 if (reason == Reason_speculate_class_check) {
362 return true;
363 }
364 return false;
365 }
366
367 static uint per_method_trap_limit(int reason) {
368 return reason_is_speculate(reason) ? (uint)PerMethodSpecTrapLimit : (uint)PerMethodTrapLimit;
369 } 355 }
370 356
371 static const char* trap_reason_name(int reason); 357 static const char* trap_reason_name(int reason);
372 static const char* trap_action_name(int action); 358 static const char* trap_action_name(int action);
373 // Format like reason='foo' action='bar' index='123'. 359 // Format like reason='foo' action='bar' index='123'.
392 DeoptReason reason, 378 DeoptReason reason,
393 bool update_total_trap_count, 379 bool update_total_trap_count,
394 #ifdef GRAAL 380 #ifdef GRAAL
395 bool is_osr, 381 bool is_osr,
396 #endif 382 #endif
397 Method* compiled_method,
398 //outputs: 383 //outputs:
399 uint& ret_this_trap_count, 384 uint& ret_this_trap_count,
400 bool& ret_maybe_prior_trap, 385 bool& ret_maybe_prior_trap,
401 bool& ret_maybe_prior_recompile); 386 bool& ret_maybe_prior_recompile);
402 // class loading support for uncommon trap 387 // class loading support for uncommon trap