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

Unified Diff: test/cctest/test-cpu-profiler.cc

Issue 16280011: two cpu profiler tests are flaky on windows. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-cpu-profiler.cc
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index e351407495a9a2b4552b8f2e9201ff31eda97b4b..95930b4c2d5d6ee1da80890f779b6ad6c20ea345 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698