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

Unified Diff: src/counters.cc

Issue 1923893002: [counters] Annotate v8 with more runtime call counters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merging master 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/deoptimizer.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 197a2ee143173bc8f6039db4bc68fa668a936c26..0dd62a0c5b96d9fd0009b9b83f49b6b4cad93216 100644
--- a/src/counters.cc
+++ b/src/counters.cc
@@ -312,6 +312,10 @@ void RuntimeCallStats::Print(std::ostream& os) {
BUILTIN_LIST_C(PRINT_COUNTER)
#undef PRINT_COUNTER
+#define PRINT_COUNTER(name) entries.Add(&this->API_##name);
+ FOR_EACH_API_COUNTER(PRINT_COUNTER)
+#undef PRINT_COUNTER
+
#define PRINT_COUNTER(name) entries.Add(&this->Handler_##name);
FOR_EACH_HANDLER_COUNTER(PRINT_COUNTER)
#undef PRINT_COUNTER
@@ -321,15 +325,25 @@ void RuntimeCallStats::Print(std::ostream& os) {
void RuntimeCallStats::Reset() {
if (!FLAG_runtime_call_stats) return;
-#define RESET_COUNTER(name, nargs, ressize) this->Runtime_##name.Reset();
+#define RESET_COUNTER(name) this->name.Reset();
+ FOR_EACH_MANUAL_COUNTER(RESET_COUNTER)
+#undef RESET_COUNTER
+
+#define RESET_COUNTER(name, nargs, result_size) 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();
+
+#define RESET_COUNTER(name) this->API_##name.Reset();
+ FOR_EACH_API_COUNTER(RESET_COUNTER)
+#undef RESET_COUNTER
+
+#define RESET_COUNTER(name) this->Handler_##name.Reset();
+ FOR_EACH_HANDLER_COUNTER(RESET_COUNTER)
+#undef RESET_COUNTER
}
} // namespace internal
« no previous file with comments | « src/counters.h ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698