JDK-8271073 : Improve testing with VM option VerifyArchivedFields
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-07-21
  • Updated: 2023-09-25
  • Resolved: 2021-09-16
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 17 JDK 18
17.0.10-oracleFixed 18 b16Fixed
Related Reports
Duplicate :  
Relates :  
Description
The VerifyArchivedFields option was added in JDK-8253081, to make sure we can run the full GC even when the p->klass() of some archived heap object p is not yet loaded into the system dictionary. See https://github.com/iklam/jdk/blame/eb0bba7aa2afff7cabc44caed28269f9a60f06be/src/hotspot/share/cds/heapShared.cpp#L670

VerifyArchivedFields defines two levels of verification:

(a) Basic verification with VM_Verify (no side effects)
(b) Detailed verification by forcing a GC (with side effects)

Currently, (a) is enabled by default, and we don't have a test case for (b).

=========================
Proposed improvements:

[1]  (a) causes fastdebug build to slow down a few tens of ms for G1 (or more for other GCs such as Serial). It's not necessary to enable it for every single test in jtreg. It should be enough to enable (a) only for the CDS test cases.

[2] Add a new test case for (b)


Comments
Fix request [17u] I backport this for parity with 17.0.10-oracle. Low risk, touches testing code. Clean backport except for dropping a patch of a method not in 17. Test passes. SAP nighlty testing passed.
23-09-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1772 Date: 2023-09-22 11:16:57 +0000
22-09-2023

Changeset: b9829044 Author: Ioi Lam <iklam@openjdk.org> Date: 2021-09-16 23:26:55 +0000 URL: https://git.openjdk.java.net/jdk/commit/b98290444a4594d0164d6f313c506287282d1929
16-09-2021