Mercurial > hg > truffle
comparison src/share/vm/runtime/deoptimization.hpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | ada0a7729b6f 606acabe7b5c |
children | 810222d74f7c |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
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 Reason_rtm_state_change, // rtm state change detected | |
75 #ifdef GRAAL | 77 #ifdef GRAAL |
76 Reason_aliasing, // optimistic assumption about aliasing failed | 78 Reason_aliasing, // optimistic assumption about aliasing failed |
77 Reason_transfer_to_interpreter, // explicit transferToInterpreter() | 79 Reason_transfer_to_interpreter, // explicit transferToInterpreter() |
78 #endif | 80 #endif |
79 Reason_LIMIT, | 81 Reason_LIMIT, |
351 static DeoptReason reason_recorded_per_bytecode_if_any(DeoptReason reason) { | 353 static DeoptReason reason_recorded_per_bytecode_if_any(DeoptReason reason) { |
352 if (reason_is_recorded_per_bytecode(reason)) | 354 if (reason_is_recorded_per_bytecode(reason)) |
353 return reason; | 355 return reason; |
354 else if (reason == Reason_div0_check) // null check due to divide-by-zero? | 356 else if (reason == Reason_div0_check) // null check due to divide-by-zero? |
355 return Reason_null_check; // recorded per BCI as a null check | 357 return Reason_null_check; // recorded per BCI as a null check |
358 else if (reason == Reason_speculate_class_check) | |
359 return Reason_class_check; | |
356 else | 360 else |
357 return Reason_none; | 361 return Reason_none; |
362 } | |
363 | |
364 static bool reason_is_speculate(int reason) { | |
365 if (reason == Reason_speculate_class_check) { | |
366 return true; | |
367 } | |
368 return false; | |
369 } | |
370 | |
371 static uint per_method_trap_limit(int reason) { | |
372 return reason_is_speculate(reason) ? (uint)PerMethodSpecTrapLimit : (uint)PerMethodTrapLimit; | |
358 } | 373 } |
359 | 374 |
360 static const char* trap_reason_name(int reason); | 375 static const char* trap_reason_name(int reason); |
361 static const char* trap_action_name(int action); | 376 static const char* trap_action_name(int action); |
362 // Format like reason='foo' action='bar' index='123'. | 377 // Format like reason='foo' action='bar' index='123'. |
381 DeoptReason reason, | 396 DeoptReason reason, |
382 bool update_total_trap_count, | 397 bool update_total_trap_count, |
383 #ifdef GRAAL | 398 #ifdef GRAAL |
384 bool is_osr, | 399 bool is_osr, |
385 #endif | 400 #endif |
401 Method* compiled_method, | |
386 //outputs: | 402 //outputs: |
387 uint& ret_this_trap_count, | 403 uint& ret_this_trap_count, |
388 bool& ret_maybe_prior_trap, | 404 bool& ret_maybe_prior_trap, |
389 bool& ret_maybe_prior_recompile); | 405 bool& ret_maybe_prior_recompile); |
390 // class loading support for uncommon trap | 406 // class loading support for uncommon trap |