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

Unified Diff: src/builtins.cc

Issue 1695733002: [counters] Making counter properly reentrant. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2016-02-09_recursive_counters_1681943002
Patch Set: fixing comment Created 4 years, 10 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/arguments.h ('k') | src/counters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index f906b50aa8b037b9ec6215487fbc290938417209..b16aa783d5bb675e0a907eff87fee3297d534ff2 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -143,17 +143,10 @@ BUILTIN_LIST_C(DEF_ARG_TYPE)
MUST_USE_RESULT static Object* Builtin_##name( \
int args_length, Object** args_object, Isolate* isolate) { \
isolate->counters()->runtime_calls()->Increment(); \
- base::ElapsedTimer timer; \
- if (FLAG_runtime_call_stats) { \
- RuntimeCallStats* stats = isolate->counters()->runtime_call_stats(); \
- stats->Enter(&stats->Builtin_##name); \
- timer.Start(); \
- } \
+ RuntimeCallStats* stats = isolate->counters()->runtime_call_stats(); \
+ RuntimeCallTimerScope timer(isolate, &stats->Builtin_##name); \
name##ArgumentsType args(args_length, args_object); \
Object* value = Builtin_Impl_##name(args, isolate); \
- if (FLAG_runtime_call_stats) { \
- isolate->counters()->runtime_call_stats()->Leave(timer.Elapsed()); \
- } \
return value; \
} \
\
« no previous file with comments | « src/arguments.h ('k') | src/counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698