| Index: test/cctest/test-cpu-profiler.cc
|
| diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
|
| index 223f5fc3925057dc70e228c8a39520c45972260b..36961a9709875933b4a0aec7237f3fcbba625f3f 100644
|
| --- a/test/cctest/test-cpu-profiler.cc
|
| +++ b/test/cctest/test-cpu-profiler.cc
|
| @@ -1087,8 +1087,14 @@ TEST(FunctionCallSample) {
|
| CheckChildrenNames(root, names);
|
| }
|
|
|
| - const v8::CpuProfileNode* startNode = GetChild(root, "start");
|
| - {
|
| + // In case of GC stress tests all samples may be in GC phase and there
|
| + // won't be |start| node in the profiles.
|
| + bool start_node_must_exist =
|
| + (i::FLAG_gc_interval == -1) && !i::FLAG_stress_compaction;
|
| + const v8::CpuProfileNode* startNode = start_node_must_exist
|
| + ? GetChild(root, "start")
|
| + : FindChild(root, "start");
|
| + if (startNode) {
|
| ScopedVector<v8::Handle<v8::String> > names(1);
|
| names[0] = v8::String::New("bar");
|
| CheckChildrenNames(startNode, names);
|
|
|