< prev index next >

test/compiler/jsr292/ConcurrentClassLoadingTest.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke


   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  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/jdk.internal.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;




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  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/jdk.internal.misc
  30  *          java.management
  31  *
  32  * @run main/othervm compiler.jsr292.ConcurrentClassLoadingTest
  33  */
  34 
  35 package compiler.jsr292;
  36 
  37 import jdk.test.lib.Utils;
  38 
  39 import java.util.ArrayList;
  40 import java.util.Arrays;
  41 import java.util.List;
  42 import java.util.Random;
  43 import java.util.concurrent.BrokenBarrierException;
  44 import java.util.concurrent.CyclicBarrier;
  45 
  46 public class ConcurrentClassLoadingTest {
  47     int numThreads = 0;
  48     CyclicBarrier l;
  49     private static final Random rand = Utils.getRandomInstance();
  50 
  51     public static void main(String[] args) throws Throwable {
  52         ConcurrentClassLoadingTest test = new ConcurrentClassLoadingTest();
  53         test.parseArgs(args);
  54         test.run();
  55     }
  56 
  57     void parseArgs(String[] args) {
  58         int i = 0;


< prev index next >