Reviewers: fschneider,
Message:
Could you please take a look?
This allows to reproduce in d8 performance regressions related to
http://code.google.com/p/v8/issues/detail?id=1902
I am reusing the "--stress_runs" flag, but I don't mind adding a special
flag
for this feature.
Description:
Allow d8 to run a script multiple times, each time with a new context.
BUG=
TEST=
Please review this at https://chromiumcodereview.appspot.com/9310001/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/d8.cc
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index
e555c154847c81ef8ec62aa8717d81ac89759a7e..31beaf91fe03c9390978f1693ab20fb60e8059c7
100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1485,6 +1485,12 @@ int Shell::Main(int argc, char* argv[]) {
}
printf("======== Full Deoptimization =======\n");
Testing::DeoptimizeAll();
+ } else if (i::FLAG_stress_runs > 0) {
+ int stress_runs = i::FLAG_stress_runs;
+ for (int i = 0; i < stress_runs && result == 0; i++) {
+ printf("============ Run %d/%d ============\n", i + 1, stress_runs);
+ result = RunMain(argc, argv);
+ }
} else {
result = RunMain(argc, argv);
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev