JDK-8316428 : G1: Nmethod count statistics only count last code root set iterated
Type:Bug
Component:hotspot
Sub-Component:gc
Affected Version:22
Priority:P4
Status:Resolved
Resolution:Fixed
Submitted:2023-09-18
Updated:2024-10-25
Resolved:2023-09-19
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.
G1 Nmethod count statistics is wrong, only counting the count of the last code root set iterated.
Comments
A pull request was submitted for review.
Branch: master
URL: https://git.openjdk.org/jdk21u-dev/pull/1096
Date: 2024-10-24 14:53:35 +0000
24-10-2024
Fix request [21u]
I'd like to backport this to JDK 21u. While debugging a long G1 Evacuation Pause issue (potentially related to JDK-8315503 backed to JDK 21.0.4) caused by long "Code Root Scan" duration, I noticed the total "Scanned Nmethods" is 0. E.g.:
[debug][gc,phases ] GC(11) Code Root Scan (ms): Min: 623.7, Avg: 758.2, Max: 857.2, Diff: 233.5, Sum: 62170.3, Workers: 82
[debug][gc,phases ] GC(11) Scanned Nmethods Min: 0, Avg: 0.0, Max: 0, Diff: 0, Sum: 0, Workers: 82
The backport will fix the incorrect "Scanned Nmethods" stats.
Low risk.
Clean backport: https://github.com/openjdk/jdk21u-dev/pull/1096
24-10-2024
A pull request was submitted for review.
Branch: master
URL: https://git.openjdk.org/jdk21u/pull/458
Date: 2024-10-23 20:11:00 +0000