Upgrade V8 to 5.1.281.57 DO NOT MERGE
FPIIM-449
Change-Id: Id981b686b4d587ac31697662eb98bb34be42ad90
(cherry picked from commit 3b9bc31999c9787eb726ecdbfd5796bfdec32a18)
diff --git a/src/counters.cc b/src/counters.cc
index a10494e..4f5c251 100644
--- a/src/counters.cc
+++ b/src/counters.cc
@@ -273,7 +273,9 @@
}
void RuntimeCallStats::Enter(RuntimeCallCounter* counter) {
- Enter(new RuntimeCallTimer(counter, current_timer_));
+ RuntimeCallTimer* timer = new RuntimeCallTimer();
+ timer->Initialize(counter, current_timer_);
+ Enter(timer);
}
void RuntimeCallStats::Enter(RuntimeCallTimer* timer_) {
@@ -303,31 +305,34 @@
#undef PRINT_COUNTER
entries.Add(&this->ExternalCallback);
+ entries.Add(&this->GC);
entries.Add(&this->UnexpectedStubMiss);
entries.Print(os);
}
void RuntimeCallStats::Reset() {
+ if (!FLAG_runtime_call_stats) return;
#define RESET_COUNTER(name, nargs, ressize) this->Runtime_##name.Reset();
FOR_EACH_INTRINSIC(RESET_COUNTER)
#undef RESET_COUNTER
#define RESET_COUNTER(name, type) this->Builtin_##name.Reset();
BUILTIN_LIST_C(RESET_COUNTER)
#undef RESET_COUNTER
+ this->ExternalCallback.Reset();
+ this->GC.Reset();
+ this->UnexpectedStubMiss.Reset();
}
-RuntimeCallTimerScope::RuntimeCallTimerScope(Isolate* isolate,
- RuntimeCallCounter* counter)
- : isolate_(isolate),
- timer_(counter,
- isolate->counters()->runtime_call_stats()->current_timer()) {
- if (!FLAG_runtime_call_stats) return;
- isolate->counters()->runtime_call_stats()->Enter(&timer_);
+void RuntimeCallTimerScope::Enter(Isolate* isolate,
+ RuntimeCallCounter* counter) {
+ isolate_ = isolate;
+ RuntimeCallStats* stats = isolate->counters()->runtime_call_stats();
+ timer_.Initialize(counter, stats->current_timer());
+ stats->Enter(&timer_);
}
-RuntimeCallTimerScope::~RuntimeCallTimerScope() {
- if (!FLAG_runtime_call_stats) return;
+void RuntimeCallTimerScope::Leave() {
isolate_->counters()->runtime_call_stats()->Leave(&timer_);
}