279 public: |
279 public: |
280 void enter_signal_handler() { _num_nested_signal++; } |
280 void enter_signal_handler() { _num_nested_signal++; } |
281 void leave_signal_handler() { _num_nested_signal--; } |
281 void leave_signal_handler() { _num_nested_signal--; } |
282 bool is_inside_signal_handler() const { return _num_nested_signal > 0; } |
282 bool is_inside_signal_handler() const { return _num_nested_signal > 0; } |
283 |
283 |
|
284 // Determines if a heap allocation failure will be retried |
|
285 // (e.g., by deoptimizing and re-executing in the interpreter). |
|
286 // In this case, the failed allocation must raise |
|
287 // Universe::out_of_memory_error_retry() and omit side effects |
|
288 // such as JVMTI events and handling -XX:+HeapDumpOnOutOfMemoryError |
|
289 // and -XX:OnOutOfMemoryError. |
|
290 virtual bool in_retryable_allocation() const { return false; } |
|
291 |
284 #ifdef ASSERT |
292 #ifdef ASSERT |
285 void set_suspendible_thread() { |
293 void set_suspendible_thread() { |
286 _suspendible_thread = true; |
294 _suspendible_thread = true; |
287 } |
295 } |
288 |
296 |
1045 // Specifies if the DeoptReason for the last uncommon trap was Reason_transfer_to_interpreter |
1053 // Specifies if the DeoptReason for the last uncommon trap was Reason_transfer_to_interpreter |
1046 bool _pending_transfer_to_interpreter; |
1054 bool _pending_transfer_to_interpreter; |
1047 |
1055 |
1048 // Guard for re-entrant call to JVMCIRuntime::adjust_comp_level |
1056 // Guard for re-entrant call to JVMCIRuntime::adjust_comp_level |
1049 bool _adjusting_comp_level; |
1057 bool _adjusting_comp_level; |
|
1058 |
|
1059 // True if in a runtime call from compiled code that will deoptimize |
|
1060 // and re-execute a failed heap allocation in the interpreter. |
|
1061 bool _in_retryable_allocation; |
1050 |
1062 |
1051 // An id of a speculation that JVMCI compiled code can use to further describe and |
1063 // An id of a speculation that JVMCI compiled code can use to further describe and |
1052 // uniquely identify the speculative optimization guarded by the uncommon trap |
1064 // uniquely identify the speculative optimization guarded by the uncommon trap |
1053 long _pending_failed_speculation; |
1065 long _pending_failed_speculation; |
1054 |
1066 |
1456 MemRegion deferred_card_mark() const { return _deferred_card_mark; } |
1468 MemRegion deferred_card_mark() const { return _deferred_card_mark; } |
1457 void set_deferred_card_mark(MemRegion mr) { _deferred_card_mark = mr; } |
1469 void set_deferred_card_mark(MemRegion mr) { _deferred_card_mark = mr; } |
1458 |
1470 |
1459 #if INCLUDE_JVMCI |
1471 #if INCLUDE_JVMCI |
1460 int pending_deoptimization() const { return _pending_deoptimization; } |
1472 int pending_deoptimization() const { return _pending_deoptimization; } |
1461 long pending_failed_speculation() const { return _pending_failed_speculation; } |
1473 long pending_failed_speculation() const { return _pending_failed_speculation; } |
1462 bool adjusting_comp_level() const { return _adjusting_comp_level; } |
1474 bool adjusting_comp_level() const { return _adjusting_comp_level; } |
1463 void set_adjusting_comp_level(bool b) { _adjusting_comp_level = b; } |
1475 void set_adjusting_comp_level(bool b) { _adjusting_comp_level = b; } |
1464 bool has_pending_monitorenter() const { return _pending_monitorenter; } |
1476 bool has_pending_monitorenter() const { return _pending_monitorenter; } |
1465 void set_pending_monitorenter(bool b) { _pending_monitorenter = b; } |
1477 void set_pending_monitorenter(bool b) { _pending_monitorenter = b; } |
1466 void set_pending_deoptimization(int reason) { _pending_deoptimization = reason; } |
1478 void set_pending_deoptimization(int reason) { _pending_deoptimization = reason; } |
1467 void set_pending_failed_speculation(long failed_speculation) { _pending_failed_speculation = failed_speculation; } |
1479 void set_pending_failed_speculation(long failed_speculation) { _pending_failed_speculation = failed_speculation; } |
1468 void set_pending_transfer_to_interpreter(bool b) { _pending_transfer_to_interpreter = b; } |
1480 void set_pending_transfer_to_interpreter(bool b) { _pending_transfer_to_interpreter = b; } |
1469 void set_jvmci_alternate_call_target(address a) { assert(_jvmci._alternate_call_target == NULL, "must be"); _jvmci._alternate_call_target = a; } |
1481 void set_jvmci_alternate_call_target(address a) { assert(_jvmci._alternate_call_target == NULL, "must be"); _jvmci._alternate_call_target = a; } |
1470 void set_jvmci_implicit_exception_pc(address a) { assert(_jvmci._implicit_exception_pc == NULL, "must be"); _jvmci._implicit_exception_pc = a; } |
1482 void set_jvmci_implicit_exception_pc(address a) { assert(_jvmci._implicit_exception_pc == NULL, "must be"); _jvmci._implicit_exception_pc = a; } |
|
1483 |
|
1484 virtual bool in_retryable_allocation() const { return _in_retryable_allocation; } |
|
1485 void set_in_retryable_allocation(bool b) { _in_retryable_allocation = b; } |
1471 #endif // INCLUDE_JVMCI |
1486 #endif // INCLUDE_JVMCI |
1472 |
1487 |
1473 // Exception handling for compiled methods |
1488 // Exception handling for compiled methods |
1474 oop exception_oop() const { return _exception_oop; } |
1489 oop exception_oop() const { return _exception_oop; } |
1475 address exception_pc() const { return _exception_pc; } |
1490 address exception_pc() const { return _exception_pc; } |