< prev index next >

test/jdk/jdk/jfr/startupargs/TestOldObjectQueueSize.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 
  26 package jdk.jfr.startupargs;
  27 
  28 import java.util.ArrayList;
  29 import java.util.List;
  30 
  31 import jdk.jfr.Recording;
  32 import jdk.jfr.consumer.RecordedEvent;
  33 import jdk.jfr.internal.test.WhiteBox;
  34 import jdk.test.lib.jfr.EventNames;
  35 import jdk.test.lib.jfr.Events;
  36 
  37 /*
  38  * @test
  39  * @summary Test -XX:FlightRecorderOptions=old-object-queue-size

  40  * @modules jdk.jfr/jdk.jfr.internal.test
  41  * @library /test/lib
  42  * @key jfr
  43  *
  44  * @run main/othervm -XX:TLABSize=2k -XX:-FastTLABRefill -XX:FlightRecorderOptions=old-object-queue-size=0 jdk.jfr.startupargs.TestOldObjectQueueSize off
  45  * @run main/othervm -XX:TLABSize=2k -Xlog:gc+tlab=trace -XX:-FastTLABRefill -XX:FlightRecorderOptions=old-object-queue-size=10000 jdk.jfr.startupargs.TestOldObjectQueueSize many
  46  * @run main/othervm -XX:TLABSize=2k -Xlog:gc+tlab=trace -XX:-FastTLABRefill -XX:FlightRecorderOptions=old-object-queue-size=1000000 jdk.jfr.startupargs.TestOldObjectQueueSize many
  47  */
  48 public class TestOldObjectQueueSize {
  49 
  50     private static final int OBJECT_COUNT = 10_000;
  51     private static final int DEFAULT_OLD_OBJECT_QUEUE_SIZE = 256;
  52 
  53     public final static List<Object> leak = new ArrayList<>(OBJECT_COUNT);
  54 
  55     public static void main(String[] args) throws Exception {
  56         WhiteBox.setWriteAllObjectSamples(true);
  57         System.out.println("TESTING: " + args[0]);
  58 
  59         String amount = args[0];




  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 
  26 package jdk.jfr.startupargs;
  27 
  28 import java.util.ArrayList;
  29 import java.util.List;
  30 
  31 import jdk.jfr.Recording;
  32 import jdk.jfr.consumer.RecordedEvent;
  33 import jdk.jfr.internal.test.WhiteBox;
  34 import jdk.test.lib.jfr.EventNames;
  35 import jdk.test.lib.jfr.Events;
  36 
  37 /**
  38  * @test
  39  * @summary Test -XX:FlightRecorderOptions=old-object-queue-size
  40  * @requires vm.hasJFR
  41  * @modules jdk.jfr/jdk.jfr.internal.test
  42  * @library /test/lib
  43  * @key jfr
  44  *
  45  * @run main/othervm -XX:TLABSize=2k -XX:-FastTLABRefill -XX:FlightRecorderOptions=old-object-queue-size=0 jdk.jfr.startupargs.TestOldObjectQueueSize off
  46  * @run main/othervm -XX:TLABSize=2k -Xlog:gc+tlab=trace -XX:-FastTLABRefill -XX:FlightRecorderOptions=old-object-queue-size=10000 jdk.jfr.startupargs.TestOldObjectQueueSize many
  47  * @run main/othervm -XX:TLABSize=2k -Xlog:gc+tlab=trace -XX:-FastTLABRefill -XX:FlightRecorderOptions=old-object-queue-size=1000000 jdk.jfr.startupargs.TestOldObjectQueueSize many
  48  */
  49 public class TestOldObjectQueueSize {
  50 
  51     private static final int OBJECT_COUNT = 10_000;
  52     private static final int DEFAULT_OLD_OBJECT_QUEUE_SIZE = 256;
  53 
  54     public final static List<Object> leak = new ArrayList<>(OBJECT_COUNT);
  55 
  56     public static void main(String[] args) throws Exception {
  57         WhiteBox.setWriteAllObjectSamples(true);
  58         System.out.println("TESTING: " + args[0]);
  59 
  60         String amount = args[0];


< prev index next >