Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index f0ad02da40c19664ed4634a07731061a8d75632e..ece024cdbcf90fa14a91715c2cb86da7dba858e1 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1786,7 +1786,8 @@ Isolate::Isolate() |
optimizing_compiler_thread_(this), |
marking_thread_(NULL), |
sweeper_thread_(NULL), |
- callback_table_(NULL) { |
+ callback_table_(NULL), |
+ stress_deopt_count_(0) { |
id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1); |
TRACE_ISOLATE(constructor); |
@@ -1898,6 +1899,10 @@ void Isolate::Deinit() { |
if (FLAG_hydrogen_stats) GetHStatistics()->Print(); |
+ if (FLAG_print_deopt_stress) { |
+ PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_); |
+ } |
+ |
// We must stop the logger before we tear down other components. |
Sampler* sampler = logger_->sampler(); |
if (sampler && sampler->IsActive()) sampler->Stop(); |
@@ -2132,6 +2137,8 @@ bool Isolate::Init(Deserializer* des) { |
ASSERT(Isolate::Current() == this); |
TRACE_ISOLATE(init); |
+ stress_deopt_count_ = FLAG_deopt_every_n_times; |
+ |
if (function_entry_hook() != NULL) { |
// When function entry hooking is in effect, we have to create the code |
// stubs from scratch to get entry hooks, rather than loading the previously |