< prev index next >

test/hotspot/jtreg/serviceability/jvmti/thread/GetFrameCount/framecnt01/framecnt01.java

Print this page
*** 72,11 ***
          });
          while (!vThread1Started) {
              Thread.sleep(1);
          }
          // Let vthread1 to park
!         Thread.sleep(100);
  
          // this is too fragile, implementation can change at any time.
          checkFrames(vThread1, false, 14);
          LockSupport.unpark(vThread1);
          vThread1.join();
--- 72,13 ---
          });
          while (!vThread1Started) {
              Thread.sleep(1);
          }
          // Let vthread1 to park
!         while(vThread1.getState() != Thread.State.WAITING) {
+             Thread.sleep(1);
+         }
  
          // this is too fragile, implementation can change at any time.
          checkFrames(vThread1, false, 14);
          LockSupport.unpark(vThread1);
          vThread1.join();

*** 93,11 ***
                  LockSupport.park();
          });
          while (!pThread1Started) {
              Thread.sleep(1);
          }
!         Thread.sleep(10);
          checkFrames(pThread1, false, 5);
          LockSupport.unpark(pThread1);
          pThread1.join();
  
  
--- 95,14 ---
                  LockSupport.park();
          });
          while (!pThread1Started) {
              Thread.sleep(1);
          }
! 
+         while(pThread1.getState() != Thread.State.WAITING) {
+             Thread.sleep(1);
+         }
          checkFrames(pThread1, false, 5);
          LockSupport.unpark(pThread1);
          pThread1.join();
  
  
< prev index next >