OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/builtins.h" | 5 #include "src/builtins.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 // through the BuiltinArguments object args. | 138 // through the BuiltinArguments object args. |
139 | 139 |
140 #define BUILTIN(name) \ | 140 #define BUILTIN(name) \ |
141 MUST_USE_RESULT static Object* Builtin_Impl_##name(name##ArgumentsType args, \ | 141 MUST_USE_RESULT static Object* Builtin_Impl_##name(name##ArgumentsType args, \ |
142 Isolate* isolate); \ | 142 Isolate* isolate); \ |
143 MUST_USE_RESULT static Object* Builtin_##name( \ | 143 MUST_USE_RESULT static Object* Builtin_##name( \ |
144 int args_length, Object** args_object, Isolate* isolate) { \ | 144 int args_length, Object** args_object, Isolate* isolate) { \ |
145 isolate->counters()->runtime_calls()->Increment(); \ | 145 isolate->counters()->runtime_calls()->Increment(); \ |
146 RuntimeCallStats* stats = isolate->counters()->runtime_call_stats(); \ | 146 RuntimeCallStats* stats = isolate->counters()->runtime_call_stats(); \ |
147 RuntimeCallTimerScope timer(isolate, &stats->Builtin_##name); \ | 147 RuntimeCallTimerScope timer(isolate, &stats->Builtin_##name); \ |
| 148 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.runtime"), \ |
| 149 "V8.Builtin_" #name); \ |
148 name##ArgumentsType args(args_length, args_object); \ | 150 name##ArgumentsType args(args_length, args_object); \ |
149 Object* value = Builtin_Impl_##name(args, isolate); \ | 151 Object* value = Builtin_Impl_##name(args, isolate); \ |
150 return value; \ | 152 return value; \ |
151 } \ | 153 } \ |
152 \ | 154 \ |
153 MUST_USE_RESULT static Object* Builtin_Impl_##name(name##ArgumentsType args, \ | 155 MUST_USE_RESULT static Object* Builtin_Impl_##name(name##ArgumentsType args, \ |
154 Isolate* isolate) | 156 Isolate* isolate) |
155 | 157 |
156 // ---------------------------------------------------------------------------- | 158 // ---------------------------------------------------------------------------- |
157 | 159 |
(...skipping 4378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4536 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 4538 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
4537 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 4539 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
4538 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 4540 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
4539 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 4541 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
4540 #undef DEFINE_BUILTIN_ACCESSOR_C | 4542 #undef DEFINE_BUILTIN_ACCESSOR_C |
4541 #undef DEFINE_BUILTIN_ACCESSOR_A | 4543 #undef DEFINE_BUILTIN_ACCESSOR_A |
4542 | 4544 |
4543 | 4545 |
4544 } // namespace internal | 4546 } // namespace internal |
4545 } // namespace v8 | 4547 } // namespace v8 |
OLD | NEW |