Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: src/counters.cc

Issue 1969733002: [runtime] Refine runtime call stats for IC misses. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@classify-misses
Patch Set: Rebasing Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/counters.h ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/counters.h ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698