Increase profiling interval for test-cpu-profiler/FunctionCallSample
authoryurys@chromium.org <yurys@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 2 Jul 2013 14:06:39 +0000 (14:06 +0000)
committeryurys@chromium.org <yurys@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 2 Jul 2013 14:06:39 +0000 (14:06 +0000)
The test falkes on Windows bots as number of samples is not enough. This change increases sampling interval for the test on Windows.

BUG=2628
TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/cctest/test-cpu-profiler.cc

index f4d9936..223f5fc 100644 (file)
@@ -1062,6 +1062,11 @@ TEST(FunctionCallSample) {
 
   cpu_profiler->StartCpuProfiling(profile_name);
   int32_t duration_ms = 100;
+#if defined(_WIN32) || defined(_WIN64)
+  // 100ms is not enough on Windows. See
+  // https://code.google.com/p/v8/issues/detail?id=2628
+  duration_ms = 400;
+#endif
   v8::Handle<v8::Value> args[] = { v8::Integer::New(duration_ms) };
   function->Call(env->Global(), ARRAY_SIZE(args), args);
   const v8::CpuProfile* profile = cpu_profiler->StopCpuProfiling(profile_name);