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; \ |
} \ |
\ |