JDK-8064319 : Need to enable -XX:+TraceExceptions in release builds
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-11-07
  • Updated: 2020-08-25
  • Resolved: 2014-12-17
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 8 JDK 9 Other
8u270Fixed 9 b45Fixed openjdk8u272Fixed
Sub Tasks
JDK-8175040 :  
My reasoning is that since JFR events can trace exceptions and their stack traces with pretty low, near zero, overhead - can we do the same for -XX:+TraceExceptions and make it available in release builds? Frequently a debug build changes timings, so my original bug doesn't reproduce in fast debug.

It would be great to have.
Approved 8u CSR for reference: https://bugs.openjdk.java.net/browse/JDK-8251970

CSR approved, please approve this 8u backport.

This is waiting for CSR approval first (currently in Draft state): https://bugs.openjdk.java.net/browse/JDK-8251970

This issue predates the Open CSR process, it had a "CSR" done under the old Oracle internal CCC process.

It does not seem to have ones, neither for the original patch, nor for Oracle 8u backport.

Does this need a CSR? It would introduce a new flag in product builds.

Fix Request (8u) I would like to backport this to 8u for parity with Oracle 8u271. The original patch applies cleanly.

Release note: When an exception is caught and re-thrown, it can be difficult to locate the caught exception. The TraceExceptions option can help to find this exception.

Yes, that's possible. The printing code is small so can be enabled in product mode.