Integrated: 8307428: jstat tests doesn't tolerate dash in the O column
Stefan Karlsson
stefank at openjdk.org
Mon May 8 07:55:25 UTC 2023
On Thu, 4 May 2023 09:33:49 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
> 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.
>
> Tested locally by running the jstat/jstad tests in the Generational ZGC branch.
This pull request has now been integrated.
Changeset: 68f385c1
Author: Stefan Karlsson <stefank at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/68f385c1ca5f5bef7edfb66d9ec8ebee44cf4860
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
8307428: jstat tests doesn't tolerate dash in the O column
Reviewed-by: kevinw, cjplummer
-------------
PR: https://git.openjdk.org/jdk/pull/13796
More information about the serviceability-dev
mailing list