Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Revert of CpuProfiler: enable tests except four failing tests. (patch…
Browse files Browse the repository at this point in the history
…set #3 id:100001 of https://codereview.chromium.org/976203003/)

Reason for revert:
Some tests still flaky

Original issue's description:
> CpuProfiler: enable tests except four failing tests.
>
> Four tests are failing due to a problem with no frame ranges.
>
> BUG=
> LOG=n
>
> Committed: https://crrev.com/2be160e726f2be6272b77e53fbd556aded6024f1
> Cr-Commit-Position: refs/heads/master@{#27035}

[email protected],[email protected]
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#27037}
  • Loading branch information
loislo authored and Commit bot committed Mar 6, 2015
1 parent e6ff16d commit b2ae7a7
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 30 deletions.
20 changes: 11 additions & 9 deletions test/cctest/cctest.status
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,8 @@
# The cpu profiler tests are notoriously flaky.
# BUG(2999). (test/cpu-profiler/CollectCpuProfile)
# BUG(3287). (test-cpu-profiler/SampleWhenFrameIsNotSetup)
'test-cpu-profiler/CollectCpuProfile': [SKIP],
'test-cpu-profiler/CollectCpuProfileSamples': [SKIP],
'test-cpu-profiler/FunctionApplySample': [SKIP],
'test-cpu-profiler/FunctionCallSample': [SKIP],
'test-cpu-profiler/SampleWhenFrameIsNotSetup': [SKIP],
'test-cpu-profiler/*': [PASS, FLAKY],
'test-cpu-profiler/*': [SKIP],

# BUG(3525). Test crashes flakily.
'test-debug/RecursiveBreakpoints': [PASS, FLAKY],
Expand Down Expand Up @@ -116,14 +113,15 @@
##############################################################################
['arch == arm64', {

'test-cpu-profiler/CollectDeoptEvents': [PASS, FAIL],

'test-api/Bug618': [PASS],

# BUG(v8:3385).
'test-serialize/DeserializeFromSecondSerialization': [PASS, FAIL],
'test-serialize/DeserializeFromSecondSerializationAndRunScript2': [PASS, FAIL],

# BUG(v8:2999).
'test-cpu-profiler/CollectCpuProfile': [PASS, FAIL],

# BUG(v8:3154).
'test-heap/ReleaseOverReservedPages': [PASS, FAIL],

Expand Down Expand Up @@ -181,12 +179,18 @@
##############################################################################
['system == windows', {

# BUG(2999).
'test-cpu-profiler/CollectCpuProfile': [PASS, FAIL],

# BUG(3005).
'test-alloc/CodeRange': [PASS, FAIL],

# BUG(3331). Fails on windows.
'test-heap/NoWeakHashTableLeakWithIncrementalMarking': [SKIP],

# BUG(v8:3433). Crashes on windows.
'test-cpu-profiler/FunctionApplySample': [SKIP],

}], # 'system == windows'

##############################################################################
Expand All @@ -201,8 +205,6 @@
##############################################################################
['arch == arm', {

'test-cpu-profiler/CollectDeoptEvents': [PASS, FAIL],

# BUG(355): Test crashes on ARM.
'test-log/ProfLazyMode': [SKIP],

Expand Down
29 changes: 8 additions & 21 deletions test/cctest/test-cpu-profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ static v8::CpuProfile* RunProfiler(
static bool ContainsString(v8::Handle<v8::String> string,
const Vector<v8::Handle<v8::String> >& vector) {
for (int i = 0; i < vector.length(); i++) {
if (string->Equals(vector[i])) return true;
if (string->Equals(vector[i]))
return true;
}
return false;
}
Expand All @@ -449,25 +450,11 @@ static void CheckChildrenNames(const v8::CpuProfileNode* node,
int count = node->GetChildrenCount();
for (int i = 0; i < count; i++) {
v8::Handle<v8::String> name = node->GetChild(i)->GetFunctionName();
if (!ContainsString(name, names)) {
char buffer[100];
i::SNPrintF(Vector<char>(buffer, arraysize(buffer)),
"Unexpected child '%s' found in '%s'",
*v8::String::Utf8Value(name),
*v8::String::Utf8Value(node->GetFunctionName()));
FATAL(buffer);
}
CHECK(ContainsString(name, names));
// Check that there are no duplicates.
for (int j = 0; j < count; j++) {
if (j == i) continue;
if (name->Equals(node->GetChild(j)->GetFunctionName())) {
char buffer[100];
i::SNPrintF(Vector<char>(buffer, arraysize(buffer)),
"Second child with the same name '%s' found in '%s'",
*v8::String::Utf8Value(name),
*v8::String::Utf8Value(node->GetFunctionName()));
FATAL(buffer);
}
CHECK(!name->Equals(node->GetChild(j)->GetFunctionName()));
}
}
}
Expand Down Expand Up @@ -1087,10 +1074,10 @@ TEST(TickLines) {
CpuProfilesCollection* profiles = new CpuProfilesCollection(isolate->heap());
profiles->StartProfiling("", false);
ProfileGenerator generator(profiles);
SmartPointer<ProfilerEventsProcessor> processor(new ProfilerEventsProcessor(
&generator, NULL, v8::base::TimeDelta::FromMicroseconds(100)));
ProfilerEventsProcessor* processor = new ProfilerEventsProcessor(
&generator, NULL, v8::base::TimeDelta::FromMicroseconds(100));
processor->Start();
CpuProfiler profiler(isolate, profiles, &generator, processor.get());
CpuProfiler profiler(isolate, profiles, &generator, processor);

// Enqueue code creation events.
i::Handle<i::String> str = factory->NewStringFromAsciiChecked(func_name);
Expand All @@ -1100,7 +1087,7 @@ TEST(TickLines) {
*str, line, column);

// Enqueue a tick event to enable code events processing.
EnqueueTickSampleEvent(processor.get(), code_address);
EnqueueTickSampleEvent(processor, code_address);

processor->StopSynchronously();

Expand Down

0 comments on commit b2ae7a7

Please sign in to comment.