< prev index next >

test/jdk/jdk/jfr/event/runtime/TestSizeTFlags.java

Print this page
rev 51054 : imported patch 9000013-aixDisableJFR-requires.patch


  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package jdk.jfr.event.runtime;
  26 
  27 import static jdk.test.lib.Asserts.assertTrue;
  28 
  29 import java.nio.file.Paths;
  30 import java.time.Duration;
  31 
  32 import jdk.jfr.Recording;
  33 import jdk.jfr.consumer.RecordedEvent;
  34 import jdk.test.lib.jfr.EventNames;
  35 import jdk.test.lib.jfr.Events;
  36 
  37 /*
  38  * @test
  39  * @bug 8058552

  40  * @requires vm.gc == "G1" | vm.gc == null
  41  * @key jfr
  42  * @summary Test checks that flags of type size_t are being sent to the jfr
  43  * @library /test/lib
  44  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps -XX:+UseG1GC -XX:+UseTLAB -XX:MinTLABSize=3k -XX:OldSize=30m -XX:YoungPLABSize=3k -XX:MaxDirectMemorySize=5M  jdk.jfr.event.runtime.TestSizeTFlags
  45  */
  46 public class TestSizeTFlags {
  47     private static final String EVENT_NAME = EventNames.UnsignedLongFlag;
  48     private static final int NUMBER_OF_FLAGS_TO_CHECK = 4;
  49     private static final long MIN_TLAB_SIZE_FLAG_VALUE = 3*1024L;
  50     private static final long OLD_SIZE_FLAG_VALUE = 30*1024*1024L;
  51     private static final long YOUNG_PLAB_SIZE_FLAG_VALUE = 3*1024L;
  52     private static final long MAX_DIRECT_MEMORY_SIZE_FLAG_VALUE = 5*1024*1024L;
  53 
  54     // Test run java with some of the flags of type size_t.
  55     // Goals are
  56     //  - to check that flags are reported to the jfr;
  57     //  - to make sure values are as expected.
  58     public static void main(String[] args) throws Exception {
  59         final boolean[] flagsFoundWithExpectedValue = new boolean[NUMBER_OF_FLAGS_TO_CHECK];




  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 package jdk.jfr.event.runtime;
  26 
  27 import static jdk.test.lib.Asserts.assertTrue;
  28 
  29 import java.nio.file.Paths;
  30 import java.time.Duration;
  31 
  32 import jdk.jfr.Recording;
  33 import jdk.jfr.consumer.RecordedEvent;
  34 import jdk.test.lib.jfr.EventNames;
  35 import jdk.test.lib.jfr.Events;
  36 
  37 /**
  38  * @test
  39  * @bug 8058552
  40  * @requires vm.hasJFR
  41  * @requires vm.gc == "G1" | vm.gc == null
  42  * @key jfr
  43  * @summary Test checks that flags of type size_t are being sent to the jfr
  44  * @library /test/lib
  45  * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps -XX:+UseG1GC -XX:+UseTLAB -XX:MinTLABSize=3k -XX:OldSize=30m -XX:YoungPLABSize=3k -XX:MaxDirectMemorySize=5M  jdk.jfr.event.runtime.TestSizeTFlags
  46  */
  47 public class TestSizeTFlags {
  48     private static final String EVENT_NAME = EventNames.UnsignedLongFlag;
  49     private static final int NUMBER_OF_FLAGS_TO_CHECK = 4;
  50     private static final long MIN_TLAB_SIZE_FLAG_VALUE = 3*1024L;
  51     private static final long OLD_SIZE_FLAG_VALUE = 30*1024*1024L;
  52     private static final long YOUNG_PLAB_SIZE_FLAG_VALUE = 3*1024L;
  53     private static final long MAX_DIRECT_MEMORY_SIZE_FLAG_VALUE = 5*1024*1024L;
  54 
  55     // Test run java with some of the flags of type size_t.
  56     // Goals are
  57     //  - to check that flags are reported to the jfr;
  58     //  - to make sure values are as expected.
  59     public static void main(String[] args) throws Exception {
  60         final boolean[] flagsFoundWithExpectedValue = new boolean[NUMBER_OF_FLAGS_TO_CHECK];


< prev index next >