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

Side by Side 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, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 { 1080 {
1081 ScopedVector<v8::Handle<v8::String> > names(4); 1081 ScopedVector<v8::Handle<v8::String> > names(4);
1082 names[0] = v8::String::New(ProfileGenerator::kGarbageCollectorEntryName); 1082 names[0] = v8::String::New(ProfileGenerator::kGarbageCollectorEntryName);
1083 names[1] = v8::String::New(ProfileGenerator::kProgramEntryName); 1083 names[1] = v8::String::New(ProfileGenerator::kProgramEntryName);
1084 names[2] = v8::String::New("start"); 1084 names[2] = v8::String::New("start");
1085 names[3] = v8::String::New(i::ProfileGenerator::kUnresolvedFunctionName); 1085 names[3] = v8::String::New(i::ProfileGenerator::kUnresolvedFunctionName);
1086 // Don't allow |bar| and |call| nodes to be at the top level. 1086 // Don't allow |bar| and |call| nodes to be at the top level.
1087 CheckChildrenNames(root, names); 1087 CheckChildrenNames(root, names);
1088 } 1088 }
1089 1089
1090 const v8::CpuProfileNode* startNode = GetChild(root, "start"); 1090 // In case of GC stress tests all samples may be in GC phase and there
1091 { 1091 // won't be |start| node in the profiles.
1092 bool start_node_must_exist =
1093 (i::FLAG_gc_interval == -1) && !i::FLAG_stress_compaction;
1094 const v8::CpuProfileNode* startNode = start_node_must_exist
1095 ? GetChild(root, "start")
1096 : FindChild(root, "start");
1097 if (startNode) {
1092 ScopedVector<v8::Handle<v8::String> > names(1); 1098 ScopedVector<v8::Handle<v8::String> > names(1);
1093 names[0] = v8::String::New("bar"); 1099 names[0] = v8::String::New("bar");
1094 CheckChildrenNames(startNode, names); 1100 CheckChildrenNames(startNode, names);
1095 } 1101 }
1096 1102
1097 const v8::CpuProfileNode* unresolvedNode = 1103 const v8::CpuProfileNode* unresolvedNode =
1098 FindChild(root, i::ProfileGenerator::kUnresolvedFunctionName); 1104 FindChild(root, i::ProfileGenerator::kUnresolvedFunctionName);
1099 if (unresolvedNode) { 1105 if (unresolvedNode) {
1100 ScopedVector<v8::Handle<v8::String> > names(1); 1106 ScopedVector<v8::Handle<v8::String> > names(1);
1101 names[0] = v8::String::New("call"); 1107 names[0] = v8::String::New("call");
1102 CheckChildrenNames(unresolvedNode, names); 1108 CheckChildrenNames(unresolvedNode, names);
1103 } 1109 }
1104 1110
1105 cpu_profiler->DeleteAllCpuProfiles(); 1111 cpu_profiler->DeleteAllCpuProfiles();
1106 } 1112 }
1107 1113
OLDNEW
« 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