RFR: 8226416: MonitorUsedDeflationThreshold can cause repeated async deflation requests [v4]

Daniel D.Daugherty dcubed at openjdk.java.net
Wed Jan 13 16:20:04 UTC 2021


On Wed, 13 Jan 2021 15:46:55 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> test/hotspot/jtreg/runtime/Monitor/MonitorUsedDeflationThresholdTest.java line 118:
>> 
>>> 116:             if (too_many == null) {
>>> 117:                 throw new RuntimeException("Did not find too_many string in output.\n");
>>> 118:             }
>> 
>> You should call output_detail.reportDiagnosticSummary() before throwing the exception. That emulates what OutputAnalyzer.shouldContain would do. (or you could just use shouldContain).
>
> I added a call to output_detail.reportDiagnosticSummary().
> I didn't use OutputAnalyzer.shouldContain() intentionally
> because of this output line:
> 
> `System.out.println("too_many='" + too_many + "'");`
> 
> which is there for diagnostic purposes.

Manually tested the use of `output_detail.reportDiagnosticSummary()`
by temporarily setting `too_many = null;` before the check. It caused
nice diagnostic output to be printed. I like this technique!

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

PR: https://git.openjdk.java.net/jdk/pull/1993


More information about the hotspot-runtime-dev mailing list