From f2c0e06e643c6f43dddbbca05b31fa8d49bfe476 Mon Sep 17 00:00:00 2001 From: "yurys@chromium.org" Date: Mon, 27 Aug 2012 08:49:00 +0000 Subject: [PATCH] Remove unused method and add line breaks after each serialized edge Review URL: https://chromiumcodereview.appspot.com/10874063 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/profile-generator.cc | 19 +++---------------- src/profile-generator.h | 4 ---- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/profile-generator.cc b/src/profile-generator.cc index 2b21896..c3b7622 100644 --- a/src/profile-generator.cc +++ b/src/profile-generator.cc @@ -2578,20 +2578,6 @@ void V8HeapExplorer::SetPropertyReference(HeapObject* parent_obj, } -void V8HeapExplorer::SetPropertyShortcutReference(HeapObject* parent_obj, - int parent_entry, - String* reference_name, - Object* child_obj) { - HeapEntry* child_entry = GetEntry(child_obj); - if (child_entry != NULL) { - filler_->SetNamedReference(HeapGraphEdge::kShortcut, - parent_entry, - collection_->names()->GetName(reference_name), - child_entry); - } -} - - void V8HeapExplorer::SetRootGcRootsReference() { filler_->SetIndexedAutoIndexReference( HeapGraphEdge::kElement, @@ -3363,9 +3349,9 @@ static int utoa(unsigned value, const Vector& buffer, int buffer_pos) { void HeapSnapshotJSONSerializer::SerializeEdge(HeapGraphEdge* edge, bool first_edge) { - // The buffer needs space for 3 unsigned ints, 3 commas and \0 + // The buffer needs space for 3 unsigned ints, 3 commas, \n and \0 static const int kBufferSize = - MaxDecimalDigitsIn::kUnsigned * 3 + 3 + 1; // NOLINT + MaxDecimalDigitsIn::kUnsigned * 3 + 3 + 2; // NOLINT EmbeddedVector buffer; int edge_name_or_index = edge->type() == HeapGraphEdge::kElement || edge->type() == HeapGraphEdge::kHidden @@ -3380,6 +3366,7 @@ void HeapSnapshotJSONSerializer::SerializeEdge(HeapGraphEdge* edge, buffer_pos = utoa(edge_name_or_index, buffer, buffer_pos); buffer[buffer_pos++] = ','; buffer_pos = utoa(entry_index(edge->to()), buffer, buffer_pos); + buffer[buffer_pos++] = '\n'; buffer[buffer_pos++] = '\0'; writer_->AddString(buffer.start()); } diff --git a/src/profile-generator.h b/src/profile-generator.h index d56d874..04f4a1c 100644 --- a/src/profile-generator.h +++ b/src/profile-generator.h @@ -925,10 +925,6 @@ class V8HeapExplorer : public HeapEntriesAllocator { Object* child, const char* name_format_string = NULL, int field_offset = -1); - void SetPropertyShortcutReference(HeapObject* parent_obj, - int parent, - String* reference_name, - Object* child); void SetUserGlobalReference(Object* user_global); void SetRootGcRootsReference(); void SetGcRootsReference(VisitorSynchronization::SyncTag tag); -- 2.7.4