RFR: JDK-8312625: Test serviceability/dcmd/vm/TrimLibcHeapTest.java failed: RSS use increased

David Holmes dholmes at openjdk.org
Wed Jul 26 05:42:02 UTC 2023


On Tue, 25 Jul 2023 06:28:16 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> Trivial patch.
> 
> The test just fires `jcmd System.trim_native_heap`, but without preparing any special memory allocation conditions. Typically, we end up firing the command when VM initialization is done, and therefore end up trimming a lot of memory. But once in a blue moon concurrent allocations may be ongoing, so we may not trim anything, or even see increased RSS.
> 
> The patch just loosens the success condition to succeed if the trim happened, irregardless of how much memory had been trimmed.

Okay I guess, though now all we are testing is that we fired of the right DCmd, not that the DCmd actually did something that worked.

Thanks.

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/15009#pullrequestreview-1546862298


More information about the serviceability-dev mailing list