R=mstarzinger@chromium.org
Review URL: https://chromiumcodereview.appspot.com/
14091013
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14395
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
DEFINE_int(deopt_every_n_times,
0,
"deoptimize every n times a deopt point is passed")
+DEFINE_int(deopt_every_n_garbage_collections,
+ 0,
+ "deoptimize every n garbage collections")
DEFINE_bool(trap_on_deopt, false, "put a break point before deoptimizing")
DEFINE_bool(deoptimize_uncommon_cases, true, "deoptimize uncommon cases")
DEFINE_bool(polymorphic_inlining, true, "polymorphic inlining")
ms_count_at_last_idle_notification_(0),
gc_count_at_last_idle_gc_(0),
scavenges_since_last_idle_round_(kIdleScavengeThreshold),
+ gcs_since_last_deopt_(0),
#ifdef VERIFY_HEAP
no_weak_embedded_maps_verification_scope_depth_(0),
#endif
if (FLAG_gc_verbose) Print();
if (FLAG_code_stats) ReportCodeStatistics("After GC");
#endif
+ if (FLAG_deopt_every_n_garbage_collections > 0) {
+ if (++gcs_since_last_deopt_ == FLAG_deopt_every_n_garbage_collections) {
+ Deoptimizer::DeoptimizeAll(isolate());
+ gcs_since_last_deopt_ = 0;
+ }
+ }
isolate_->counters()->alive_after_last_gc()->Set(
static_cast<int>(SizeOfObjects()));
unsigned int gc_count_at_last_idle_gc_;
int scavenges_since_last_idle_round_;
+ // If the --deopt_every_n_garbage_collections flag is set to a positive value,
+ // this variable holds the number of garbage collections since the last
+ // deoptimization triggered by garbage collection.
+ int gcs_since_last_deopt_;
+
#ifdef VERIFY_HEAP
int no_weak_embedded_maps_verification_scope_depth_;
#endif