test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/TestHotSpotSpeculationLog.java
changeset 58793 81ad1da857f6
parent 54669 ad45b3802d4e
child 58974 2b0f2fe82735
equal deleted inserted replaced
58790:5a9dba5a3eeb 58793:81ad1da857f6
    76 
    76 
    77     @Test
    77     @Test
    78     public synchronized void testFailedSpeculations() {
    78     public synchronized void testFailedSpeculations() {
    79         HotSpotSpeculationLog log = new HotSpotSpeculationLog();
    79         HotSpotSpeculationLog log = new HotSpotSpeculationLog();
    80         DummyReason reason1 = new DummyReason("dummy1");
    80         DummyReason reason1 = new DummyReason("dummy1");
    81         DummyReason reason2 = new DummyReason("dummy2");
    81         String longName = new String(new char[2000]).replace('\0', 'X');
       
    82         DummyReason reason2 = new DummyReason(longName);
    82         Assert.assertTrue(log.maySpeculate(reason1));
    83         Assert.assertTrue(log.maySpeculate(reason1));
    83         Assert.assertTrue(log.maySpeculate(reason2));
    84         Assert.assertTrue(log.maySpeculate(reason2));
    84 
    85 
    85         SpeculationLog.Speculation s1 = log.speculate(reason1);
    86         SpeculationLog.Speculation s1 = log.speculate(reason1);
    86         SpeculationLog.Speculation s2 = log.speculate(reason2);
    87         SpeculationLog.Speculation s2 = log.speculate(reason2);