JDK-8257910 : [JVMCI] Set exception_seen accordingly in the runtime.
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,16,17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-12-08
  • Updated: 2022-02-06
  • Resolved: 2020-12-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 16 JDK 17
11.0.11-oracleFixed 16 b29Fixed 17Fixed
Description
When we unwind an exception and cannot find an exception handler mapped to the invocation pc, we deoptimize the caller on the stack directly in Deoptimizer::deoptimize_for_missing_exception_handler. In some corner cases (e.g., pmd without tiered compilation), the exceptionSeen flag is not updated in the interpreter due to the absence of MDO. We should directly update the exceptionSeen flag here in the deoptimize_for_missing_exception_handler. 

C1 compiled code also does not update exceptionSeen accordingly. This may result in an unnecessary Graal compilation based on an out-dated profile. We should consider making that update when C1 compiled code calls into runtime for instantiating the exception object.
Comments
Fix Request Should get backported for parity with 11.0.11-oracle. It was mainly done for JVMCI, but it improves exceptions logging for C1, too. Version from GraalVM applies cleanly (see comment from Douglas).
26-01-2021

https://github.com/graalvm/labs-openjdk-11/commit/2fb8a2f3fbbab825601d315af1c6a6b5c4766a56
12-01-2021

Changeset: 58dca925 Author: Yudi Zheng <yzheng@openjdk.org> Committer: Vladimir Kozlov <kvn@openjdk.org> Date: 2020-12-10 22:43:37 +0000 URL: https://git.openjdk.java.net/jdk16/commit/58dca925
10-12-2020