OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2009 if (create_heap_objects) { | 2009 if (create_heap_objects) { |
2010 // Terminate the cache array with the sentinel so we can iterate. | 2010 // Terminate the cache array with the sentinel so we can iterate. |
2011 PushToPartialSnapshotCache(heap_.undefined_value()); | 2011 PushToPartialSnapshotCache(heap_.undefined_value()); |
2012 } | 2012 } |
2013 | 2013 |
2014 InitializeThreadLocal(); | 2014 InitializeThreadLocal(); |
2015 | 2015 |
2016 bootstrapper_->Initialize(create_heap_objects); | 2016 bootstrapper_->Initialize(create_heap_objects); |
2017 builtins_.SetUp(this, create_heap_objects); | 2017 builtins_.SetUp(this, create_heap_objects); |
2018 | 2018 |
2019 if (!event_logger_ && FLAG_log_internal_timer_events) { | |
Yang
2014/03/07 08:48:42
I don't think we need to check for !event_logger_.
| |
2020 set_event_logger(Logger::LogInternalEvents); | |
2021 } else { | |
2022 set_event_logger(Logger::EmptyLogInternalEvents); | |
2023 } | |
2024 | |
2019 // Set default value if not yet set. | 2025 // Set default value if not yet set. |
2020 // TODO(yangguo): move this to ResourceConstraints::ConfigureDefaults | 2026 // TODO(yangguo): move this to ResourceConstraints::ConfigureDefaults |
2021 // once ResourceConstraints becomes an argument to the Isolate constructor. | 2027 // once ResourceConstraints becomes an argument to the Isolate constructor. |
2022 if (max_available_threads_ < 1) { | 2028 if (max_available_threads_ < 1) { |
2023 // Choose the default between 1 and 4. | 2029 // Choose the default between 1 and 4. |
2024 max_available_threads_ = Max(Min(CPU::NumberOfProcessorsOnline(), 4), 1); | 2030 max_available_threads_ = Max(Min(CPU::NumberOfProcessorsOnline(), 4), 1); |
2025 } | 2031 } |
2026 | 2032 |
2027 if (!FLAG_job_based_sweeping) { | 2033 if (!FLAG_job_based_sweeping) { |
2028 num_sweeper_threads_ = | 2034 num_sweeper_threads_ = |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2323 | 2329 |
2324 #ifdef DEBUG | 2330 #ifdef DEBUG |
2325 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2331 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
2326 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2332 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
2327 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2333 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
2328 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2334 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
2329 #undef ISOLATE_FIELD_OFFSET | 2335 #undef ISOLATE_FIELD_OFFSET |
2330 #endif | 2336 #endif |
2331 | 2337 |
2332 } } // namespace v8::internal | 2338 } } // namespace v8::internal |
OLD | NEW |