Skip to content
Permalink
Browse files

8237038: Shenandoah: Reduce thread pool size in TestEvilSyncBug.java …

…test

Reviewed-by: shade
  • Loading branch information
zhengyu123 committed Jan 13, 2020
1 parent 87c5a28 commit 27d782be64720d68319b892a18ef89c7b60ef6f9
Showing with 4 additions and 3 deletions.
  1. +4 −3 test/hotspot/jtreg/gc/shenandoah/TestEvilSyncBug.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Red Hat, Inc. All rights reserved.
* Copyright (c) 2016, 2020, Red Hat, Inc. All rights reserved.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
@@ -49,8 +49,9 @@ public static void main(String[] args) throws Exception {
if (args.length > 0) {
test();
} else {
ExecutorService pool = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());

// Use 1/4 of available processors to avoid over-saturation.
int numJobs = Math.max(1, Runtime.getRuntime().availableProcessors() / 4);
ExecutorService pool = Executors.newFixedThreadPool(numJobs);
Future<?>[] fs = new Future<?>[NUM_RUNS];

for (int c = 0; c < NUM_RUNS; c++) {

0 comments on commit 27d782b

Please sign in to comment.