| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1924 Max(Min(base::SysInfo::NumberOfProcessors(), 4), 1); | 1924 Max(Min(base::SysInfo::NumberOfProcessors(), 4), 1); |
| 1925 } | 1925 } |
| 1926 | 1926 |
| 1927 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { | 1927 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { |
| 1928 PrintF("Concurrent recompilation has been disabled for tracing.\n"); | 1928 PrintF("Concurrent recompilation has been disabled for tracing.\n"); |
| 1929 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) { | 1929 } else if (OptimizingCompilerThread::Enabled(max_available_threads_)) { |
| 1930 optimizing_compiler_thread_ = new OptimizingCompilerThread(this); | 1930 optimizing_compiler_thread_ = new OptimizingCompilerThread(this); |
| 1931 optimizing_compiler_thread_->Start(); | 1931 optimizing_compiler_thread_->Start(); |
| 1932 } | 1932 } |
| 1933 | 1933 |
| 1934 // Initialize runtime profiler before deserialization, because collections may |
| 1935 // occur, clearing/updating ICs. |
| 1936 runtime_profiler_ = new RuntimeProfiler(this); |
| 1937 |
| 1934 // If we are deserializing, read the state into the now-empty heap. | 1938 // If we are deserializing, read the state into the now-empty heap. |
| 1935 if (!create_heap_objects) { | 1939 if (!create_heap_objects) { |
| 1936 des->Deserialize(this); | 1940 des->Deserialize(this); |
| 1937 } | 1941 } |
| 1938 stub_cache_->Initialize(); | 1942 stub_cache_->Initialize(); |
| 1939 | 1943 |
| 1940 // Finish initialization of ThreadLocal after deserialization is done. | 1944 // Finish initialization of ThreadLocal after deserialization is done. |
| 1941 clear_pending_exception(); | 1945 clear_pending_exception(); |
| 1942 clear_pending_message(); | 1946 clear_pending_message(); |
| 1943 clear_scheduled_exception(); | 1947 clear_scheduled_exception(); |
| 1944 | 1948 |
| 1945 // Deserializing may put strange things in the root array's copy of the | 1949 // Deserializing may put strange things in the root array's copy of the |
| 1946 // stack guard. | 1950 // stack guard. |
| 1947 heap_.SetStackLimits(); | 1951 heap_.SetStackLimits(); |
| 1948 | 1952 |
| 1949 // Quiet the heap NaN if needed on target platform. | 1953 // Quiet the heap NaN if needed on target platform. |
| 1950 if (!create_heap_objects) Assembler::QuietNaN(heap_.nan_value()); | 1954 if (!create_heap_objects) Assembler::QuietNaN(heap_.nan_value()); |
| 1951 | 1955 |
| 1952 runtime_profiler_ = new RuntimeProfiler(this); | |
| 1953 | |
| 1954 // If we are deserializing, log non-function code objects and compiled | 1956 // If we are deserializing, log non-function code objects and compiled |
| 1955 // functions found in the snapshot. | 1957 // functions found in the snapshot. |
| 1956 if (!create_heap_objects && | 1958 if (!create_heap_objects && |
| 1957 (FLAG_log_code || | 1959 (FLAG_log_code || |
| 1958 FLAG_ll_prof || | 1960 FLAG_ll_prof || |
| 1959 FLAG_perf_jit_prof || | 1961 FLAG_perf_jit_prof || |
| 1960 FLAG_perf_basic_prof || | 1962 FLAG_perf_basic_prof || |
| 1961 logger_->is_logging_code_events())) { | 1963 logger_->is_logging_code_events())) { |
| 1962 HandleScope scope(this); | 1964 HandleScope scope(this); |
| 1963 LOG(this, LogCodeObjects()); | 1965 LOG(this, LogCodeObjects()); |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2381 if (prev_ && prev_->Intercept(flag)) return true; | 2383 if (prev_ && prev_->Intercept(flag)) return true; |
| 2382 // Then check whether this scope intercepts. | 2384 // Then check whether this scope intercepts. |
| 2383 if ((flag & intercept_mask_)) { | 2385 if ((flag & intercept_mask_)) { |
| 2384 intercepted_flags_ |= flag; | 2386 intercepted_flags_ |= flag; |
| 2385 return true; | 2387 return true; |
| 2386 } | 2388 } |
| 2387 return false; | 2389 return false; |
| 2388 } | 2390 } |
| 2389 | 2391 |
| 2390 } } // namespace v8::internal | 2392 } } // namespace v8::internal |
| OLD | NEW |