Revert last commit due to check fail on Linux.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 99c276bb
...@@ -952,8 +952,8 @@ void HeapEntry::PaintAllReachable() { ...@@ -952,8 +952,8 @@ void HeapEntry::PaintAllReachable() {
void HeapEntry::Print(int max_depth, int indent) { void HeapEntry::Print(int max_depth, int indent) {
OS::Print("%6d %6d %6d [%llu, %d] ", OS::Print("%6d %6d %6d [%ld] ",
self_size(), ReachableSize(), RetainedSize(), id_, painted_); self_size(), ReachableSize(), RetainedSize(), id_);
if (type() != kString) { if (type() != kString) {
OS::Print("%s %.40s\n", TypeAsString(), name_); OS::Print("%s %.40s\n", TypeAsString(), name_);
} else { } else {
...@@ -1237,7 +1237,7 @@ HeapSnapshot::HeapSnapshot(HeapSnapshotsCollection* collection, ...@@ -1237,7 +1237,7 @@ HeapSnapshot::HeapSnapshot(HeapSnapshotsCollection* collection,
type_(type), type_(type),
title_(title), title_(title),
uid_(uid), uid_(uid),
root_entry_(NULL), root_entry_index_(-1),
raw_entries_(NULL), raw_entries_(NULL),
entries_sorted_(false) { entries_sorted_(false) {
STATIC_ASSERT( STATIC_ASSERT(
...@@ -1276,11 +1276,11 @@ HeapEntry* HeapSnapshot::AddEntry(HeapObject* object, ...@@ -1276,11 +1276,11 @@ HeapEntry* HeapSnapshot::AddEntry(HeapObject* object,
int children_count, int children_count,
int retainers_count) { int retainers_count) {
if (object == kInternalRootObject) { if (object == kInternalRootObject) {
ASSERT(root_entry_ == NULL); ASSERT(root_entry_index_ == -1);
root_entry_index_ = entries_.length();
ASSERT(retainers_count == 0); ASSERT(retainers_count == 0);
root_entry_ = AddEntry( return AddEntry(
HeapEntry::kInternal, "", 0, 0, children_count, retainers_count); HeapEntry::kInternal, "", 0, 0, children_count, retainers_count);
return root_entry_;
} else if (object->IsJSFunction()) { } else if (object->IsJSFunction()) {
JSFunction* func = JSFunction::cast(object); JSFunction* func = JSFunction::cast(object);
SharedFunctionInfo* shared = func->shared(); SharedFunctionInfo* shared = func->shared();
......
...@@ -662,7 +662,7 @@ class HeapSnapshot { ...@@ -662,7 +662,7 @@ class HeapSnapshot {
Type type() { return type_; } Type type() { return type_; }
const char* title() { return title_; } const char* title() { return title_; }
unsigned uid() { return uid_; } unsigned uid() { return uid_; }
HeapEntry* root() { return root_entry_; } HeapEntry* root() { return entries_[root_entry_index_]; }
void AllocateEntries( void AllocateEntries(
int entries_count, int children_count, int retainers_count); int entries_count, int children_count, int retainers_count);
...@@ -704,7 +704,7 @@ class HeapSnapshot { ...@@ -704,7 +704,7 @@ class HeapSnapshot {
Type type_; Type type_;
const char* title_; const char* title_;
unsigned uid_; unsigned uid_;
HeapEntry* root_entry_; int root_entry_index_;
char* raw_entries_; char* raw_entries_;
List<HeapEntry*> entries_; List<HeapEntry*> entries_;
bool entries_sorted_; bool entries_sorted_;
......
...@@ -35,6 +35,11 @@ test-debug/DebuggerAgent: PASS, (PASS || FAIL) if $system == linux ...@@ -35,6 +35,11 @@ test-debug/DebuggerAgent: PASS, (PASS || FAIL) if $system == linux
# BUG(382): Weird test. Can't guarantee that it never times out. # BUG(382): Weird test. Can't guarantee that it never times out.
test-api/ApplyInterruption: PASS || TIMEOUT test-api/ApplyInterruption: PASS || TIMEOUT
# Bug (484): This test which we thought was originally corrected in r5236
# is reappering. Disabled until bug in test is fixed. This only fails
# when snapshot is on, so I am marking it PASS || FAIL
test-heap-profiler/HeapSnapshotsDiff: PASS || FAIL
# These tests always fail. They are here to test test.py. If # These tests always fail. They are here to test test.py. If
# they don't fail then test.py has failed. # they don't fail then test.py has failed.
test-serialize/TestThatAlwaysFails: FAIL test-serialize/TestThatAlwaysFails: FAIL
......
...@@ -787,7 +787,6 @@ TEST(HeapSnapshotsDiff) { ...@@ -787,7 +787,6 @@ TEST(HeapSnapshotsDiff) {
CompileAndRunScript( CompileAndRunScript(
"function A() {}\n" "function A() {}\n"
"function B(x) { this.x = x; }\n" "function B(x) { this.x = x; }\n"
"function A2(a) { for (var i = 0; i < a; ++i) this[i] = i; }\n"
"var a = new A();\n" "var a = new A();\n"
"var b = new B(a);"); "var b = new B(a);");
const v8::HeapSnapshot* snapshot1 = const v8::HeapSnapshot* snapshot1 =
...@@ -796,7 +795,7 @@ TEST(HeapSnapshotsDiff) { ...@@ -796,7 +795,7 @@ TEST(HeapSnapshotsDiff) {
CompileAndRunScript( CompileAndRunScript(
"delete a;\n" "delete a;\n"
"b.x = null;\n" "b.x = null;\n"
"var a = new A2(20);\n" "var a = new A();\n"
"var b2 = new B(a);"); "var b2 = new B(a);");
const v8::HeapSnapshot* snapshot2 = const v8::HeapSnapshot* snapshot2 =
v8::HeapProfiler::TakeSnapshot(v8::String::New("s2")); v8::HeapProfiler::TakeSnapshot(v8::String::New("s2"));
...@@ -812,7 +811,7 @@ TEST(HeapSnapshotsDiff) { ...@@ -812,7 +811,7 @@ TEST(HeapSnapshotsDiff) {
const v8::HeapGraphNode* node = prop->GetToNode(); const v8::HeapGraphNode* node = prop->GetToNode();
if (node->GetType() == v8::HeapGraphNode::kObject) { if (node->GetType() == v8::HeapGraphNode::kObject) {
v8::String::AsciiValue node_name(node->GetName()); v8::String::AsciiValue node_name(node->GetName());
if (strcmp(*node_name, "A2") == 0) { if (strcmp(*node_name, "A") == 0) {
CHECK(IsNodeRetainedAs(node, v8::HeapGraphEdge::kProperty, "a")); CHECK(IsNodeRetainedAs(node, v8::HeapGraphEdge::kProperty, "a"));
CHECK(!found_A); CHECK(!found_A);
found_A = true; found_A = true;
...@@ -850,19 +849,6 @@ TEST(HeapSnapshotsDiff) { ...@@ -850,19 +849,6 @@ TEST(HeapSnapshotsDiff) {
} }
TEST(HeapSnapshotRootPreservedAfterSorting) {
v8::HandleScope scope;
LocalContext env;
const v8::HeapSnapshot* snapshot =
v8::HeapProfiler::TakeSnapshot(v8::String::New("s"));
const v8::HeapGraphNode* root1 = snapshot->GetRoot();
const_cast<i::HeapSnapshot*>(reinterpret_cast<const i::HeapSnapshot*>(
snapshot))->GetSortedEntriesList();
const v8::HeapGraphNode* root2 = snapshot->GetRoot();
CHECK_EQ(root1, root2);
}
namespace v8 { namespace v8 {
namespace internal { namespace internal {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment