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

Side by Side Diff: src/isolate.cc

Issue 2278653003: Reland of "[heap] Switch to 500k pages" (Closed)
Patch Set: Rebase Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/heap/spaces.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 2391 matching lines...) Expand 10 before | Expand all | Expand 10 after
2402 PrintF("Concurrent recompilation has been disabled for tracing.\n"); 2402 PrintF("Concurrent recompilation has been disabled for tracing.\n");
2403 } else if (OptimizingCompileDispatcher::Enabled()) { 2403 } else if (OptimizingCompileDispatcher::Enabled()) {
2404 optimizing_compile_dispatcher_ = new OptimizingCompileDispatcher(this); 2404 optimizing_compile_dispatcher_ = new OptimizingCompileDispatcher(this);
2405 } 2405 }
2406 2406
2407 // Initialize runtime profiler before deserialization, because collections may 2407 // Initialize runtime profiler before deserialization, because collections may
2408 // occur, clearing/updating ICs. 2408 // occur, clearing/updating ICs.
2409 runtime_profiler_ = new RuntimeProfiler(this); 2409 runtime_profiler_ = new RuntimeProfiler(this);
2410 2410
2411 // If we are deserializing, read the state into the now-empty heap. 2411 // If we are deserializing, read the state into the now-empty heap.
2412 if (!create_heap_objects) { 2412 {
2413 des->Deserialize(this); 2413 AlwaysAllocateScope always_allocate(this);
2414 } 2414
2415 load_stub_cache_->Initialize(); 2415 if (!create_heap_objects) {
2416 store_stub_cache_->Initialize(); 2416 des->Deserialize(this);
2417 if (FLAG_ignition || serializer_enabled()) { 2417 }
2418 interpreter_->Initialize(); 2418 load_stub_cache_->Initialize();
2419 store_stub_cache_->Initialize();
2420 if (FLAG_ignition || serializer_enabled()) {
2421 interpreter_->Initialize();
2422 }
2423
2424 heap_.NotifyDeserializationComplete();
2419 } 2425 }
2420 2426
2421 // Finish initialization of ThreadLocal after deserialization is done. 2427 // Finish initialization of ThreadLocal after deserialization is done.
2422 clear_pending_exception(); 2428 clear_pending_exception();
2423 clear_pending_message(); 2429 clear_pending_message();
2424 clear_scheduled_exception(); 2430 clear_scheduled_exception();
2425 2431
2426 // Deserializing may put strange things in the root array's copy of the 2432 // Deserializing may put strange things in the root array's copy of the
2427 // stack guard. 2433 // stack guard.
2428 heap_.SetStackLimits(); 2434 heap_.SetStackLimits();
(...skipping 10 matching lines...) Expand all
2439 Internals::kIsolateEmbedderDataOffset); 2445 Internals::kIsolateEmbedderDataOffset);
2440 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)), 2446 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)),
2441 Internals::kIsolateRootsOffset); 2447 Internals::kIsolateRootsOffset);
2442 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.external_memory_)), 2448 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.external_memory_)),
2443 Internals::kExternalMemoryOffset); 2449 Internals::kExternalMemoryOffset);
2444 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.external_memory_limit_)), 2450 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.external_memory_limit_)),
2445 Internals::kExternalMemoryLimitOffset); 2451 Internals::kExternalMemoryLimitOffset);
2446 2452
2447 time_millis_at_init_ = heap_.MonotonicallyIncreasingTimeInMs(); 2453 time_millis_at_init_ = heap_.MonotonicallyIncreasingTimeInMs();
2448 2454
2449 heap_.NotifyDeserializationComplete();
2450
2451 if (!create_heap_objects) { 2455 if (!create_heap_objects) {
2452 // Now that the heap is consistent, it's OK to generate the code for the 2456 // Now that the heap is consistent, it's OK to generate the code for the
2453 // deopt entry table that might have been referred to by optimized code in 2457 // deopt entry table that might have been referred to by optimized code in
2454 // the snapshot. 2458 // the snapshot.
2455 HandleScope scope(this); 2459 HandleScope scope(this);
2456 Deoptimizer::EnsureCodeForDeoptimizationEntry( 2460 Deoptimizer::EnsureCodeForDeoptimizationEntry(
2457 this, Deoptimizer::LAZY, 2461 this, Deoptimizer::LAZY,
2458 ExternalReferenceTable::kDeoptTableSerializeEntryCount - 1); 2462 ExternalReferenceTable::kDeoptTableSerializeEntryCount - 1);
2459 } 2463 }
2460 2464
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
3175 // Then check whether this scope intercepts. 3179 // Then check whether this scope intercepts.
3176 if ((flag & intercept_mask_)) { 3180 if ((flag & intercept_mask_)) {
3177 intercepted_flags_ |= flag; 3181 intercepted_flags_ |= flag;
3178 return true; 3182 return true;
3179 } 3183 }
3180 return false; 3184 return false;
3181 } 3185 }
3182 3186
3183 } // namespace internal 3187 } // namespace internal
3184 } // namespace v8 3188 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698