< prev index next >

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

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 33,12 ***
   * COMMENTS
   *     Ported from JVMDI.
   *
   * @requires vm.continuations
   * @library /test/lib
!  * @compile --enable-preview -source ${jdk.version} framecnt01.java
!  * @run main/othervm/native --enable-preview -agentlib:framecnt01 framecnt01
   */
  
  import java.util.concurrent.locks.LockSupport;
  
  public class framecnt01 {
--- 33,12 ---
   * COMMENTS
   *     Ported from JVMDI.
   *
   * @requires vm.continuations
   * @library /test/lib
!  * @compile framecnt01.java
!  * @run main/othervm/native -agentlib:framecnt01 framecnt01
   */
  
  import java.util.concurrent.locks.LockSupport;
  
  public class framecnt01 {

*** 77,11 ***
          while(vThread1.getState() != Thread.State.WAITING) {
              Thread.sleep(1);
          }
  
          // this is too fragile, implementation can change at any time.
!         checkFrames(vThread1, false, 15);
          LockSupport.unpark(vThread1);
          vThread1.join();
  
          // Test GetFrameCount on live platform thread
          Thread pThread = Thread.ofPlatform().name("PlatformThread-Live").start(() -> {
--- 77,11 ---
          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();
  
          // Test GetFrameCount on live platform thread
          Thread pThread = Thread.ofPlatform().name("PlatformThread-Live").start(() -> {
< prev index next >