OLD | NEW |
---|---|
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
432 | 432 |
433 | 433 |
434 class HeapEntry; | 434 class HeapEntry; |
435 | 435 |
436 class HeapGraphEdge BASE_EMBEDDED { | 436 class HeapGraphEdge BASE_EMBEDDED { |
437 public: | 437 public: |
438 enum Type { | 438 enum Type { |
439 kContextVariable = v8::HeapGraphEdge::kContextVariable, | 439 kContextVariable = v8::HeapGraphEdge::kContextVariable, |
440 kElement = v8::HeapGraphEdge::kElement, | 440 kElement = v8::HeapGraphEdge::kElement, |
441 kProperty = v8::HeapGraphEdge::kProperty, | 441 kProperty = v8::HeapGraphEdge::kProperty, |
442 kInternal = v8::HeapGraphEdge::kInternal | 442 kInternal = v8::HeapGraphEdge::kInternal, |
443 kHidden = v8::HeapGraphEdge::kHidden, | |
444 kShortcut = v8::HeapGraphEdge::kShortcut | |
443 }; | 445 }; |
444 | 446 |
445 HeapGraphEdge() { } | 447 HeapGraphEdge() { } |
446 void Init(int child_index, Type type, const char* name, HeapEntry* to); | 448 void Init(int child_index, Type type, const char* name, HeapEntry* to); |
449 void Init(int child_index, Type type, int index, HeapEntry* to); | |
447 void Init(int child_index, int index, HeapEntry* to); | 450 void Init(int child_index, int index, HeapEntry* to); |
448 | 451 |
449 Type type() { return static_cast<Type>(type_); } | 452 Type type() { return static_cast<Type>(type_); } |
450 int index() { | 453 int index() { |
451 ASSERT(type_ == kElement); | 454 ASSERT(type_ == kElement || type_ == kHidden); |
452 return index_; | 455 return index_; |
453 } | 456 } |
454 const char* name() { | 457 const char* name() { |
455 ASSERT(type_ == kContextVariable | 458 ASSERT(type_ == kContextVariable |
456 || type_ == kProperty | 459 || type_ == kProperty |
457 || type_ == kInternal); | 460 || type_ == kInternal |
461 || type_ == kShortcut); | |
458 return name_; | 462 return name_; |
459 } | 463 } |
460 HeapEntry* to() { return to_; } | 464 HeapEntry* to() { return to_; } |
461 | 465 |
462 HeapEntry* From(); | 466 HeapEntry* From(); |
463 | 467 |
464 private: | 468 private: |
465 int child_index_ : 30; | 469 int child_index_ : 29; |
466 unsigned type_ : 2; | 470 unsigned type_ : 3; |
467 union { | 471 union { |
468 int index_; | 472 int index_; |
469 const char* name_; | 473 const char* name_; |
470 }; | 474 }; |
471 HeapEntry* to_; | 475 HeapEntry* to_; |
472 | 476 |
473 DISALLOW_COPY_AND_ASSIGN(HeapGraphEdge); | 477 DISALLOW_COPY_AND_ASSIGN(HeapGraphEdge); |
474 }; | 478 }; |
475 | 479 |
476 | 480 |
(...skipping 16 matching lines...) Expand all Loading... | |
493 // ... } retainers_count | 497 // ... } retainers_count |
494 // HeapGraphEdge* | | 498 // HeapGraphEdge* | |
495 // +-----------------+ | 499 // +-----------------+ |
496 // | 500 // |
497 // In a HeapSnapshot, all entries are hand-allocated in a continuous array | 501 // In a HeapSnapshot, all entries are hand-allocated in a continuous array |
498 // of raw bytes. | 502 // of raw bytes. |
499 // | 503 // |
500 class HeapEntry BASE_EMBEDDED { | 504 class HeapEntry BASE_EMBEDDED { |
501 public: | 505 public: |
502 enum Type { | 506 enum Type { |
503 kInternal = v8::HeapGraphNode::kInternal, | 507 kHidden = v8::HeapGraphNode::kHidden, |
504 kArray = v8::HeapGraphNode::kArray, | 508 kArray = v8::HeapGraphNode::kArray, |
505 kString = v8::HeapGraphNode::kString, | 509 kString = v8::HeapGraphNode::kString, |
506 kObject = v8::HeapGraphNode::kObject, | 510 kObject = v8::HeapGraphNode::kObject, |
507 kCode = v8::HeapGraphNode::kCode, | 511 kCode = v8::HeapGraphNode::kCode, |
508 kClosure = v8::HeapGraphNode::kClosure, | 512 kClosure = v8::HeapGraphNode::kClosure, |
509 kRegExp = v8::HeapGraphNode::kRegExp, | 513 kRegExp = v8::HeapGraphNode::kRegExp, |
510 kHeapNumber = v8::HeapGraphNode::kHeapNumber | 514 kHeapNumber = v8::HeapGraphNode::kHeapNumber |
511 }; | 515 }; |
512 | 516 |
513 HeapEntry() { } | 517 HeapEntry() { } |
(...skipping 26 matching lines...) Expand all Loading... | |
540 bool not_painted_reachable_from_others() { | 544 bool not_painted_reachable_from_others() { |
541 return painted_ != kPaintedReachableFromOthers; | 545 return painted_ != kPaintedReachableFromOthers; |
542 } | 546 } |
543 void paint_reachable_from_others() { | 547 void paint_reachable_from_others() { |
544 painted_ = kPaintedReachableFromOthers; | 548 painted_ = kPaintedReachableFromOthers; |
545 } | 549 } |
546 template<class Visitor> | 550 template<class Visitor> |
547 void ApplyAndPaintAllReachable(Visitor* visitor); | 551 void ApplyAndPaintAllReachable(Visitor* visitor); |
548 void PaintAllReachable(); | 552 void PaintAllReachable(); |
549 | 553 |
550 void SetElementReference( | 554 void SetIndexedReference(HeapGraphEdge::Type type, |
551 int child_index, int index, HeapEntry* entry, int retainer_index); | 555 int child_index, |
556 int index, | |
557 HeapEntry* entry, | |
558 int retainer_index); | |
552 void SetNamedReference(HeapGraphEdge::Type type, | 559 void SetNamedReference(HeapGraphEdge::Type type, |
553 int child_index, | 560 int child_index, |
554 const char* name, | 561 const char* name, |
555 HeapEntry* entry, | 562 HeapEntry* entry, |
556 int retainer_index); | 563 int retainer_index); |
557 void SetUnidirElementReference(int child_index, int index, HeapEntry* entry); | 564 void SetUnidirElementReference(int child_index, int index, HeapEntry* entry); |
558 | 565 |
559 int EntrySize() { return EntriesSize(1, children_count_, retainers_count_); } | 566 int EntrySize() { return EntriesSize(1, children_count_, retainers_count_); } |
560 int ReachableSize(); | 567 int ReachableSize(); |
561 int RetainedSize(); | 568 int RetainedSize(); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
661 Type type, | 668 Type type, |
662 const char* title, | 669 const char* title, |
663 unsigned uid); | 670 unsigned uid); |
664 ~HeapSnapshot(); | 671 ~HeapSnapshot(); |
665 | 672 |
666 HeapSnapshotsCollection* collection() { return collection_; } | 673 HeapSnapshotsCollection* collection() { return collection_; } |
667 Type type() { return type_; } | 674 Type type() { return type_; } |
668 const char* title() { return title_; } | 675 const char* title() { return title_; } |
669 unsigned uid() { return uid_; } | 676 unsigned uid() { return uid_; } |
670 HeapEntry* root() { return root_entry_; } | 677 HeapEntry* root() { return root_entry_; } |
678 HeapEntry* gc_roots() { return gc_roots_entry_; } | |
671 | 679 |
672 void AllocateEntries( | 680 void AllocateEntries( |
673 int entries_count, int children_count, int retainers_count); | 681 int entries_count, int children_count, int retainers_count); |
674 HeapEntry* AddEntry( | 682 HeapEntry* AddEntry( |
675 HeapObject* object, int children_count, int retainers_count); | 683 HeapObject* object, int children_count, int retainers_count); |
676 bool WillAddEntry(HeapObject* object); | |
677 HeapEntry* AddEntry(HeapEntry::Type type, | 684 HeapEntry* AddEntry(HeapEntry::Type type, |
678 const char* name, | 685 const char* name, |
679 uint64_t id, | 686 uint64_t id, |
680 int size, | 687 int size, |
681 int children_count, | 688 int children_count, |
682 int retainers_count); | 689 int retainers_count); |
683 int AddCalculatedData(); | 690 int AddCalculatedData(); |
684 HeapEntryCalculatedData& GetCalculatedData(int index) { | 691 HeapEntryCalculatedData& GetCalculatedData(int index) { |
685 return calculated_data_[index]; | 692 return calculated_data_[index]; |
686 } | 693 } |
687 void ClearPaint(); | 694 void ClearPaint(); |
688 HeapSnapshotsDiff* CompareWith(HeapSnapshot* snapshot); | 695 HeapSnapshotsDiff* CompareWith(HeapSnapshot* snapshot); |
689 List<HeapEntry*>* GetSortedEntriesList(); | 696 List<HeapEntry*>* GetSortedEntriesList(); |
690 template<class Visitor> | 697 template<class Visitor> |
691 void IterateEntries(Visitor* visitor) { entries_.Iterate(visitor); } | 698 void IterateEntries(Visitor* visitor) { entries_.Iterate(visitor); } |
692 | 699 |
693 void Print(int max_depth); | 700 void Print(int max_depth); |
694 void PrintEntriesSize(); | 701 void PrintEntriesSize(); |
695 | 702 |
696 static HeapObject *const kInternalRootObject; | 703 static HeapObject *const kInternalRootObject; |
Søren Thygesen Gjesse
2010/11/18 08:14:54
Move * closer to HeapObject.
mnaganov (inactive)
2010/11/18 10:32:51
Done.
| |
704 static HeapObject *const kGcRootsObject; | |
697 | 705 |
698 private: | 706 private: |
699 HeapEntry* AddEntry(HeapObject* object, | 707 HeapEntry* AddEntry(HeapObject* object, |
700 HeapEntry::Type type, | 708 HeapEntry::Type type, |
701 const char* name, | 709 const char* name, |
702 int children_count, | 710 int children_count, |
703 int retainers_count); | 711 int retainers_count); |
704 HeapEntry* GetNextEntryToInit(); | 712 HeapEntry* GetNextEntryToInit(); |
705 static int GetObjectSize(HeapObject* obj); | |
706 static int CalculateNetworkSize(JSObject* obj); | |
707 | 713 |
708 HeapSnapshotsCollection* collection_; | 714 HeapSnapshotsCollection* collection_; |
709 Type type_; | 715 Type type_; |
710 const char* title_; | 716 const char* title_; |
711 unsigned uid_; | 717 unsigned uid_; |
712 HeapEntry* root_entry_; | 718 HeapEntry* root_entry_; |
719 HeapEntry* gc_roots_entry_; | |
713 char* raw_entries_; | 720 char* raw_entries_; |
714 List<HeapEntry*> entries_; | 721 List<HeapEntry*> entries_; |
715 bool entries_sorted_; | 722 bool entries_sorted_; |
716 List<HeapEntryCalculatedData> calculated_data_; | 723 List<HeapEntryCalculatedData> calculated_data_; |
717 #ifdef DEBUG | 724 #ifdef DEBUG |
718 int raw_entries_size_; | 725 int raw_entries_size_; |
719 #endif | 726 #endif |
720 | 727 |
721 friend class HeapSnapshotTester; | 728 friend class HeapSnapshotTester; |
722 | 729 |
723 DISALLOW_COPY_AND_ASSIGN(HeapSnapshot); | 730 DISALLOW_COPY_AND_ASSIGN(HeapSnapshot); |
724 }; | 731 }; |
725 | 732 |
726 | 733 |
727 class HeapObjectsMap { | 734 class HeapObjectsMap { |
728 public: | 735 public: |
729 HeapObjectsMap(); | 736 HeapObjectsMap(); |
730 ~HeapObjectsMap(); | 737 ~HeapObjectsMap(); |
731 | 738 |
732 void SnapshotGenerationFinished(); | 739 void SnapshotGenerationFinished(); |
733 uint64_t FindObject(Address addr); | 740 uint64_t FindObject(Address addr); |
734 void MoveObject(Address from, Address to); | 741 void MoveObject(Address from, Address to); |
735 | 742 |
743 static const uint64_t kInternalRootObjectId; | |
744 static const uint64_t kGcRootsObjectId; | |
745 | |
736 private: | 746 private: |
737 struct EntryInfo { | 747 struct EntryInfo { |
738 explicit EntryInfo(uint64_t id) : id(id), accessed(true) { } | 748 explicit EntryInfo(uint64_t id) : id(id), accessed(true) { } |
739 EntryInfo(uint64_t id, bool accessed) : id(id), accessed(accessed) { } | 749 EntryInfo(uint64_t id, bool accessed) : id(id), accessed(accessed) { } |
740 uint64_t id; | 750 uint64_t id; |
741 bool accessed; | 751 bool accessed; |
742 }; | 752 }; |
743 | 753 |
744 void AddEntry(Address addr, uint64_t id); | 754 void AddEntry(Address addr, uint64_t id); |
745 uint64_t FindEntry(Address addr); | 755 uint64_t FindEntry(Address addr); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
861 }; | 871 }; |
862 | 872 |
863 | 873 |
864 // The HeapEntriesMap instance is used to track a mapping between | 874 // The HeapEntriesMap instance is used to track a mapping between |
865 // real heap objects and their representations in heap snapshots. | 875 // real heap objects and their representations in heap snapshots. |
866 class HeapEntriesMap { | 876 class HeapEntriesMap { |
867 public: | 877 public: |
868 HeapEntriesMap(); | 878 HeapEntriesMap(); |
869 ~HeapEntriesMap(); | 879 ~HeapEntriesMap(); |
870 | 880 |
871 // Aliasing is used for skipping intermediate proxy objects, like | |
872 // JSGlobalPropertyCell. | |
873 void Alias(HeapObject* from, HeapObject* to); | |
874 HeapEntry* Map(HeapObject* object); | 881 HeapEntry* Map(HeapObject* object); |
875 void Pair(HeapObject* object, HeapEntry* entry); | 882 void Pair(HeapObject* object, HeapEntry* entry); |
876 void CountReference(HeapObject* from, HeapObject* to, | 883 void CountReference(HeapObject* from, HeapObject* to, |
877 int* prev_children_count = NULL, | 884 int* prev_children_count = NULL, |
878 int* prev_retainers_count = NULL); | 885 int* prev_retainers_count = NULL); |
879 template<class Visitor> | 886 template<class Visitor> |
880 void UpdateEntries(Visitor* visitor); | 887 void UpdateEntries(Visitor* visitor); |
881 | 888 |
882 int entries_count() { return entries_count_; } | 889 int entries_count() { return entries_count_; } |
883 int total_children_count() { return total_children_count_; } | 890 int total_children_count() { return total_children_count_; } |
884 int total_retainers_count() { return total_retainers_count_; } | 891 int total_retainers_count() { return total_retainers_count_; } |
885 | 892 |
886 static HeapEntry *const kHeapEntryPlaceholder; | 893 static HeapEntry *const kHeapEntryPlaceholder; |
887 | 894 |
888 private: | 895 private: |
889 struct EntryInfo { | 896 struct EntryInfo { |
890 explicit EntryInfo(HeapEntry* entry) | 897 explicit EntryInfo(HeapEntry* entry) |
891 : entry(entry), children_count(0), retainers_count(0) { } | 898 : entry(entry), children_count(0), retainers_count(0) { } |
892 HeapEntry* entry; | 899 HeapEntry* entry; |
893 int children_count; | 900 int children_count; |
894 int retainers_count; | 901 int retainers_count; |
895 }; | 902 }; |
896 | 903 |
897 uint32_t Hash(HeapObject* object) { | 904 static uint32_t Hash(HeapObject* object) { |
898 return ComputeIntegerHash( | 905 return ComputeIntegerHash( |
899 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(object))); | 906 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(object))); |
900 } | 907 } |
901 static bool HeapObjectsMatch(void* key1, void* key2) { return key1 == key2; } | 908 static bool HeapObjectsMatch(void* key1, void* key2) { return key1 == key2; } |
902 | 909 |
903 bool IsAlias(void* ptr) { | |
904 return reinterpret_cast<intptr_t>(ptr) & kAliasTag; | |
905 } | |
906 void* MakeAlias(void* ptr) { | |
907 return reinterpret_cast<void*>(reinterpret_cast<intptr_t>(ptr) | kAliasTag); | |
908 } | |
909 void* Unalias(void* ptr) { | |
910 return reinterpret_cast<void*>( | |
911 reinterpret_cast<intptr_t>(ptr) & (~kAliasTag)); | |
912 } | |
913 | |
914 HashMap entries_; | 910 HashMap entries_; |
915 int entries_count_; | 911 int entries_count_; |
916 int total_children_count_; | 912 int total_children_count_; |
917 int total_retainers_count_; | 913 int total_retainers_count_; |
918 | 914 |
919 static const intptr_t kAliasTag = 1; | 915 friend class HeapObjectsSet; |
920 | 916 |
921 DISALLOW_COPY_AND_ASSIGN(HeapEntriesMap); | 917 DISALLOW_COPY_AND_ASSIGN(HeapEntriesMap); |
922 }; | 918 }; |
923 | 919 |
924 | 920 |
921 class HeapObjectsSet { | |
922 public: | |
923 HeapObjectsSet(); | |
924 void Clear(); | |
925 bool Contains(Object* object); | |
926 void Insert(Object* obj); | |
927 | |
928 private: | |
929 HashMap entries_; | |
930 | |
931 DISALLOW_COPY_AND_ASSIGN(HeapObjectsSet); | |
932 }; | |
933 | |
934 | |
925 class HeapSnapshotGenerator { | 935 class HeapSnapshotGenerator { |
926 public: | 936 public: |
927 class SnapshotFillerInterface { | 937 class SnapshotFillerInterface { |
928 public: | 938 public: |
929 virtual ~SnapshotFillerInterface() { } | 939 virtual ~SnapshotFillerInterface() { } |
930 virtual HeapEntry* AddEntry(HeapObject* obj) = 0; | 940 virtual HeapEntry* AddEntry(HeapObject* obj) = 0; |
931 virtual void SetElementReference(HeapObject* parent_obj, | 941 virtual void SetIndexedReference(HeapGraphEdge::Type type, |
942 HeapObject* parent_obj, | |
932 HeapEntry* parent_entry, | 943 HeapEntry* parent_entry, |
933 int index, | 944 int index, |
934 Object* child_obj, | 945 Object* child_obj, |
935 HeapEntry* child_entry) = 0; | 946 HeapEntry* child_entry) = 0; |
936 virtual void SetNamedReference(HeapGraphEdge::Type type, | 947 virtual void SetNamedReference(HeapGraphEdge::Type type, |
937 HeapObject* parent_obj, | 948 HeapObject* parent_obj, |
938 HeapEntry* parent_entry, | 949 HeapEntry* parent_entry, |
939 const char* reference_name, | 950 const char* reference_name, |
940 Object* child_obj, | 951 Object* child_obj, |
941 HeapEntry* child_entry) = 0; | 952 HeapEntry* child_entry) = 0; |
942 virtual void SetRootReference(Object* child_obj, | 953 virtual void SetRootGcRootsReference() = 0; |
943 HeapEntry* child_entry) = 0; | 954 virtual void SetRootShortcutReference(Object* child_obj, |
955 HeapEntry* child_entry) = 0; | |
956 virtual void SetStrongRootReference(Object* child_obj, | |
957 HeapEntry* child_entry) = 0; | |
944 }; | 958 }; |
945 | 959 |
946 explicit HeapSnapshotGenerator(HeapSnapshot* snapshot); | 960 explicit HeapSnapshotGenerator(HeapSnapshot* snapshot); |
947 void GenerateSnapshot(); | 961 void GenerateSnapshot(); |
948 | 962 |
949 private: | 963 private: |
950 HeapEntry* GetEntry(Object* obj); | 964 HeapEntry* GetEntry(Object* obj); |
951 void ExtractReferences(HeapObject* obj); | 965 void ExtractReferences(HeapObject* obj); |
952 void ExtractClosureReferences(JSObject* js_obj, HeapEntry* entry); | 966 void ExtractClosureReferences(JSObject* js_obj, HeapEntry* entry); |
953 void ExtractPropertyReferences(JSObject* js_obj, HeapEntry* entry); | 967 void ExtractPropertyReferences(JSObject* js_obj, HeapEntry* entry); |
954 void ExtractElementReferences(JSObject* js_obj, HeapEntry* entry); | 968 void ExtractElementReferences(JSObject* js_obj, HeapEntry* entry); |
955 void ExtractInternalReferences(JSObject* js_obj, HeapEntry* entry); | 969 void ExtractInternalReferences(JSObject* js_obj, HeapEntry* entry); |
956 void SetClosureReference(HeapObject* parent_obj, | 970 void SetClosureReference(HeapObject* parent_obj, |
957 HeapEntry* parent, | 971 HeapEntry* parent, |
958 String* reference_name, | 972 String* reference_name, |
959 Object* child); | 973 Object* child); |
960 void SetElementReference(HeapObject* parent_obj, | 974 void SetElementReference(HeapObject* parent_obj, |
961 HeapEntry* parent, | 975 HeapEntry* parent, |
962 int index, | 976 int index, |
963 Object* child); | 977 Object* child); |
964 void SetInternalReference(HeapObject* parent_obj, | 978 void SetInternalReference(HeapObject* parent_obj, |
965 HeapEntry* parent, | 979 HeapEntry* parent, |
966 const char* reference_name, | 980 const char* reference_name, |
967 Object* child); | 981 Object* child); |
968 void SetInternalReference(HeapObject* parent_obj, | 982 void SetInternalReference(HeapObject* parent_obj, |
969 HeapEntry* parent, | 983 HeapEntry* parent, |
970 int index, | 984 int index, |
971 Object* child); | 985 Object* child); |
986 void SetHiddenReference(HeapObject* parent_obj, | |
987 HeapEntry* parent, | |
988 int index, | |
989 Object* child); | |
972 void SetPropertyReference(HeapObject* parent_obj, | 990 void SetPropertyReference(HeapObject* parent_obj, |
973 HeapEntry* parent, | 991 HeapEntry* parent, |
974 String* reference_name, | 992 String* reference_name, |
975 Object* child); | 993 Object* child); |
976 void SetRootReference(Object* child); | 994 void SetPropertyShortcutReference(HeapObject* parent_obj, |
995 HeapEntry* parent, | |
996 String* reference_name, | |
997 Object* child); | |
998 void SetRootShortcutReference(Object* child); | |
999 void SetRootGcRootsReference(); | |
1000 void SetGcRootsReference(Object* child); | |
977 | 1001 |
978 HeapSnapshot* snapshot_; | 1002 HeapSnapshot* snapshot_; |
979 HeapSnapshotsCollection* collection_; | 1003 HeapSnapshotsCollection* collection_; |
980 // Mapping from HeapObject* pointers to HeapEntry* pointers. | 1004 // Mapping from HeapObject* pointers to HeapEntry* pointers. |
981 HeapEntriesMap entries_; | 1005 HeapEntriesMap entries_; |
982 SnapshotFillerInterface* filler_; | 1006 SnapshotFillerInterface* filler_; |
1007 // Used during references extraction to mark heap objects that | |
1008 // are references via non-hidden properties. | |
1009 HeapObjectsSet known_references_; | |
983 | 1010 |
984 friend class IndexedReferencesExtractor; | 1011 friend class IndexedReferencesExtractor; |
1012 friend class RootsReferencesExtractor; | |
985 | 1013 |
986 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotGenerator); | 1014 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotGenerator); |
987 }; | 1015 }; |
988 | 1016 |
989 class OutputStreamWriter; | 1017 class OutputStreamWriter; |
990 | 1018 |
991 class HeapSnapshotJSONSerializer { | 1019 class HeapSnapshotJSONSerializer { |
992 public: | 1020 public: |
993 explicit HeapSnapshotJSONSerializer(HeapSnapshot* snapshot) | 1021 explicit HeapSnapshotJSONSerializer(HeapSnapshot* snapshot) |
994 : snapshot_(snapshot), | 1022 : snapshot_(snapshot), |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1033 friend class HeapSnapshotJSONSerializerIterator; | 1061 friend class HeapSnapshotJSONSerializerIterator; |
1034 | 1062 |
1035 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 1063 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
1036 }; | 1064 }; |
1037 | 1065 |
1038 } } // namespace v8::internal | 1066 } } // namespace v8::internal |
1039 | 1067 |
1040 #endif // ENABLE_LOGGING_AND_PROFILING | 1068 #endif // ENABLE_LOGGING_AND_PROFILING |
1041 | 1069 |
1042 #endif // V8_PROFILE_GENERATOR_H_ | 1070 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |