< prev index next >

test/compiler/jsr292/ConcurrentClassLoadingTest.java

Print this page




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @bug 8022595
  27  * @summary JSR292: deadlock during class loading of MethodHandles, MethodHandleImpl & MethodHandleNatives
  28  * @library /testlibrary
  29  * @modules java.base/sun.misc
  30  *          java.management
  31  * @run main/othervm ConcurrentClassLoadingTest
  32  */
  33 import com.oracle.java.testlibrary.Utils;
  34 import java.util.ArrayList;
  35 import java.util.Arrays;
  36 import java.util.List;
  37 import java.util.Random;
  38 import java.util.concurrent.BrokenBarrierException;
  39 import java.util.concurrent.CyclicBarrier;
  40 
  41 public class ConcurrentClassLoadingTest {
  42     int numThreads = 0;
  43     CyclicBarrier l;
  44     private static final Random rand = Utils.getRandomInstance();
  45 
  46     public static void main(String[] args) throws Throwable {
  47         ConcurrentClassLoadingTest test = new ConcurrentClassLoadingTest();
  48         test.parseArgs(args);
  49         test.run();
  50     }
  51 
  52     void parseArgs(String[] args) {
  53         int i = 0;




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /**
  25  * @test
  26  * @bug 8022595
  27  * @summary JSR292: deadlock during class loading of MethodHandles, MethodHandleImpl & MethodHandleNatives
  28  * @library /testlibrary
  29  * @modules java.base/sun.misc
  30  *          java.management
  31  * @run main/othervm ConcurrentClassLoadingTest
  32  */
  33 import jdk.test.lib.Utils;
  34 import java.util.ArrayList;
  35 import java.util.Arrays;
  36 import java.util.List;
  37 import java.util.Random;
  38 import java.util.concurrent.BrokenBarrierException;
  39 import java.util.concurrent.CyclicBarrier;
  40 
  41 public class ConcurrentClassLoadingTest {
  42     int numThreads = 0;
  43     CyclicBarrier l;
  44     private static final Random rand = Utils.getRandomInstance();
  45 
  46     public static void main(String[] args) throws Throwable {
  47         ConcurrentClassLoadingTest test = new ConcurrentClassLoadingTest();
  48         test.parseArgs(args);
  49         test.run();
  50     }
  51 
  52     void parseArgs(String[] args) {
  53         int i = 0;


< prev index next >