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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 V8HeapExplorer(HeapSnapshot* snapshot, | 914 V8HeapExplorer(HeapSnapshot* snapshot, |
915 SnapshottingProgressReportingInterface* progress); | 915 SnapshottingProgressReportingInterface* progress); |
916 virtual ~V8HeapExplorer(); | 916 virtual ~V8HeapExplorer(); |
917 virtual HeapEntry* AllocateEntry( | 917 virtual HeapEntry* AllocateEntry( |
918 HeapThing ptr, int children_count, int retainers_count); | 918 HeapThing ptr, int children_count, int retainers_count); |
919 void AddRootEntries(SnapshotFillerInterface* filler); | 919 void AddRootEntries(SnapshotFillerInterface* filler); |
920 int EstimateObjectsCount(); | 920 int EstimateObjectsCount(); |
921 bool IterateAndExtractReferences(SnapshotFillerInterface* filler); | 921 bool IterateAndExtractReferences(SnapshotFillerInterface* filler); |
922 void TagGlobalObjects(); | 922 void TagGlobalObjects(); |
923 | 923 |
| 924 static String* GetConstructorName(JSObject* object); |
| 925 |
924 static HeapObject* const kInternalRootObject; | 926 static HeapObject* const kInternalRootObject; |
925 | 927 |
926 private: | 928 private: |
927 HeapEntry* AddEntry( | 929 HeapEntry* AddEntry( |
928 HeapObject* object, int children_count, int retainers_count); | 930 HeapObject* object, int children_count, int retainers_count); |
929 HeapEntry* AddEntry(HeapObject* object, | 931 HeapEntry* AddEntry(HeapObject* object, |
930 HeapEntry::Type type, | 932 HeapEntry::Type type, |
931 const char* name, | 933 const char* name, |
932 int children_count, | 934 int children_count, |
933 int retainers_count); | 935 int retainers_count); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 int next_node_id_; | 1114 int next_node_id_; |
1113 int next_string_id_; | 1115 int next_string_id_; |
1114 OutputStreamWriter* writer_; | 1116 OutputStreamWriter* writer_; |
1115 | 1117 |
1116 friend class HeapSnapshotJSONSerializerEnumerator; | 1118 friend class HeapSnapshotJSONSerializerEnumerator; |
1117 friend class HeapSnapshotJSONSerializerIterator; | 1119 friend class HeapSnapshotJSONSerializerIterator; |
1118 | 1120 |
1119 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 1121 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
1120 }; | 1122 }; |
1121 | 1123 |
1122 | |
1123 String* GetConstructorNameForHeapProfile(JSObject* object); | |
1124 | |
1125 } } // namespace v8::internal | 1124 } } // namespace v8::internal |
1126 | 1125 |
1127 #endif // V8_PROFILE_GENERATOR_H_ | 1126 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |