< prev index next >

test/hotspot/jtreg/serviceability/sa/TestHeapDumpForLargeArray.java

Print this page




  30 import java.util.stream.Collectors;
  31 import java.io.FileInputStream;
  32 
  33 import sun.jvm.hotspot.HotSpotAgent;
  34 import sun.jvm.hotspot.debugger.*;
  35 
  36 import jdk.test.lib.apps.LingeredApp;
  37 import jdk.test.lib.JDKToolLauncher;
  38 import jdk.test.lib.JDKToolFinder;
  39 import jdk.test.lib.Platform;
  40 import jdk.test.lib.process.ProcessTools;
  41 import jdk.test.lib.process.OutputAnalyzer;
  42 import jdk.test.lib.Utils;
  43 import jdk.test.lib.Asserts;
  44 
  45 /**
  46  * @test
  47  * @library /test/lib
  48  * @bug 8171084
  49  * @requires vm.hasSAandCanAttach & (vm.bits == "64" & os.maxMemory > 8g)

  50  * @modules java.base/jdk.internal.misc
  51  *          jdk.hotspot.agent/sun.jvm.hotspot
  52  *          jdk.hotspot.agent/sun.jvm.hotspot.utilities
  53  *          jdk.hotspot.agent/sun.jvm.hotspot.oops
  54  *          jdk.hotspot.agent/sun.jvm.hotspot.debugger
  55  * @run main/timeout=1800/othervm -Xmx8g TestHeapDumpForLargeArray
  56  */
  57 
  58 public class TestHeapDumpForLargeArray {
  59 
  60     private static LingeredAppWithLargeArray theApp = null;
  61 
  62     private static void attachAndDump(String heapDumpFileName,
  63                                       long lingeredAppPid) throws Exception {
  64 
  65         JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jhsdb");
  66         launcher.addToolArg("jmap");
  67         launcher.addToolArg("--binaryheap");
  68         launcher.addToolArg("--dumpfile");
  69         launcher.addToolArg(heapDumpFileName);




  30 import java.util.stream.Collectors;
  31 import java.io.FileInputStream;
  32 
  33 import sun.jvm.hotspot.HotSpotAgent;
  34 import sun.jvm.hotspot.debugger.*;
  35 
  36 import jdk.test.lib.apps.LingeredApp;
  37 import jdk.test.lib.JDKToolLauncher;
  38 import jdk.test.lib.JDKToolFinder;
  39 import jdk.test.lib.Platform;
  40 import jdk.test.lib.process.ProcessTools;
  41 import jdk.test.lib.process.OutputAnalyzer;
  42 import jdk.test.lib.Utils;
  43 import jdk.test.lib.Asserts;
  44 
  45 /**
  46  * @test
  47  * @library /test/lib
  48  * @bug 8171084
  49  * @requires vm.hasSAandCanAttach & (vm.bits == "64" & os.maxMemory > 8g)
  50  * @requires vm.gc != "Shenandoah"
  51  * @modules java.base/jdk.internal.misc
  52  *          jdk.hotspot.agent/sun.jvm.hotspot
  53  *          jdk.hotspot.agent/sun.jvm.hotspot.utilities
  54  *          jdk.hotspot.agent/sun.jvm.hotspot.oops
  55  *          jdk.hotspot.agent/sun.jvm.hotspot.debugger
  56  * @run main/timeout=1800/othervm -Xmx8g TestHeapDumpForLargeArray
  57  */
  58 
  59 public class TestHeapDumpForLargeArray {
  60 
  61     private static LingeredAppWithLargeArray theApp = null;
  62 
  63     private static void attachAndDump(String heapDumpFileName,
  64                                       long lingeredAppPid) throws Exception {
  65 
  66         JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jhsdb");
  67         launcher.addToolArg("jmap");
  68         launcher.addToolArg("--binaryheap");
  69         launcher.addToolArg("--dumpfile");
  70         launcher.addToolArg(heapDumpFileName);


< prev index next >