diff options
Diffstat (limited to 'deps/v8/src/platform-win32.cc')
-rw-r--r-- | deps/v8/src/platform-win32.cc | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/deps/v8/src/platform-win32.cc b/deps/v8/src/platform-win32.cc index 49463be8e0..f00d6b01b2 100644 --- a/deps/v8/src/platform-win32.cc +++ b/deps/v8/src/platform-win32.cc @@ -199,11 +199,19 @@ UNARY_MATH_FUNCTION(sin, CreateTranscendentalFunction(TranscendentalCache::SIN)) UNARY_MATH_FUNCTION(cos, CreateTranscendentalFunction(TranscendentalCache::COS)) UNARY_MATH_FUNCTION(tan, CreateTranscendentalFunction(TranscendentalCache::TAN)) UNARY_MATH_FUNCTION(log, CreateTranscendentalFunction(TranscendentalCache::LOG)) +UNARY_MATH_FUNCTION(exp, CreateExpFunction()) UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction()) #undef MATH_FUNCTION +void lazily_initialize_fast_exp() { + if (fast_exp_function == NULL) { + init_fast_exp_function(); + } +} + + void MathSetup() { #ifdef _WIN64 init_modulo_function(); @@ -212,6 +220,7 @@ void MathSetup() { init_fast_cos_function(); init_fast_tan_function(); init_fast_log_function(); + // fast_exp is initialized lazily. init_fast_sqrt_function(); } @@ -1551,6 +1560,12 @@ bool VirtualMemory::ReleaseRegion(void* base, size_t size) { } +bool VirtualMemory::HasLazyCommits() { + // TODO(alph): implement for the platform. + return false; +} + + // ---------------------------------------------------------------------------- // Win32 thread support. @@ -1995,24 +2010,13 @@ class SamplerThread : public Thread { SamplerRegistry::State state; while ((state = SamplerRegistry::GetState()) != SamplerRegistry::HAS_NO_SAMPLERS) { - bool cpu_profiling_enabled = - (state == SamplerRegistry::HAS_CPU_PROFILING_SAMPLERS); - bool runtime_profiler_enabled = RuntimeProfiler::IsEnabled(); // When CPU profiling is enabled both JavaScript and C++ code is // profiled. We must not suspend. - if (!cpu_profiling_enabled) { + if (state == SamplerRegistry::HAS_CPU_PROFILING_SAMPLERS) { + SamplerRegistry::IterateActiveSamplers(&DoCpuProfile, this); + } else { if (rate_limiter_.SuspendIfNecessary()) continue; } - if (cpu_profiling_enabled) { - if (!SamplerRegistry::IterateActiveSamplers(&DoCpuProfile, this)) { - return; - } - } - if (runtime_profiler_enabled) { - if (!SamplerRegistry::IterateActiveSamplers(&DoRuntimeProfile, NULL)) { - return; - } - } OS::Sleep(interval_); } } @@ -2025,11 +2029,6 @@ class SamplerThread : public Thread { sampler_thread->SampleContext(sampler); } - static void DoRuntimeProfile(Sampler* sampler, void* ignored) { - if (!sampler->isolate()->IsInitialized()) return; - sampler->isolate()->runtime_profiler()->NotifyTick(); - } - void SampleContext(Sampler* sampler) { HANDLE profiled_thread = sampler->platform_data()->profiled_thread(); if (profiled_thread == NULL) return; |