From 3ad62f5ee18caa1197def6d2ad127541760d59cd Mon Sep 17 00:00:00 2001 From: "yurys@chromium.org" Date: Fri, 17 May 2013 15:10:25 +0000 Subject: [PATCH] Allow for no samples in test-cpu-profiler/SampleWhenFrameIsNotSetup The test should only check that there are no sample stacks that never possible in the JS code being profiled. BUG=v8:2628 R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/14845018 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- test/cctest/cctest.status | 7 ++----- test/cctest/test-cpu-profiler.cc | 4 +++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status index 91c6d7015f..731e54d07c 100644 --- a/test/cctest/cctest.status +++ b/test/cctest/cctest.status @@ -39,10 +39,6 @@ test-api/ApplyInterruption: PASS || TIMEOUT # when snapshot is on, so I am marking it PASS || FAIL test-heap-profiler/HeapSnapshotsDiff: PASS || FAIL -# BUG(2628): These tests are flaky and sometimes fail, but should not crash. -test-cpu-profiler/CollectCpuProfile: PASS || FAIL -test-cpu-profiler/SampleWhenFrameIsNotSetup: PASS || FAIL - # These tests always fail. They are here to test test.py. If # they don't fail then test.py has failed. test-serialize/TestThatAlwaysFails: FAIL @@ -87,7 +83,8 @@ test-serialize/DeserializeFromSecondSerialization: SKIP # BUG(2628): Signal may come when pc is close to frame enter/exit code and on # simulator the stack frame is not set up when it is expected to be for the pc # value. -test-cpu-profiler/SampleWhenFrameIsNotSetup: SKIP +test-cpu-profiler/CollectCpuProfile: PASS || FAIL +test-cpu-profiler/SampleWhenFrameIsNotSetup: PASS || FAIL ############################################################################## [ $arch == android_arm || $arch == android_ia32 ] diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc index 56aa9a7775..22af9e75b3 100644 --- a/test/cctest/test-cpu-profiler.cc +++ b/test/cctest/test-cpu-profiler.cc @@ -608,7 +608,9 @@ TEST(SampleWhenFrameIsNotSetup) { CheckChildrenNames(root, names); const v8::CpuProfileNode* startNode = FindChild(root, "start"); - if (startNode->GetChildrenCount() > 0) { + // On slow machines there may be no meaningfull samples at all, skip the + // check there. + if (startNode && startNode->GetChildrenCount() > 0) { CHECK_EQ(1, startNode->GetChildrenCount()); const v8::CpuProfileNode* delayNode = FindChild(startNode, "delay"); if (delayNode->GetChildrenCount() > 0) {