8022203: Intermittent test failures in demo/jvmti/hprof
Summary: Added "file" options to separate hprof dump output
Reviewed-by: sla
Contributed-by: Sergei Kovalev <sergei.kovalev@oracle.com>
--- a/jdk/test/demo/jvmti/hprof/CpuOldTest.java Thu Feb 20 09:57:26 2014 -0800
+++ b/jdk/test/demo/jvmti/hprof/CpuOldTest.java Thu Feb 20 23:16:47 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -37,7 +37,7 @@
DemoRun hprof;
/* Run JVMTI hprof agent with cpu=old */
- hprof = new DemoRun("hprof", "cpu=old");
+ hprof = new DemoRun("hprof", "cpu=old,file=cpuold.txt");
hprof.runit(args[0]);
/* Make sure patterns in output look ok */
--- a/jdk/test/demo/jvmti/hprof/CpuSamplesTest.java Thu Feb 20 09:57:26 2014 -0800
+++ b/jdk/test/demo/jvmti/hprof/CpuSamplesTest.java Thu Feb 20 23:16:47 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -37,7 +37,7 @@
DemoRun hprof;
/* Run JVMTI hprof agent with cpu=samples */
- hprof = new DemoRun("hprof", "cpu=samples");
+ hprof = new DemoRun("hprof", "cpu=samples,file=cpusamples.txt");
hprof.runit(args[0]);
/* Make sure patterns in output look ok */
--- a/jdk/test/demo/jvmti/hprof/CpuTimesDefineClassTest.java Thu Feb 20 09:57:26 2014 -0800
+++ b/jdk/test/demo/jvmti/hprof/CpuTimesDefineClassTest.java Thu Feb 20 23:16:47 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -39,7 +39,7 @@
DemoRun hprof;
/* Run JVMTI hprof agent with cpu=times */
- hprof = new DemoRun("hprof", "cpu=times");
+ hprof = new DemoRun("hprof", "cpu=times,file=cputimedefineclass.txt");
hprof.runit(args[0]);
/* Make sure patterns in output look ok */
--- a/jdk/test/demo/jvmti/hprof/CpuTimesTest.java Thu Feb 20 09:57:26 2014 -0800
+++ b/jdk/test/demo/jvmti/hprof/CpuTimesTest.java Thu Feb 20 23:16:47 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -37,7 +37,7 @@
DemoRun hprof;
/* Run JVMTI hprof agent with cpu=times */
- hprof = new DemoRun("hprof", "cpu=times");
+ hprof = new DemoRun("hprof", "cpu=times,file=cputimes.txt");
hprof.runit(args[0]);
/* Make sure patterns in output look ok */
--- a/jdk/test/demo/jvmti/hprof/HeapAllTest.java Thu Feb 20 09:57:26 2014 -0800
+++ b/jdk/test/demo/jvmti/hprof/HeapAllTest.java Thu Feb 20 23:16:47 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -37,7 +37,7 @@
DemoRun hprof;
/* Run JVMTI hprof agent with heap=all */
- hprof = new DemoRun("hprof", "heap=all");
+ hprof = new DemoRun("hprof", "heap=all,file=heapall.txt");
hprof.runit(args[0]);
/* Make sure patterns in output look ok */
--- a/jdk/test/demo/jvmti/hprof/HeapBinaryFormatTest.java Thu Feb 20 09:57:26 2014 -0800
+++ b/jdk/test/demo/jvmti/hprof/HeapBinaryFormatTest.java Thu Feb 20 23:16:47 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -37,7 +37,7 @@
DemoRun hprof;
/* Run JVMTI hprof agent to get binary format dump */
- hprof = new DemoRun("hprof", "heap=dump,format=b,logflags=4");
+ hprof = new DemoRun("hprof", "heap=dump,format=b,logflags=4,file=heapbinaryformat.txt");
hprof.runit(args[0]);
/* Make sure patterns in output look ok */
--- a/jdk/test/demo/jvmti/hprof/HeapDumpTest.java Thu Feb 20 09:57:26 2014 -0800
+++ b/jdk/test/demo/jvmti/hprof/HeapDumpTest.java Thu Feb 20 23:16:47 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -37,7 +37,7 @@
DemoRun hprof;
/* Run JVMTI hprof agent with heap=dump */
- hprof = new DemoRun("hprof", "heap=dump");
+ hprof = new DemoRun("hprof", "heap=dump,file=heapdump.txt");
hprof.runit(args[0]);
/* Make sure patterns in output look ok */
--- a/jdk/test/demo/jvmti/hprof/HeapSitesTest.java Thu Feb 20 09:57:26 2014 -0800
+++ b/jdk/test/demo/jvmti/hprof/HeapSitesTest.java Thu Feb 20 23:16:47 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -37,7 +37,7 @@
DemoRun hprof;
/* Run JVMTI hprof agent with heap=sites */
- hprof = new DemoRun("hprof", "heap=sites");
+ hprof = new DemoRun("hprof", "heap=sites,file=heapsites.txt");
hprof.runit(args[0]);
/* Make sure patterns in output look ok */
--- a/jdk/test/demo/jvmti/hprof/MonitorTest.java Thu Feb 20 09:57:26 2014 -0800
+++ b/jdk/test/demo/jvmti/hprof/MonitorTest.java Thu Feb 20 23:16:47 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -42,7 +42,7 @@
DemoRun hprof;
/* Run JVMTI hprof agent with monitor=y */
- hprof = new DemoRun("hprof", "monitor=y");
+ hprof = new DemoRun("hprof", "monitor=y,file=monitor.txt");
hprof.runit(args[0]);
/* Make sure patterns in output look ok */
--- a/jdk/test/demo/jvmti/hprof/OptionsTest.java Thu Feb 20 09:57:26 2014 -0800
+++ b/jdk/test/demo/jvmti/hprof/OptionsTest.java Thu Feb 20 23:16:47 2014 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, 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
@@ -39,10 +39,10 @@
DemoRun hprof;
List<String> options = new LinkedList<String>();
- options.add("cpu=samples,depth=0");
- options.add("cpu=times,depth=0");
- options.add("cpu=old,depth=0");
- options.add("depth=0");
+ options.add("cpu=samples,depth=0,file=options0.txt");
+ options.add("cpu=times,depth=0,file=options1.txt");
+ options.add("cpu=old,depth=0,file=options2.txt");
+ options.add("depth=0,file=options3.txt");
for(String option: options) {
/* Run JVMTI hprof agent with various options */
--- a/jdk/test/demo/jvmti/hprof/StackMapTableTest.java Thu Feb 20 09:57:26 2014 -0800
+++ b/jdk/test/demo/jvmti/hprof/StackMapTableTest.java Thu Feb 20 23:16:47 2014 +0400
@@ -40,10 +40,10 @@
DemoRun hprof;
List<String> options = new LinkedList<String>();
- options.add("cpu=samples");
- options.add("cpu=times");
- options.add("heap=sites");
- options.add("");
+ options.add("cpu=samples,file=stackmaptable0.txt");
+ options.add("cpu=times,file=stackmaptable1.txt");
+ options.add("heap=sites,file=stackmaptable2.txt");
+ options.add("file=stackmaptable3.txt");
for(String option: options) {
/* Run JVMTI hprof agent with various options */