| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 explicit HeapObjectsMap(Heap* heap); | 226 explicit HeapObjectsMap(Heap* heap); |
| 227 | 227 |
| 228 Heap* heap() const { return heap_; } | 228 Heap* heap() const { return heap_; } |
| 229 | 229 |
| 230 void SnapshotGenerationFinished(); | 230 void SnapshotGenerationFinished(); |
| 231 SnapshotObjectId FindEntry(Address addr); | 231 SnapshotObjectId FindEntry(Address addr); |
| 232 SnapshotObjectId FindOrAddEntry(Address addr, | 232 SnapshotObjectId FindOrAddEntry(Address addr, |
| 233 unsigned int size, | 233 unsigned int size, |
| 234 bool accessed = true); | 234 bool accessed = true); |
| 235 void MoveObject(Address from, Address to, int size); | 235 void MoveObject(Address from, Address to, int size); |
| 236 void NewObject(Address addr, int size); | |
| 237 void UpdateObjectSize(Address addr, int size); | 236 void UpdateObjectSize(Address addr, int size); |
| 238 SnapshotObjectId last_assigned_id() const { | 237 SnapshotObjectId last_assigned_id() const { |
| 239 return next_id_ - kObjectIdStep; | 238 return next_id_ - kObjectIdStep; |
| 240 } | 239 } |
| 241 | 240 |
| 242 void StopHeapObjectsTracking(); | 241 void StopHeapObjectsTracking(); |
| 243 SnapshotObjectId PushHeapObjectsStats(OutputStream* stream); | 242 SnapshotObjectId PushHeapObjectsStats(OutputStream* stream); |
| 244 size_t GetUsedMemorySize() const; | 243 size_t GetUsedMemorySize() const; |
| 245 | 244 |
| 246 static SnapshotObjectId GenerateId(Heap* heap, v8::RetainedObjectInfo* info); | 245 static SnapshotObjectId GenerateId(Heap* heap, v8::RetainedObjectInfo* info); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 SnapshotObjectId FindObjectId(Address object_addr) { | 310 SnapshotObjectId FindObjectId(Address object_addr) { |
| 312 return ids_.FindEntry(object_addr); | 311 return ids_.FindEntry(object_addr); |
| 313 } | 312 } |
| 314 SnapshotObjectId GetObjectId(Address object_addr, int object_size) { | 313 SnapshotObjectId GetObjectId(Address object_addr, int object_size) { |
| 315 return ids_.FindOrAddEntry(object_addr, object_size); | 314 return ids_.FindOrAddEntry(object_addr, object_size); |
| 316 } | 315 } |
| 317 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id); | 316 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id); |
| 318 void ObjectMoveEvent(Address from, Address to, int size) { | 317 void ObjectMoveEvent(Address from, Address to, int size) { |
| 319 ids_.MoveObject(from, to, size); | 318 ids_.MoveObject(from, to, size); |
| 320 } | 319 } |
| 321 void NewObjectEvent(Address addr, int size); | 320 void AllocationEvent(Address addr, int size); |
| 322 void UpdateObjectSizeEvent(Address addr, int size) { | 321 void UpdateObjectSizeEvent(Address addr, int size) { |
| 323 ids_.UpdateObjectSize(addr, size); | 322 ids_.UpdateObjectSize(addr, size); |
| 324 } | 323 } |
| 325 SnapshotObjectId last_assigned_id() const { | 324 SnapshotObjectId last_assigned_id() const { |
| 326 return ids_.last_assigned_id(); | 325 return ids_.last_assigned_id(); |
| 327 } | 326 } |
| 328 size_t GetUsedMemorySize() const; | 327 size_t GetUsedMemorySize() const; |
| 329 | 328 |
| 330 int FindUntrackedObjects() { return ids_.FindUntrackedObjects(); } | 329 int FindUntrackedObjects() { return ids_.FindUntrackedObjects(); } |
| 331 | 330 |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 friend class HeapSnapshotJSONSerializerEnumerator; | 692 friend class HeapSnapshotJSONSerializerEnumerator; |
| 694 friend class HeapSnapshotJSONSerializerIterator; | 693 friend class HeapSnapshotJSONSerializerIterator; |
| 695 | 694 |
| 696 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 695 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
| 697 }; | 696 }; |
| 698 | 697 |
| 699 | 698 |
| 700 } } // namespace v8::internal | 699 } } // namespace v8::internal |
| 701 | 700 |
| 702 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ | 701 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ |
| OLD | NEW |