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

Side by Side Diff: src/api.cc

Issue 10353010: Split nodes and edges into separate arrays in heap profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comments. Created 8 years, 7 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 | src/list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 6045 matching lines...) Expand 10 before | Expand all | Expand 10 after
6056 i::Isolate* isolate = i::Isolate::Current(); 6056 i::Isolate* isolate = i::Isolate::Current();
6057 IsDeadCheck(isolate, "v8::HeapSnapshot::GetChildrenCount"); 6057 IsDeadCheck(isolate, "v8::HeapSnapshot::GetChildrenCount");
6058 return ToInternal(this)->children().length(); 6058 return ToInternal(this)->children().length();
6059 } 6059 }
6060 6060
6061 6061
6062 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const { 6062 const HeapGraphEdge* HeapGraphNode::GetChild(int index) const {
6063 i::Isolate* isolate = i::Isolate::Current(); 6063 i::Isolate* isolate = i::Isolate::Current();
6064 IsDeadCheck(isolate, "v8::HeapSnapshot::GetChild"); 6064 IsDeadCheck(isolate, "v8::HeapSnapshot::GetChild");
6065 return reinterpret_cast<const HeapGraphEdge*>( 6065 return reinterpret_cast<const HeapGraphEdge*>(
6066 &ToInternal(this)->children()[index]); 6066 ToInternal(this)->children()[index]);
6067 } 6067 }
6068 6068
6069 6069
6070 int HeapGraphNode::GetRetainersCount() const { 6070 int HeapGraphNode::GetRetainersCount() const {
6071 i::Isolate* isolate = i::Isolate::Current(); 6071 i::Isolate* isolate = i::Isolate::Current();
6072 IsDeadCheck(isolate, "v8::HeapSnapshot::GetRetainersCount"); 6072 IsDeadCheck(isolate, "v8::HeapSnapshot::GetRetainersCount");
6073 return ToInternal(this)->retainers().length(); 6073 return ToInternal(this)->retainers().length();
6074 } 6074 }
6075 6075
6076 6076
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
6150 i::Isolate* isolate = i::Isolate::Current(); 6150 i::Isolate* isolate = i::Isolate::Current();
6151 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNodeById"); 6151 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNodeById");
6152 return reinterpret_cast<const HeapGraphNode*>( 6152 return reinterpret_cast<const HeapGraphNode*>(
6153 ToInternal(this)->GetEntryById(id)); 6153 ToInternal(this)->GetEntryById(id));
6154 } 6154 }
6155 6155
6156 6156
6157 int HeapSnapshot::GetNodesCount() const { 6157 int HeapSnapshot::GetNodesCount() const {
6158 i::Isolate* isolate = i::Isolate::Current(); 6158 i::Isolate* isolate = i::Isolate::Current();
6159 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNodesCount"); 6159 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNodesCount");
6160 return ToInternal(this)->entries()->length(); 6160 return ToInternal(this)->entries().length();
6161 } 6161 }
6162 6162
6163 6163
6164 const HeapGraphNode* HeapSnapshot::GetNode(int index) const { 6164 const HeapGraphNode* HeapSnapshot::GetNode(int index) const {
6165 i::Isolate* isolate = i::Isolate::Current(); 6165 i::Isolate* isolate = i::Isolate::Current();
6166 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNode"); 6166 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNode");
6167 return reinterpret_cast<const HeapGraphNode*>( 6167 return reinterpret_cast<const HeapGraphNode*>(
6168 ToInternal(this)->entries()->at(index)); 6168 &ToInternal(this)->entries().at(index));
6169 } 6169 }
6170 6170
6171 6171
6172 SnapshotObjectId HeapSnapshot::GetMaxSnapshotJSObjectId() const { 6172 SnapshotObjectId HeapSnapshot::GetMaxSnapshotJSObjectId() const {
6173 i::Isolate* isolate = i::Isolate::Current(); 6173 i::Isolate* isolate = i::Isolate::Current();
6174 IsDeadCheck(isolate, "v8::HeapSnapshot::GetMaxSnapshotJSObjectId"); 6174 IsDeadCheck(isolate, "v8::HeapSnapshot::GetMaxSnapshotJSObjectId");
6175 return ToInternal(this)->max_snapshot_js_object_id(); 6175 return ToInternal(this)->max_snapshot_js_object_id();
6176 } 6176 }
6177 6177
6178 6178
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
6411 6411
6412 6412
6413 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6413 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6414 HandleScopeImplementer* scope_implementer = 6414 HandleScopeImplementer* scope_implementer =
6415 reinterpret_cast<HandleScopeImplementer*>(storage); 6415 reinterpret_cast<HandleScopeImplementer*>(storage);
6416 scope_implementer->IterateThis(v); 6416 scope_implementer->IterateThis(v);
6417 return storage + ArchiveSpacePerThread(); 6417 return storage + ArchiveSpacePerThread();
6418 } 6418 }
6419 6419
6420 } } // namespace v8::internal 6420 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698