test/gc/metaspace/ClassMetaspaceSizeInJmapHeap.java

Print this page
rev 4235 : 8009408: gc/metaspace/ClassMetaspaceSizeInJmapHeap.java fails with "exit code 1"

@@ -37,12 +37,13 @@
 
 public class ClassMetaspaceSizeInJmapHeap {
     public static void main(String[] args) throws Exception {
         String pid = Integer.toString(ProcessTools.getProcessId());
 
+        String arch = System.getProperty("sun.arch.data.model");
         ProcessBuilder pb = new ProcessBuilder();
-        pb.command(JDKToolFinder.getJDKTool("jmap"), "-heap",  pid);
+        pb.command(JDKToolFinder.getJDKTool("jmap"), "-J-d" + arch, "-heap", pid);
 
         File out = new File("ClassMetaspaceSizeInJmapHeap.stdout.txt");
         pb.redirectOutput(out);
 
         File err = new File("ClassMetaspaceSizeInJmapHeap.stderr.txt");