changeset 36:b5caaed49020

The command line option for controlling deoptimization stride.
author shade
date Fri, 02 Aug 2013 02:52:05 +0400
parents 7a152ea0e16a
children fe25a061722e
files harness/src/main/java/org/openjdk/jcstress/Options.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/harness/src/main/java/org/openjdk/jcstress/Options.java	Fri Aug 02 02:29:33 2013 +0400
+++ b/harness/src/main/java/org/openjdk/jcstress/Options.java	Fri Aug 02 02:52:05 2013 +0400
@@ -69,6 +69,7 @@
     private boolean forceYield;
     private boolean userYield;
     private String resultFile;
+    private int deoptEachIter;
 
     public Options(String[] args) {
         this.args = args;
@@ -125,6 +126,9 @@
         OptionSpec<Integer> hostPort = parser.accepts("hostPort", "(internal) Host VM port")
                 .withRequiredArg().ofType(Integer.class);
 
+        OptionSpec<Integer> deoptStride = parser.accepts("deoptStride", "Deoptimize every N-th iteration")
+                .withRequiredArg().ofType(Integer.class);
+
         parser.accepts("v", "Be extra verbose.");
         parser.accepts("h", "Print this help.");
 
@@ -153,6 +157,7 @@
         this.time = orDefault(set.valueOf(time), 1000);
         this.iters = orDefault(set.valueOf(iters), 5);
         this.testFilter = orDefault(set.valueOf(testFilter), ".*");
+        this.deoptEachIter = orDefault(set.valueOf(deoptStride), 5);
 
         this.forks = orDefault(set.valueOf(forks), 1);
         this.parse = orDefault(set.has(parse), false);
@@ -301,7 +306,7 @@
     }
 
     public int getDeoptEachIter() {
-        return 5;
+        return deoptEachIter;
     }
 
     public static class BurningTask implements Runnable {