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

Unified Diff: src/runtime/runtime-internal.cc

Issue 1615943002: Runtime call counters and timers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 4 years, 11 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/runtime/runtime.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index ba20aa392ebe2ad6ba6b48c4beb6af56949e5143..e0783265f0ec9c6113fa7b15bbf15fefa4598f8a 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -477,5 +477,17 @@ RUNTIME_FUNCTION(Runtime_IncrementUseCounter) {
return isolate->heap()->undefined_value();
}
+
+RUNTIME_FUNCTION(Runtime_GetAndResetRuntimeCallStats) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(0, args.length());
+ std::stringstream stats_stream;
+ isolate->runtime_state()->runtime_call_stats()->Print(stats_stream);
+ Handle<String> result =
+ isolate->factory()->NewStringFromAsciiChecked(stats_stream.str().c_str());
+ isolate->runtime_state()->runtime_call_stats()->Reset();
+ return *result;
+}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/runtime/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698