On Mon, 21 Aug 2023 19:25:25 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

> The test tries to match up various GC -XX:+PrintFlagsFinal values with the 
> output of jhsdb -jmap --pid <pid> --heap. With ZGC, MaxNewSize set to 
> (size_t)-1, but PrintFlagsFinal prints it as an unsigned long:
> 
>     size_t MaxNewSize = 18446744073709551615 {product} {default} 
> 
> jmap normally prints out both the raw size and the MB size. For example:
> 
> MaxHeapSize              = 805306368 (768.0MB)
> 
> But as part of the fix for 
> [JDK-6718125](https://bugs.openjdk.org/browse/JDK-6718125), it stopped 
> printing the raw value for negative values an only printed the MB value. So 
> for MaxNewSize we had:
> 
>      MaxNewSize = 17592186044415 MB
> 
> Instead of:
> 
>     MaxNewSize = 18446744073709551615 (17592186044415 MB)
> 
> So the test fails to find 18446744073709551615 in the output. I fixed jmap to 
> include the raw value as an unsigned long, even if negative as a signed long 
> (to be consistent with PrintFlagsFinal output), so now the test passes even 
> when MaxNewSize is included in the list.

`(size_t)-1` is a weird value to pass, which requires this gymnastics in the 
output code.
But I guess this is as good as it gets for the test-side fix.

Please test with all current GCs? We have seen regressions in this test with 
Shenandoah previously.

-------------

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15368#pullrequestreview-1593149095

Reply via email to