Index: src/counters.cc |
diff --git a/src/counters.cc b/src/counters.cc |
index 3b67c48e94bc83c3b4a2c6fc1f4c112ee82273ea..908cbfdd1342aea5b424f01bd76d62bb216f2d7f 100644 |
--- a/src/counters.cc |
+++ b/src/counters.cc |
@@ -288,6 +288,15 @@ void RuntimeCallStats::Leave(Isolate* isolate, RuntimeCallTimer* timer) { |
stats->current_timer_ = timer->Stop(); |
} |
+// static |
+void RuntimeCallStats::CorrectCurrentCounterId(Isolate* isolate, |
+ CounterId counter_id) { |
+ RuntimeCallStats* stats = isolate->counters()->runtime_call_stats(); |
+ DCHECK_NOT_NULL(stats->current_timer_); |
+ RuntimeCallCounter* counter = &(stats->*counter_id); |
+ stats->current_timer_->counter_ = counter; |
+} |
+ |
void RuntimeCallStats::Print(std::ostream& os) { |
RuntimeCallStatEntries entries; |
@@ -299,6 +308,10 @@ void RuntimeCallStats::Print(std::ostream& os) { |
BUILTIN_LIST_C(PRINT_COUNTER) |
#undef PRINT_COUNTER |
+#define PRINT_COUNTER(name) entries.Add(&this->Handler_##name); |
+ FOR_EACH_HANDLER_COUNTER(PRINT_COUNTER) |
+#undef PRINT_COUNTER |
+ |
entries.Add(&this->ExternalCallback); |
entries.Add(&this->GC); |
entries.Add(&this->UnexpectedStubMiss); |