Skip to content
Permalink
Browse files
8270435: UT: MonitorUsedDeflationThresholdTest failed: did not find t…
…oo_many string in output

Backport-of: 21e302a0f4cbf3ace907c36d871a2f2cf6277188
  • Loading branch information
GoeLin committed Mar 15, 2022
1 parent 24ce3f4 commit cd5684ac9396d060f72df036802fe73b92a34e12
Showing 1 changed file with 10 additions and 2 deletions.
@@ -80,6 +80,11 @@ public static void main(String[] args) throws Exception {
// of monitors for threads that call Object.wait().
"-XX:+UnlockDiagnosticVMOptions",
"-XX:AvgMonitorsPerThreadEstimate=1",
// MonitorUsedDeflationThreshold == 10 means we'll request
// deflations when 10% of monitors are used rather than the
// default 90%. This should allow the test to tolerate a burst
// of used monitors by threads not under this test's control.
"-XX:MonitorUsedDeflationThreshold=10",
// Enable monitorinflation logging so we can see that
// MonitorUsedDeflationThreshold and
// NoAsyncDeflationProgressMaxoption are working.
@@ -88,8 +93,9 @@ public static void main(String[] args) throws Exception {
"-Xlog:safepoint+cleanup=info",
"-Xlog:safepoint+stats=debug",
// Run the test with inflate_count == 33 since that
// reproduced the bug with JDK13. Anything above the
// in_use_list_ceiling will do the trick.
// reproduced the bug with JDK13. With inflate_count == 33, an
// initial ceiling == 12 and MonitorUsedDeflationThreshold == 10,
// we should hit NoAsyncDeflationProgressMax at least 3 times.
"MonitorUsedDeflationThresholdTest", "33");

OutputAnalyzer output_detail = new OutputAnalyzer(pb.start());
@@ -110,6 +116,8 @@ public static void main(String[] args) throws Exception {
throw new RuntimeException("Did not find too_many string in output.\n");
}
System.out.println("too_many='" + too_many + "'");
// Uncomment the following line for dumping test output in passing runs:
// output_detail.reportDiagnosticSummary();

System.out.println("PASSED.");
return;

1 comment on commit cd5684a

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on cd5684a Mar 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.