JDK-8307428 : jstat tests doesn't tolerate dash in the O column
  • Type: Bug
  • Component: hotspot
  • Sub-Component: svc
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-05-04
  • Updated: 2023-05-11
  • Resolved: 2023-05-08
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 21
21 b22Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Description
When running jstat tests like the following:
test/jdk/sun/tools/jstatd/TestJstatdServer.java

with Generational ZGC we get a failure because the O (old generation percentage) is reported as `-` and not a number. The reason why it is reported as `-` is that the current capacity of the old generation is zero and that leads to a divide-by-zero in this line:
https://github.com/openjdk/jdk/blob/82a8e91ef7c3b397f9cce3854722cfe4bace6f2e/src/jdk.jcmd/share/classes/sun/tools/jstat/resources/jstat_options#L1029

G1 has some workarounds for this situation where the reported capacity is slightly above 0. I'm a bit reluctant to add such a hack into Generational ZGC. I've talked to the jstat maintainers and they propose that we simply relax the test.
Comments
Changeset: 68f385c1 Author: Stefan Karlsson <stefank@openjdk.org> Date: 2023-05-08 07:52:25 +0000 URL: https://git.openjdk.org/jdk/commit/68f385c1ca5f5bef7edfb66d9ec8ebee44cf4860
08-05-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/13796 Date: 2023-05-04 09:33:49 +0000
04-05-2023