On Fri, 12 Aug 2022 10:05:39 GMT, Kevin Walls <kev...@openjdk.org> wrote:
>> This is test unstable when monitoring CodeHeap pools as they can change >> outside the test's control. >> Attempting more heuristics to sense these unrelated changes just means we >> skip more pools. >> >> The test design, making a Java allocation to affect a memory pool, shows it >> was intended for Java heap pools, so the test should focus on them. If we >> make a larger allocation during the test we actually can observe a change in >> size in the old gen pools it monitors (new gen pools are not expected to >> have thresholds, so they are skipped). >> >> There exist specific tests in test/hotspot/jtreg/compiler/codecache/jmx >> which are intended for non-heap pools, so we should skip them intentionally >> here in isUsageThresholdExceeded. >> >> Other edits in the test to fix that the peak usage reported by the test was >> simply usage, not peak. Fetch the usage and peak usage as near together as >> possible in the test. At line 110 in the test, remove an attempt to skip >> pools we can't monitor (which was working, but does not cover all cases). >> >> >> Example test log, showing allocation that hits the old gen and triggers the >> threshold set by the test: >> >> ----------System.out:(15/796)---------- >> ... >> 5 pool G1 Old Gen of type: Heap memory >> used value is 1024000 max is 1038090240 isExceeded = false >> peak used value is 1024000 >> threshold set to 1024001 >> threshold count 0 >> reset peak usage. peak usage = 1024000 isExceeded = false >> Allocated heap. isExceeded = true >> used value is 106930176 max is 1038090240 isExceeded = true >> peak used value is 106930176 peak max is 1038090240 >> threshold count 1 > > Kevin Walls has updated the pull request incrementally with one additional > commit since the last revision: > > Remove fetching and logging of peak max usage. thanks Alex! ------------- PR: https://git.openjdk.org/jdk/pull/9842