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

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

Issue 1031383002: Add %_IncrementStatsCounter intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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.h ('k') | test/cctest/compiler/test-run-intrinsics.cc » ('j') | 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 0f807be5b8008214a84354592f99128d4fb01ed7..973c204435f7ca24fa17541c1ab6e8219f6eaacb 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -318,5 +318,17 @@ RUNTIME_FUNCTION(Runtime_GetFromCache) {
args[0] = isolate->native_context()->jsfunction_result_caches()->get(id);
return __RT_impl_Runtime_GetFromCacheRT(args, isolate);
}
+
+
+RUNTIME_FUNCTION(Runtime_IncrementStatsCounter) {
+ SealHandleScope shs(isolate);
+ DCHECK(args.length() == 1);
+ CONVERT_ARG_CHECKED(String, name, 0);
+
+ if (FLAG_native_code_counters) {
+ StatsCounter(isolate, name->ToCString().get()).Increment();
+ }
+ return isolate->heap()->undefined_value();
+}
}
} // namespace v8::internal
« no previous file with comments | « src/runtime/runtime.h ('k') | test/cctest/compiler/test-run-intrinsics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698