| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_HEAP_SNAPSHOT_GENERATOR_H_ | 5 #ifndef V8_HEAP_SNAPSHOT_GENERATOR_H_ |
| 6 #define V8_HEAP_SNAPSHOT_GENERATOR_H_ | 6 #define V8_HEAP_SNAPSHOT_GENERATOR_H_ |
| 7 | 7 |
| 8 #include "src/profile-generator-inl.h" | 8 #include "src/profile-generator-inl.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 | 325 |
| 326 | 326 |
| 327 // An implementation of V8 heap graph extractor. | 327 // An implementation of V8 heap graph extractor. |
| 328 class V8HeapExplorer : public HeapEntriesAllocator { | 328 class V8HeapExplorer : public HeapEntriesAllocator { |
| 329 public: | 329 public: |
| 330 V8HeapExplorer(HeapSnapshot* snapshot, | 330 V8HeapExplorer(HeapSnapshot* snapshot, |
| 331 SnapshottingProgressReportingInterface* progress, | 331 SnapshottingProgressReportingInterface* progress, |
| 332 v8::HeapProfiler::ObjectNameResolver* resolver); | 332 v8::HeapProfiler::ObjectNameResolver* resolver); |
| 333 virtual ~V8HeapExplorer(); | 333 virtual ~V8HeapExplorer(); |
| 334 virtual HeapEntry* AllocateEntry(HeapThing ptr); | 334 virtual HeapEntry* AllocateEntry(HeapThing ptr); |
| 335 void AddRootEntries(SnapshotFiller* filler); |
| 335 int EstimateObjectsCount(HeapIterator* iterator); | 336 int EstimateObjectsCount(HeapIterator* iterator); |
| 336 bool IterateAndExtractReferences(SnapshotFiller* filler); | 337 bool IterateAndExtractReferences(SnapshotFiller* filler); |
| 337 void TagGlobalObjects(); | 338 void TagGlobalObjects(); |
| 338 void TagCodeObject(Code* code); | 339 void TagCodeObject(Code* code); |
| 339 void TagBuiltinCodeObject(Code* code, const char* name); | 340 void TagBuiltinCodeObject(Code* code, const char* name); |
| 340 HeapEntry* AddEntry(Address address, | 341 HeapEntry* AddEntry(Address address, |
| 341 HeapEntry::Type type, | 342 HeapEntry::Type type, |
| 342 const char* name, | 343 const char* name, |
| 343 size_t size); | 344 size_t size); |
| 344 | 345 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 | 466 |
| 466 class NativeGroupRetainedObjectInfo; | 467 class NativeGroupRetainedObjectInfo; |
| 467 | 468 |
| 468 | 469 |
| 469 // An implementation of retained native objects extractor. | 470 // An implementation of retained native objects extractor. |
| 470 class NativeObjectsExplorer { | 471 class NativeObjectsExplorer { |
| 471 public: | 472 public: |
| 472 NativeObjectsExplorer(HeapSnapshot* snapshot, | 473 NativeObjectsExplorer(HeapSnapshot* snapshot, |
| 473 SnapshottingProgressReportingInterface* progress); | 474 SnapshottingProgressReportingInterface* progress); |
| 474 virtual ~NativeObjectsExplorer(); | 475 virtual ~NativeObjectsExplorer(); |
| 476 void AddRootEntries(SnapshotFiller* filler); |
| 475 int EstimateObjectsCount(); | 477 int EstimateObjectsCount(); |
| 476 bool IterateAndExtractReferences(SnapshotFiller* filler); | 478 bool IterateAndExtractReferences(SnapshotFiller* filler); |
| 477 | 479 |
| 478 private: | 480 private: |
| 479 void FillRetainedObjects(); | 481 void FillRetainedObjects(); |
| 480 void FillImplicitReferences(); | 482 void FillImplicitReferences(); |
| 481 List<HeapObject*>* GetListMaybeDisposeInfo(v8::RetainedObjectInfo* info); | 483 List<HeapObject*>* GetListMaybeDisposeInfo(v8::RetainedObjectInfo* info); |
| 482 void SetNativeRootReference(v8::RetainedObjectInfo* info); | 484 void SetNativeRootReference(v8::RetainedObjectInfo* info); |
| 483 void SetRootNativeRootsReference(); | 485 void SetRootNativeRootsReference(); |
| 484 void SetWrapperNativeReferences(HeapObject* wrapper, | 486 void SetWrapperNativeReferences(HeapObject* wrapper, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 friend class HeapSnapshotJSONSerializerEnumerator; | 605 friend class HeapSnapshotJSONSerializerEnumerator; |
| 604 friend class HeapSnapshotJSONSerializerIterator; | 606 friend class HeapSnapshotJSONSerializerIterator; |
| 605 | 607 |
| 606 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 608 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
| 607 }; | 609 }; |
| 608 | 610 |
| 609 | 611 |
| 610 } } // namespace v8::internal | 612 } } // namespace v8::internal |
| 611 | 613 |
| 612 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ | 614 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ |
| OLD | NEW |