JDK-8274191 : Improve g1 evacuation failure injector performance
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 18
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-09-23
  • Updated: 2021-11-30
  • Resolved: 2021-09-24
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 b17Fixed
Related Reports
Relates :  
Relates :  
Description
G1's evacuation failure injector is typically used for testing evacuation failure handling code, causing evacuation failures.

This helps finding issues with evacuation failure handling; as such, since this is debug-only code, it is completely disabled (compiled out) in product code.

For region pinning for performance measurements we found when manually enabling it in product mode the current implementation causes significant performance regressions on some systems (see JDK-8273309) by itself, making performance work for region pinning (g1 uses evacuation failure handling for handling pinned regions) unusable.

The reason seems to be that reading and writing G1YoungGCEvacFailureInjector::_evacuation_failure_object_count without synchronization by multiple threads millions of times per gc causes a huge slowdown.

Since we need/use this mechanism for performance work, improve the implementation to have much less performance impact by itself.


Comments
Changeset: db23ecdf Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2021-09-24 12:06:17 +0000 URL: https://git.openjdk.java.net/jdk/commit/db23ecdfae44a5387c2407e9e0f300f08770e7c0
24-09-2021

The remaining spikes may be caused by something different (tight heap), but of course warrants further investigation (in JDK-8273309)
23-09-2021

The attached image shows pause time curve before/after these changes on specjbb2015 with constant IR and evacuation failure injection in a release build.
23-09-2021