| 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); | |
| 336 int EstimateObjectsCount(HeapIterator* iterator); | 335 int EstimateObjectsCount(HeapIterator* iterator); |
| 337 bool IterateAndExtractReferences(SnapshotFiller* filler); | 336 bool IterateAndExtractReferences(SnapshotFiller* filler); |
| 338 void TagGlobalObjects(); | 337 void TagGlobalObjects(); |
| 339 void TagCodeObject(Code* code); | 338 void TagCodeObject(Code* code); |
| 340 void TagBuiltinCodeObject(Code* code, const char* name); | 339 void TagBuiltinCodeObject(Code* code, const char* name); |
| 341 HeapEntry* AddEntry(Address address, | 340 HeapEntry* AddEntry(Address address, |
| 342 HeapEntry::Type type, | 341 HeapEntry::Type type, |
| 343 const char* name, | 342 const char* name, |
| 344 size_t size); | 343 size_t size); |
| 345 | 344 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 | 465 |
| 467 class NativeGroupRetainedObjectInfo; | 466 class NativeGroupRetainedObjectInfo; |
| 468 | 467 |
| 469 | 468 |
| 470 // An implementation of retained native objects extractor. | 469 // An implementation of retained native objects extractor. |
| 471 class NativeObjectsExplorer { | 470 class NativeObjectsExplorer { |
| 472 public: | 471 public: |
| 473 NativeObjectsExplorer(HeapSnapshot* snapshot, | 472 NativeObjectsExplorer(HeapSnapshot* snapshot, |
| 474 SnapshottingProgressReportingInterface* progress); | 473 SnapshottingProgressReportingInterface* progress); |
| 475 virtual ~NativeObjectsExplorer(); | 474 virtual ~NativeObjectsExplorer(); |
| 476 void AddRootEntries(SnapshotFiller* filler); | |
| 477 int EstimateObjectsCount(); | 475 int EstimateObjectsCount(); |
| 478 bool IterateAndExtractReferences(SnapshotFiller* filler); | 476 bool IterateAndExtractReferences(SnapshotFiller* filler); |
| 479 | 477 |
| 480 private: | 478 private: |
| 481 void FillRetainedObjects(); | 479 void FillRetainedObjects(); |
| 482 void FillImplicitReferences(); | 480 void FillImplicitReferences(); |
| 483 List<HeapObject*>* GetListMaybeDisposeInfo(v8::RetainedObjectInfo* info); | 481 List<HeapObject*>* GetListMaybeDisposeInfo(v8::RetainedObjectInfo* info); |
| 484 void SetNativeRootReference(v8::RetainedObjectInfo* info); | 482 void SetNativeRootReference(v8::RetainedObjectInfo* info); |
| 485 void SetRootNativeRootsReference(); | 483 void SetRootNativeRootsReference(); |
| 486 void SetWrapperNativeReferences(HeapObject* wrapper, | 484 void SetWrapperNativeReferences(HeapObject* wrapper, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 friend class HeapSnapshotJSONSerializerEnumerator; | 603 friend class HeapSnapshotJSONSerializerEnumerator; |
| 606 friend class HeapSnapshotJSONSerializerIterator; | 604 friend class HeapSnapshotJSONSerializerIterator; |
| 607 | 605 |
| 608 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 606 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
| 609 }; | 607 }; |
| 610 | 608 |
| 611 | 609 |
| 612 } } // namespace v8::internal | 610 } } // namespace v8::internal |
| 613 | 611 |
| 614 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ | 612 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ |
| OLD | NEW |