JDK-8279856 : Parallel: Use PreservedMarks to record promotion-failed objects
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 17,19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-01-11
  • Updated: 2023-11-21
  • Resolved: 2022-02-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.
JDK 17 JDK 19
17.0.10Fixed 19 b08Fixed
Related Reports
Relates :  
Relates :  
Description
At the end of a Young-GC, we walk the whole young-gen to find promotion-failed objs.

```
void PSScavenge::clean_up_failed_promotion() {
  ...
  RemoveForwardedPointerClosure remove_fwd_ptr_closure;
  young_gen->object_iterate(&remove_fwd_ptr_closure);
  ...
}
```

This can be quite expensive, especially #promotion-failed objs is ususally small if any.

An alternative is to use `PreservedMarks` to record those promotion-failed objs. (`PreservedMarks` is originally used for objs whose markWord must be preserved, `markWord::must_be_preserved`.)
Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1964 Date: 2023-11-17 11:38:11 +0000
17-11-2023

Fix-request (17u): This fixes a considerable performance problem with Parallel GC (process all of young-gen only to fix up very few - if any - references). The backport applies cleanly. The original fix has been in mainline since JDK19 and has not accrued any bug-tail since then.
17-11-2023

Changeset: 16ec47d5 Author: Albert Mingkun Yang <ayang@openjdk.org> Date: 2022-02-01 08:47:10 +0000 URL: https://git.openjdk.java.net/jdk/commit/16ec47d5e5bf129fc0910358464ab62bf6ce7ed8
01-02-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/7028 Date: 2022-01-11 14:02:20 +0000
11-01-2022