JDK-6949301 : G1: extend asserts / guarantees with format strings
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs18
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2010-05-03
  • Updated: 2022-07-01
  • Resolved: 2022-07-01
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.
Other
tbdResolved
Related Reports
Relates :  
Description
John Coomes recently pushed 6888954 which extends HotSpot's assert / guarantee macros to allow format strings so that we can print out the contents of variables, fields, etc. when an assert / guarantee fails.

We should put some effort into G1 to extend all our asserts / guarantees to print out all the values involved in the asserts / guarantees, when they fail, to facilitate our debugging and reduce the need to have to essentially add that code manually every time we chase such a failure.

Comments
I believe we have already added useful assertion strings over the years where it matters, and we will continue to do so. I do not think there is need to go over all of them specifically.
01-07-2022

PUBLIC COMMENTS John Cuthbertson says: We probably don't want to do that for all asserts, only for the important ones. But we do want format strings for all guarantees.
12-08-2011