Commit 9b9e458a authored by loislo@chromium.org's avatar loislo@chromium.org

Revert "This value is required for showing the heap snapshot delta in Summary...

Revert "This value is required for showing the heap snapshot delta in Summary view of DevTools.Profiler."

This reverts commit 634864d65ebe820a967f6162d8e226cf4a73e51a.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9861018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11158 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 70074b69
......@@ -347,9 +347,6 @@ class V8EXPORT HeapSnapshot {
/** Returns a node by index. */
const HeapGraphNode* GetNode(int index) const;
/** Returns a max seen JS object Id. */
SnapshotObjectId GetMaxSnapshotJSObjectId() const;
/**
* Deletes the snapshot and removes it from HeapProfiler's list.
* All pointers to nodes, edges and paths previously returned become
......
......@@ -6157,13 +6157,6 @@ const HeapGraphNode* HeapSnapshot::GetNode(int index) const {
}
SnapshotObjectId HeapSnapshot::GetMaxSnapshotJSObjectId() const {
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::HeapSnapshot::GetMaxSnapshotJSObjectId");
return ToInternal(this)->max_snapshot_js_object_id();
}
void HeapSnapshot::Serialize(OutputStream* stream,
HeapSnapshot::SerializationFormat format) const {
i::Isolate* isolate = i::Isolate::Current();
......
......@@ -1133,8 +1133,7 @@ HeapSnapshot::HeapSnapshot(HeapSnapshotsCollection* collection,
gc_roots_entry_(NULL),
natives_root_entry_(NULL),
raw_entries_(NULL),
entries_sorted_(false),
max_snapshot_js_object_id_(0) {
entries_sorted_(false) {
STATIC_CHECK(
sizeof(HeapGraphEdge) ==
SnapshotSizeConstants<kPointerSize>::kExpectedHeapGraphEdgeSize);
......@@ -1224,11 +1223,6 @@ HeapEntry* HeapSnapshot::AddEntry(HeapEntry::Type type,
int retainers_count) {
HeapEntry* entry = GetNextEntryToInit();
entry->Init(this, type, name, id, size, children_count, retainers_count);
// Track only js objects. They have odd ids.
if (id % HeapObjectsMap::kObjectIdStep && id > max_snapshot_js_object_id_)
max_snapshot_js_object_id_ = id;
return entry;
}
......
......@@ -35,6 +35,8 @@
namespace v8 {
namespace internal {
typedef uint32_t SnapshotObjectId;
class TokenEnumerator {
public:
TokenEnumerator();
......@@ -645,9 +647,6 @@ class HeapSnapshot {
HeapEntry* gc_subroot(int index) { return gc_subroot_entries_[index]; }
List<HeapEntry*>* entries() { return &entries_; }
size_t raw_entries_size() { return raw_entries_size_; }
SnapshotObjectId max_snapshot_js_object_id() const {
return max_snapshot_js_object_id_;
}
void AllocateEntries(
int entries_count, int children_count, int retainers_count);
......@@ -688,7 +687,6 @@ class HeapSnapshot {
List<HeapEntry*> entries_;
bool entries_sorted_;
size_t raw_entries_size_;
SnapshotObjectId max_snapshot_js_object_id_;
friend class HeapSnapshotTester;
......
......@@ -422,11 +422,6 @@ TEST(HeapEntryIdsAndGC) {
const v8::HeapSnapshot* snapshot2 =
v8::HeapProfiler::TakeSnapshot(v8_str("s2"));
// Second snapshot has one more string, it is it's name 's2'.
CHECK_EQ_SNAPSHOT_OBJECT_ID(
snapshot1->GetMaxSnapshotJSObjectId() + i::HeapObjectsMap::kObjectIdStep,
snapshot2->GetMaxSnapshotJSObjectId());
const v8::HeapGraphNode* global1 = GetGlobalObject(snapshot1);
const v8::HeapGraphNode* global2 = GetGlobalObject(snapshot2);
CHECK_NE_SNAPSHOT_OBJECT_ID(0, global1->GetId());
......
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