< prev index next >

test/hotspot/jtreg/gc/shenandoah/jvmti/TestHeapDump.java

Print this page
rev 59879 : [mq]: 8249000


   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 /**
  26  * @test TestHeapDump
  27  * @summary Tests JVMTI heap dumps
  28  * @requires vm.gc.Shenandoah & !vm.graal.enabled
  29  * @compile TestHeapDump.java
  30  * @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive                        TestHeapDump
  31  *
  32  */
  33 
  34 /**
  35  * @test TestHeapDump
  36  * @summary Tests JVMTI heap dumps
  37  * @requires vm.gc.Shenandoah & !vm.graal.enabled & (vm.bits == "64")

  38  * @compile TestHeapDump.java
  39  * @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive -XX:-UseCompressedOops TestHeapDump
  40  */
  41 
  42 /**
  43  * @test TestHeapDump
  44  * @summary Tests JVMTI heap dumps
  45  * @requires vm.gc.Shenandoah & !vm.graal.enabled
  46  * @compile TestHeapDump.java
  47  * @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive                         -XX:+UseStringDeduplication TestHeapDump
  48  */
  49 
  50 import java.lang.ref.Reference;
  51 
  52 public class TestHeapDump {
  53 
  54     private static final int NUM_ITER = 10000;
  55 
  56     private static final int ARRAY_SIZE = 1000;
  57 
  58     private static final int EXPECTED_OBJECTS =
  59             ARRAY_SIZE +   // array reachable from instance field
  60                     1 +            // static field root
  61                     1;             // local field root
  62 
  63     static {
  64         try {
  65             System.loadLibrary("TestHeapDump");




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 /**
  26  * @test TestHeapDump
  27  * @summary Tests JVMTI heap dumps
  28  * @requires vm.gc.Shenandoah
  29  * @compile TestHeapDump.java
  30  * @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive                        TestHeapDump
  31  *
  32  */
  33 
  34 /**
  35  * @test TestHeapDump
  36  * @summary Tests JVMTI heap dumps
  37  * @requires vm.gc.Shenandoah
  38  * @requires vm.bits == "64"
  39  * @compile TestHeapDump.java
  40  * @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive -XX:-UseCompressedOops TestHeapDump
  41  */
  42 
  43 /**
  44  * @test TestHeapDump
  45  * @summary Tests JVMTI heap dumps
  46  * @requires vm.gc.Shenandoah
  47  * @compile TestHeapDump.java
  48  * @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive                         -XX:+UseStringDeduplication TestHeapDump
  49  */
  50 
  51 import java.lang.ref.Reference;
  52 
  53 public class TestHeapDump {
  54 
  55     private static final int NUM_ITER = 10000;
  56 
  57     private static final int ARRAY_SIZE = 1000;
  58 
  59     private static final int EXPECTED_OBJECTS =
  60             ARRAY_SIZE +   // array reachable from instance field
  61                     1 +            // static field root
  62                     1;             // local field root
  63 
  64     static {
  65         try {
  66             System.loadLibrary("TestHeapDump");


< prev index next >