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

Side by Side Diff: src/api.cc

Issue 9858016: I'd like to add HeapSnapshot::GetMaxSnapshotJSObjectId function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix. In some cases v8_str doesn't introduce new string in the heap. As result both snapshot have eq… Created 8 years, 9 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 | « include/v8-profiler.h ('k') | src/profile-generator.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 6139 matching lines...) Expand 10 before | Expand all | Expand 10 after
6150 6150
6151 6151
6152 const HeapGraphNode* HeapSnapshot::GetNode(int index) const { 6152 const HeapGraphNode* HeapSnapshot::GetNode(int index) const {
6153 i::Isolate* isolate = i::Isolate::Current(); 6153 i::Isolate* isolate = i::Isolate::Current();
6154 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNode"); 6154 IsDeadCheck(isolate, "v8::HeapSnapshot::GetNode");
6155 return reinterpret_cast<const HeapGraphNode*>( 6155 return reinterpret_cast<const HeapGraphNode*>(
6156 ToInternal(this)->entries()->at(index)); 6156 ToInternal(this)->entries()->at(index));
6157 } 6157 }
6158 6158
6159 6159
6160 SnapshotObjectId HeapSnapshot::GetMaxSnapshotJSObjectId() const {
6161 i::Isolate* isolate = i::Isolate::Current();
6162 IsDeadCheck(isolate, "v8::HeapSnapshot::GetMaxSnapshotJSObjectId");
6163 return ToInternal(this)->max_snapshot_js_object_id();
6164 }
6165
6166
6160 void HeapSnapshot::Serialize(OutputStream* stream, 6167 void HeapSnapshot::Serialize(OutputStream* stream,
6161 HeapSnapshot::SerializationFormat format) const { 6168 HeapSnapshot::SerializationFormat format) const {
6162 i::Isolate* isolate = i::Isolate::Current(); 6169 i::Isolate* isolate = i::Isolate::Current();
6163 IsDeadCheck(isolate, "v8::HeapSnapshot::Serialize"); 6170 IsDeadCheck(isolate, "v8::HeapSnapshot::Serialize");
6164 ApiCheck(format == kJSON, 6171 ApiCheck(format == kJSON,
6165 "v8::HeapSnapshot::Serialize", 6172 "v8::HeapSnapshot::Serialize",
6166 "Unknown serialization format"); 6173 "Unknown serialization format");
6167 ApiCheck(stream->GetOutputEncoding() == OutputStream::kAscii, 6174 ApiCheck(stream->GetOutputEncoding() == OutputStream::kAscii,
6168 "v8::HeapSnapshot::Serialize", 6175 "v8::HeapSnapshot::Serialize",
6169 "Unsupported output encoding"); 6176 "Unsupported output encoding");
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
6359 6366
6360 6367
6361 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6368 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6362 HandleScopeImplementer* scope_implementer = 6369 HandleScopeImplementer* scope_implementer =
6363 reinterpret_cast<HandleScopeImplementer*>(storage); 6370 reinterpret_cast<HandleScopeImplementer*>(storage);
6364 scope_implementer->IterateThis(v); 6371 scope_implementer->IterateThis(v);
6365 return storage + ArchiveSpacePerThread(); 6372 return storage + ArchiveSpacePerThread();
6366 } 6373 }
6367 6374
6368 } } // namespace v8::internal 6375 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8-profiler.h ('k') | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698