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

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

Issue 18068012: Fix test-cpu-profiler/FunctionCallSample flakiness under GC stress testing (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 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);
« 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