Chromium Code Reviews| 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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1012 HeapEntry* AddEntry(HeapObject* object, | 1012 HeapEntry* AddEntry(HeapObject* object, |
| 1013 HeapEntry::Type type, | 1013 HeapEntry::Type type, |
| 1014 const char* name, | 1014 const char* name, |
| 1015 int children_count, | 1015 int children_count, |
| 1016 int retainers_count); | 1016 int retainers_count); |
| 1017 void ExtractReferences(HeapObject* obj); | 1017 void ExtractReferences(HeapObject* obj); |
| 1018 void ExtractClosureReferences(JSObject* js_obj, HeapEntry* entry); | 1018 void ExtractClosureReferences(JSObject* js_obj, HeapEntry* entry); |
| 1019 void ExtractPropertyReferences(JSObject* js_obj, HeapEntry* entry); | 1019 void ExtractPropertyReferences(JSObject* js_obj, HeapEntry* entry); |
| 1020 void ExtractElementReferences(JSObject* js_obj, HeapEntry* entry); | 1020 void ExtractElementReferences(JSObject* js_obj, HeapEntry* entry); |
| 1021 void ExtractInternalReferences(JSObject* js_obj, HeapEntry* entry); | 1021 void ExtractInternalReferences(JSObject* js_obj, HeapEntry* entry); |
| 1022 inline void MarkAsFailure(Address field); | |
|
Vitaly Repeshko
2011/03/17 16:52:00
Usually such functions hide the exact machinery th
mnaganov (inactive)
2011/03/17 17:37:18
I've moved it to IndexedReferencesExtractor and re
| |
| 1022 void SetClosureReference(HeapObject* parent_obj, | 1023 void SetClosureReference(HeapObject* parent_obj, |
| 1023 HeapEntry* parent, | 1024 HeapEntry* parent, |
| 1024 String* reference_name, | 1025 String* reference_name, |
| 1025 Object* child); | 1026 Object* child); |
| 1026 void SetElementReference(HeapObject* parent_obj, | 1027 void SetElementReference(HeapObject* parent_obj, |
| 1027 HeapEntry* parent, | 1028 HeapEntry* parent, |
| 1028 int index, | 1029 int index, |
| 1029 Object* child); | 1030 Object* child); |
| 1030 void SetInternalReference(HeapObject* parent_obj, | 1031 void SetInternalReference(HeapObject* parent_obj, |
| 1031 HeapEntry* parent, | 1032 HeapEntry* parent, |
| 1032 const char* reference_name, | 1033 const char* reference_name, |
| 1033 Object* child); | 1034 Object* child, |
| 1035 Address field = NULL); | |
| 1034 void SetInternalReference(HeapObject* parent_obj, | 1036 void SetInternalReference(HeapObject* parent_obj, |
| 1035 HeapEntry* parent, | 1037 HeapEntry* parent, |
| 1036 int index, | 1038 int index, |
| 1037 Object* child); | 1039 Object* child, |
| 1040 Address field = NULL); | |
| 1038 void SetHiddenReference(HeapObject* parent_obj, | 1041 void SetHiddenReference(HeapObject* parent_obj, |
| 1039 HeapEntry* parent, | 1042 HeapEntry* parent, |
| 1040 int index, | 1043 int index, |
| 1041 Object* child); | 1044 Object* child); |
| 1042 void SetPropertyReference(HeapObject* parent_obj, | 1045 void SetPropertyReference(HeapObject* parent_obj, |
| 1043 HeapEntry* parent, | 1046 HeapEntry* parent, |
| 1044 String* reference_name, | 1047 String* reference_name, |
| 1045 Object* child); | 1048 Object* child, |
| 1049 Address field = NULL); | |
| 1046 void SetPropertyShortcutReference(HeapObject* parent_obj, | 1050 void SetPropertyShortcutReference(HeapObject* parent_obj, |
| 1047 HeapEntry* parent, | 1051 HeapEntry* parent, |
| 1048 String* reference_name, | 1052 String* reference_name, |
| 1049 Object* child); | 1053 Object* child); |
| 1050 void SetRootShortcutReference(Object* child); | 1054 void SetRootShortcutReference(Object* child); |
| 1051 void SetRootGcRootsReference(); | 1055 void SetRootGcRootsReference(); |
| 1052 void SetGcRootsReference(Object* child); | 1056 void SetGcRootsReference(Object* child); |
| 1053 | 1057 |
| 1054 HeapEntry* GetEntry(Object* obj); | 1058 HeapEntry* GetEntry(Object* obj); |
| 1055 | 1059 |
| 1056 HeapSnapshot* snapshot_; | 1060 HeapSnapshot* snapshot_; |
| 1057 HeapSnapshotsCollection* collection_; | 1061 HeapSnapshotsCollection* collection_; |
| 1058 SnapshottingProgressReportingInterface* progress_; | 1062 SnapshottingProgressReportingInterface* progress_; |
| 1059 // Used during references extraction to mark heap objects that | |
| 1060 // are references via non-hidden properties. | |
| 1061 HeapObjectsSet known_references_; | |
| 1062 SnapshotFillerInterface* filler_; | 1063 SnapshotFillerInterface* filler_; |
| 1063 | 1064 |
| 1064 static HeapObject* const kGcRootsObject; | 1065 static HeapObject* const kGcRootsObject; |
| 1065 | 1066 |
| 1066 friend class IndexedReferencesExtractor; | 1067 friend class IndexedReferencesExtractor; |
| 1067 friend class RootsReferencesExtractor; | 1068 friend class RootsReferencesExtractor; |
| 1068 | 1069 |
| 1069 DISALLOW_COPY_AND_ASSIGN(V8HeapExplorer); | 1070 DISALLOW_COPY_AND_ASSIGN(V8HeapExplorer); |
| 1070 }; | 1071 }; |
| 1071 | 1072 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1199 }; | 1200 }; |
| 1200 | 1201 |
| 1201 | 1202 |
| 1202 String* GetConstructorNameForHeapProfile(JSObject* object); | 1203 String* GetConstructorNameForHeapProfile(JSObject* object); |
| 1203 | 1204 |
| 1204 } } // namespace v8::internal | 1205 } } // namespace v8::internal |
| 1205 | 1206 |
| 1206 #endif // ENABLE_LOGGING_AND_PROFILING | 1207 #endif // ENABLE_LOGGING_AND_PROFILING |
| 1207 | 1208 |
| 1208 #endif // V8_PROFILE_GENERATOR_H_ | 1209 #endif // V8_PROFILE_GENERATOR_H_ |
| OLD | NEW |