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 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2288 void NativeObjectsExplorer::FillRetainedObjects() { | 2288 void NativeObjectsExplorer::FillRetainedObjects() { |
2289 if (embedder_queried_) return; | 2289 if (embedder_queried_) return; |
2290 Isolate* isolate = Isolate::Current(); | 2290 Isolate* isolate = Isolate::Current(); |
2291 // Record objects that are joined into ObjectGroups. | 2291 // Record objects that are joined into ObjectGroups. |
2292 isolate->heap()->CallGlobalGCPrologueCallback(); | 2292 isolate->heap()->CallGlobalGCPrologueCallback(); |
2293 List<ObjectGroup*>* groups = isolate->global_handles()->object_groups(); | 2293 List<ObjectGroup*>* groups = isolate->global_handles()->object_groups(); |
2294 for (int i = 0; i < groups->length(); ++i) { | 2294 for (int i = 0; i < groups->length(); ++i) { |
2295 ObjectGroup* group = groups->at(i); | 2295 ObjectGroup* group = groups->at(i); |
2296 if (group->info_ == NULL) continue; | 2296 if (group->info_ == NULL) continue; |
2297 List<HeapObject*>* list = GetListMaybeDisposeInfo(group->info_); | 2297 List<HeapObject*>* list = GetListMaybeDisposeInfo(group->info_); |
2298 for (int j = 0; j < group->objects_.length(); ++j) { | 2298 for (size_t j = 0; j < group->length_; ++j) { |
2299 HeapObject* obj = HeapObject::cast(*group->objects_[j]); | 2299 HeapObject* obj = HeapObject::cast(*group->objects_[j]); |
2300 list->Add(obj); | 2300 list->Add(obj); |
2301 in_groups_.Insert(obj); | 2301 in_groups_.Insert(obj); |
2302 } | 2302 } |
2303 group->info_ = NULL; // Acquire info object ownership. | 2303 group->info_ = NULL; // Acquire info object ownership. |
2304 } | 2304 } |
2305 isolate->global_handles()->RemoveObjectGroups(); | 2305 isolate->global_handles()->RemoveObjectGroups(); |
2306 isolate->heap()->CallGlobalGCEpilogueCallback(); | 2306 isolate->heap()->CallGlobalGCEpilogueCallback(); |
2307 // Record objects that are not in ObjectGroups, but have class ID. | 2307 // Record objects that are not in ObjectGroups, but have class ID. |
2308 GlobalHandlesExtractor extractor(this); | 2308 GlobalHandlesExtractor extractor(this); |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3086 | 3086 |
3087 | 3087 |
3088 String* GetConstructorNameForHeapProfile(JSObject* object) { | 3088 String* GetConstructorNameForHeapProfile(JSObject* object) { |
3089 if (object->IsJSFunction()) return HEAP->closure_symbol(); | 3089 if (object->IsJSFunction()) return HEAP->closure_symbol(); |
3090 return object->constructor_name(); | 3090 return object->constructor_name(); |
3091 } | 3091 } |
3092 | 3092 |
3093 } } // namespace v8::internal | 3093 } } // namespace v8::internal |
3094 | 3094 |
3095 #endif // ENABLE_LOGGING_AND_PROFILING | 3095 #endif // ENABLE_LOGGING_AND_PROFILING |
OLD | NEW |