JDK-8271014 : Refactor HeapShared::is_archived_object()
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-07-21
  • Updated: 2021-07-26
  • Resolved: 2021-07-21
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 18
18 b07Fixed
Description
This is in preparation of JDK-8270489 - Support archived heap objects in EpsilonGC.

We have the following function that's used ONLY in asserts and WhiteBox tests.

bool HeapShared::is_archived_object(oop p) {
  return Universe::heap()->is_archived_object(p);
}

This function is used for two completely different purposes:

[1] During dump time, is "p" an object that's about to be written into the archived heap?

[2] During runtime, is "p" an object in an archive region?

To support archived objects in other types of GCs that do not support archive regions, we should refactor this code to distinguish between the two use cases. This will make the code easier to understand.

=========

[0] Remove HeapShared::is_archived_object()

[1] -> add new function HeapShared::is_archived_object_during_dumptime()

[2] -> rewrite the code to call Universe::heap()->is_archived_object(p) instead.

Comments
Changeset: 024c4027 Author: Ioi Lam <iklam@openjdk.org> Date: 2021-07-21 18:49:19 +0000 URL: https://git.openjdk.java.net/jdk/commit/024c4027d8b0821612e8e82e732182de9192b3fe
21-07-2021