< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/stress/strace/strace005.java

Print this page
rev 56807 : [mq]: 8232684-v2


 370 
 371             int alltime = 0;
 372             while (!strace005.isLocked) {
 373                 synchronized (test) {
 374                     try {
 375                         test.wait(1);
 376                         alltime++;
 377                     } catch (InterruptedException e) {
 378                         strace005.complain("" + e);
 379                     }
 380                     if (alltime > strace005.waitTime) {
 381                         throw new Failure("out of wait time");
 382                     }
 383                 }
 384             }
 385         } else if (currentDepth > 1 && !isNativeResolved)
 386             isNativeResolved = true;
 387 
 388         if (strace005.DEPTH - currentDepth > 0) {
 389             try {
 390                 yield();
 391                 recursiveMethod2();
 392             } catch (StackOverflowError e) {
 393                 // ignore this exception
 394             }
 395         }
 396 
 397         currentDepth--;
 398     }
 399 
 400     native void recursiveMethod2();
 401 }


 370 
 371             int alltime = 0;
 372             while (!strace005.isLocked) {
 373                 synchronized (test) {
 374                     try {
 375                         test.wait(1);
 376                         alltime++;
 377                     } catch (InterruptedException e) {
 378                         strace005.complain("" + e);
 379                     }
 380                     if (alltime > strace005.waitTime) {
 381                         throw new Failure("out of wait time");
 382                     }
 383                 }
 384             }
 385         } else if (currentDepth > 1 && !isNativeResolved)
 386             isNativeResolved = true;
 387 
 388         if (strace005.DEPTH - currentDepth > 0) {
 389             try {
 390                 Thread.yield();
 391                 recursiveMethod2();
 392             } catch (StackOverflowError e) {
 393                 // ignore this exception
 394             }
 395         }
 396 
 397         currentDepth--;
 398     }
 399 
 400     native void recursiveMethod2();
 401 }
< prev index next >