two cpu profiler tests are flaky on windows.

BUG=none
TEST=LogExistingFunctionSourceURLCheck, SourceURLSupportForNewFunctions
TBR=yurys

Review URL: https://codereview.chromium.org/16280011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
loislo@chromium.org 2013-06-12 14:34:19 +00:00
parent 93ab1864ea
commit 3be6a032d0

View File

@ -941,7 +941,12 @@ TEST(SourceURLSupportForNewFunctions) {
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::New("start")));
v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
int32_t profiling_interval_ms = 100;
int32_t profiling_interval_ms = 200;
#if defined(_WIN32) || defined(_WIN64)
// 200ms is not enough on Windows. See
// https://code.google.com/p/v8/issues/detail?id=2628
profiling_interval_ms = 500;
#endif
// Cold run.
v8::Local<v8::String> profile_name = v8::String::New("my_profile");
@ -971,12 +976,17 @@ TEST(LogExistingFunctionSourceURLCheck) {
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::New("start")));
v8::CpuProfiler* cpu_profiler = env->GetIsolate()->GetCpuProfiler();
int32_t profiling_interval_ms = 100;
int32_t profiling_interval_ms = 200;
// Warm up.
v8::Handle<v8::Value> args[] = { v8::Integer::New(profiling_interval_ms) };
function->Call(env->Global(), ARRAY_SIZE(args), args);
#if defined(_WIN32) || defined(_WIN64)
// 200ms is not enough on Windows. See
// https://code.google.com/p/v8/issues/detail?id=2628
profiling_interval_ms = 500;
#endif
v8::Local<v8::String> profile_name = v8::String::New("my_profile");
cpu_profiler->StartCpuProfiling(profile_name);
function->Call(env->Global(), ARRAY_SIZE(args), args);