| OLD | NEW | 
|     1 // Copyright 2011 the V8 project authors. All rights reserved. |     1 // Copyright 2011 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 879 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   890  |   890  | 
|   891  |   891  | 
|   892 class HeapObjectsSet { |   892 class HeapObjectsSet { | 
|   893  public: |   893  public: | 
|   894   HeapObjectsSet(); |   894   HeapObjectsSet(); | 
|   895   void Clear(); |   895   void Clear(); | 
|   896   bool Contains(Object* object); |   896   bool Contains(Object* object); | 
|   897   void Insert(Object* obj); |   897   void Insert(Object* obj); | 
|   898   const char* GetTag(Object* obj); |   898   const char* GetTag(Object* obj); | 
|   899   void SetTag(Object* obj, const char* tag); |   899   void SetTag(Object* obj, const char* tag); | 
 |   900   bool is_empty() const { return entries_.occupancy() == 0; } | 
|   900  |   901  | 
|   901  private: |   902  private: | 
|   902   HashMap entries_; |   903   HashMap entries_; | 
|   903  |   904  | 
|   904   DISALLOW_COPY_AND_ASSIGN(HeapObjectsSet); |   905   DISALLOW_COPY_AND_ASSIGN(HeapObjectsSet); | 
|   905 }; |   906 }; | 
|   906  |   907  | 
|   907  |   908  | 
|   908 // An interface used to populate a snapshot with nodes and edges. |   909 // An interface used to populate a snapshot with nodes and edges. | 
|   909 class SnapshotFillerInterface { |   910 class SnapshotFillerInterface { | 
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1018                             int field_offset = -1); |  1019                             int field_offset = -1); | 
|  1019   void SetPropertyShortcutReference(HeapObject* parent_obj, |  1020   void SetPropertyShortcutReference(HeapObject* parent_obj, | 
|  1020                                     HeapEntry* parent, |  1021                                     HeapEntry* parent, | 
|  1021                                     String* reference_name, |  1022                                     String* reference_name, | 
|  1022                                     Object* child); |  1023                                     Object* child); | 
|  1023   void SetUserGlobalReference(Object* window); |  1024   void SetUserGlobalReference(Object* window); | 
|  1024   void SetRootGcRootsReference(); |  1025   void SetRootGcRootsReference(); | 
|  1025   void SetGcRootsReference(VisitorSynchronization::SyncTag tag); |  1026   void SetGcRootsReference(VisitorSynchronization::SyncTag tag); | 
|  1026   void SetGcSubrootReference( |  1027   void SetGcSubrootReference( | 
|  1027       VisitorSynchronization::SyncTag tag, bool is_weak, Object* child); |  1028       VisitorSynchronization::SyncTag tag, bool is_weak, Object* child); | 
 |  1029   const char* GetStrongGcSubrootName(Object* object); | 
|  1028   void SetObjectName(HeapObject* object); |  1030   void SetObjectName(HeapObject* object); | 
|  1029   void TagObject(Object* obj, const char* tag); |  1031   void TagObject(Object* obj, const char* tag); | 
|  1030  |  1032  | 
|  1031   HeapEntry* GetEntry(Object* obj); |  1033   HeapEntry* GetEntry(Object* obj); | 
|  1032  |  1034  | 
|  1033   static inline HeapObject* GetNthGcSubrootObject(int delta); |  1035   static inline HeapObject* GetNthGcSubrootObject(int delta); | 
|  1034   static inline int GetGcSubrootOrder(HeapObject* subroot); |  1036   static inline int GetGcSubrootOrder(HeapObject* subroot); | 
|  1035  |  1037  | 
|  1036   Heap* heap_; |  1038   Heap* heap_; | 
|  1037   HeapSnapshot* snapshot_; |  1039   HeapSnapshot* snapshot_; | 
|  1038   HeapSnapshotsCollection* collection_; |  1040   HeapSnapshotsCollection* collection_; | 
|  1039   SnapshottingProgressReportingInterface* progress_; |  1041   SnapshottingProgressReportingInterface* progress_; | 
|  1040   SnapshotFillerInterface* filler_; |  1042   SnapshotFillerInterface* filler_; | 
|  1041   HeapObjectsSet objects_tags_; |  1043   HeapObjectsSet objects_tags_; | 
 |  1044   HeapObjectsSet strong_gc_subroot_names_; | 
|  1042  |  1045  | 
|  1043   static HeapObject* const kGcRootsObject; |  1046   static HeapObject* const kGcRootsObject; | 
|  1044   static HeapObject* const kFirstGcSubrootObject; |  1047   static HeapObject* const kFirstGcSubrootObject; | 
|  1045   static HeapObject* const kLastGcSubrootObject; |  1048   static HeapObject* const kLastGcSubrootObject; | 
|  1046  |  1049  | 
|  1047   friend class IndexedReferencesExtractor; |  1050   friend class IndexedReferencesExtractor; | 
|  1048   friend class GcSubrootsEnumerator; |  1051   friend class GcSubrootsEnumerator; | 
|  1049   friend class RootsReferencesExtractor; |  1052   friend class RootsReferencesExtractor; | 
|  1050  |  1053  | 
|  1051   DISALLOW_COPY_AND_ASSIGN(V8HeapExplorer); |  1054   DISALLOW_COPY_AND_ASSIGN(V8HeapExplorer); | 
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1192  |  1195  | 
|  1193   friend class HeapSnapshotJSONSerializerEnumerator; |  1196   friend class HeapSnapshotJSONSerializerEnumerator; | 
|  1194   friend class HeapSnapshotJSONSerializerIterator; |  1197   friend class HeapSnapshotJSONSerializerIterator; | 
|  1195  |  1198  | 
|  1196   DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |  1199   DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 
|  1197 }; |  1200 }; | 
|  1198  |  1201  | 
|  1199 } }  // namespace v8::internal |  1202 } }  // namespace v8::internal | 
|  1200  |  1203  | 
|  1201 #endif  // V8_PROFILE_GENERATOR_H_ |  1204 #endif  // V8_PROFILE_GENERATOR_H_ | 
| OLD | NEW |