test/sun/tools/jhat/HatRun.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 165,206 ****
(jre_home + File.separator + "..") :
jre_home );
String cdir = System.getProperty("test.classes", ".");
String os_arch = System.getProperty("os.arch");
String os_name = System.getProperty("os.name");
- boolean d64 = os_name.equals("SunOS") && (
- os_arch.equals("sparcv9") ||
- os_arch.equals("amd64"));
- String isa_dir = d64?(File.separator+os_arch):"";
String java = jre_home
! + File.separator + "bin" + isa_dir
+ File.separator + "java";
String jhat = sdk_home + File.separator + "bin"
+ File.separator + "jhat";
/* Array of strings to be passed in for exec:
* 1. java
* 2. -Dtest.classes=.
! * 3. -d64 (optional)
! * 4. -Xcheck:jni (Just because it finds bugs)
! * 5. -Xverify:all (Make sure verification is on full blast)
! * 6. -agent
* vm_options
! * 7+i. classname
*/
int nvm_options = 0;
if ( vm_options != null ) nvm_options = vm_options.length;
! String cmd[] = new String[1 + (d64?1:0) + 7 + nvm_options];
int i,j;
i = 0;
cmd[i++] = java;
cmd[i++] = "-cp";
cmd[i++] = cdir;
cmd[i++] = "-Dtest.classes=" + cdir;
- if ( d64 ) {
- cmd[i++] = "-d64";
- }
cmd[i++] = "-Xcheck:jni";
cmd[i++] = "-Xverify:all";
dumpfile= cdir + File.separator + class_name + ".hdump";
cmd[i++] = "-agentlib:hprof=" + all_hprof_options
+ ",format=b,file=" + dumpfile;
--- 165,198 ----
(jre_home + File.separator + "..") :
jre_home );
String cdir = System.getProperty("test.classes", ".");
String os_arch = System.getProperty("os.arch");
String os_name = System.getProperty("os.name");
String java = jre_home
! + File.separator + "bin"
+ File.separator + "java";
String jhat = sdk_home + File.separator + "bin"
+ File.separator + "jhat";
/* Array of strings to be passed in for exec:
* 1. java
* 2. -Dtest.classes=.
! * 3. -Xcheck:jni (Just because it finds bugs)
! * 4. -Xverify:all (Make sure verification is on full blast)
! * 5. -agent
* vm_options
! * 6+i. classname
*/
int nvm_options = 0;
if ( vm_options != null ) nvm_options = vm_options.length;
! String cmd[] = new String[1 + 7 + nvm_options];
int i,j;
i = 0;
cmd[i++] = java;
cmd[i++] = "-cp";
cmd[i++] = cdir;
cmd[i++] = "-Dtest.classes=" + cdir;
cmd[i++] = "-Xcheck:jni";
cmd[i++] = "-Xverify:all";
dumpfile= cdir + File.separator + class_name + ".hdump";
cmd[i++] = "-agentlib:hprof=" + all_hprof_options
+ ",format=b,file=" + dumpfile;