JDK-8318941 : Make G1 update gc_conc_mark hsperf counter more frequently
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 22
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-10-26
  • Updated: 2023-10-27
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
JDK-8315149 added an hsperf counter sun.threads.cpu_time.gc_conc_mark for CPU time consumed by G1's concurrent marking master thread and worker threads.

This counter is not updated during G1ConcurrentMark::mark_from_roots(). For large-heap (e.g., >50GiB) applications, mark_from_roots() could take many seconds or even minutes. For use cases such as Adaptable Heap Sizing (AHS,  https://mail.openjdk.org/pipermail/hotspot-dev/2022-September/064190.html), they could read the hsperf counter every few seconds (e.g. 1-5s).  A sudden, delayed increase in sun.threads.cpu_time.gc_conc_mark could cause noise and mis-representation for those use cases.

It would be better to update sun.threads.cpu_time.gc_conc_mark more frequently during mark_from_roots().