Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index ef980dc2b9ea26ee2482ba40c078d2e594b0acc0..162b9043acbf15fe64867f67ade5110afa390d7d 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1931,6 +1931,10 @@ bool Isolate::Init(Deserializer* des) { |
optimizing_compiler_thread_->Start(); |
} |
+ // Initialize runtime profiler before deserialization, because collections may |
+ // occur, clearing/updating ICs. |
+ runtime_profiler_ = new RuntimeProfiler(this); |
+ |
// If we are deserializing, read the state into the now-empty heap. |
if (!create_heap_objects) { |
des->Deserialize(this); |
@@ -1949,8 +1953,6 @@ bool Isolate::Init(Deserializer* des) { |
// Quiet the heap NaN if needed on target platform. |
if (!create_heap_objects) Assembler::QuietNaN(heap_.nan_value()); |
- runtime_profiler_ = new RuntimeProfiler(this); |
- |
if (FLAG_trace_turbo) { |
// Erase the file. |
char buffer[512]; |
@@ -1960,7 +1962,6 @@ bool Isolate::Init(Deserializer* des) { |
std::fstream::out | std::fstream::trunc); |
} |
- |
// If we are deserializing, log non-function code objects and compiled |
// functions found in the snapshot. |
if (!create_heap_objects && |