Chromium Code Reviews| Index: src/v8.cc |
| diff --git a/src/v8.cc b/src/v8.cc |
| index a415f26197b7f5cf9d001823c39021bef4d7703c..8e19638a1b1e1ced2e09d3e5f636dc2db0cb1c6e 100644 |
| --- a/src/v8.cc |
| +++ b/src/v8.cc |
| @@ -51,6 +51,13 @@ |
| namespace v8 { |
| namespace internal { |
| +static void empty_log_internal_events(const char* name, int se) { return; } |
|
Yang
2014/03/06 12:05:33
I think we can remove that return statement too. j
fmeawad
2014/03/06 19:23:04
Done.
|
| + |
| +static void log_internal_events(const char* name, int se) { |
| + Isolate* isolate = Isolate::Current(); |
| + LOG(isolate, Logger::TimerEvent(static_cast<Logger::StartEnd>(se), name)); |
| +} |
| + |
| V8_DECLARE_ONCE(init_once); |
| List<CallCompletedCallback>* V8::call_completed_callbacks_ = NULL; |
| @@ -79,6 +86,12 @@ bool V8::Initialize(Deserializer* des) { |
| if (isolate->IsDead()) return false; |
| if (isolate->IsInitialized()) return true; |
| + if (!isolate->event_logger() && FLAG_log_internal_timer_events) { |
| + isolate->set_event_logger(log_internal_events); |
| + } else { |
| + isolate->set_event_logger(empty_log_internal_events); |
| + } |
|
Yang
2014/03/06 12:05:33
I think this should be put into Isolate::Init. And
fmeawad
2014/03/06 19:23:04
Done.
|
| + |
| #ifdef V8_USE_DEFAULT_PLATFORM |
| DefaultPlatform* platform = static_cast<DefaultPlatform*>(platform_); |
| platform->SetThreadPoolSize(isolate->max_available_threads()); |