OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_GLOBAL_HANDLES_H_ | 5 #ifndef V8_GLOBAL_HANDLES_H_ |
6 #define V8_GLOBAL_HANDLES_H_ | 6 #define V8_GLOBAL_HANDLES_H_ |
7 | 7 |
8 #include "include/v8.h" | 8 #include "include/v8.h" |
9 #include "include/v8-profiler.h" | 9 #include "include/v8-profiler.h" |
10 | 10 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 235 |
236 // Identify unmodified objects that are in weak state and marks them | 236 // Identify unmodified objects that are in weak state and marks them |
237 // unmodified | 237 // unmodified |
238 void IdentifyWeakUnmodifiedObjects(WeakSlotCallback is_unmodified); | 238 void IdentifyWeakUnmodifiedObjects(WeakSlotCallback is_unmodified); |
239 | 239 |
240 // Iterate over objects in object groups that have at least one object | 240 // Iterate over objects in object groups that have at least one object |
241 // which requires visiting. The callback has to return true if objects | 241 // which requires visiting. The callback has to return true if objects |
242 // can be skipped and false otherwise. | 242 // can be skipped and false otherwise. |
243 bool IterateObjectGroups(ObjectVisitor* v, WeakSlotCallbackWithHeap can_skip); | 243 bool IterateObjectGroups(ObjectVisitor* v, WeakSlotCallbackWithHeap can_skip); |
244 | 244 |
| 245 // Print all objects in object groups |
| 246 void PrintObjectGroups(); |
| 247 |
245 // Add an object group. | 248 // Add an object group. |
246 // Should be only used in GC callback function before a collection. | 249 // Should be only used in GC callback function before a collection. |
247 // All groups are destroyed after a garbage collection. | 250 // All groups are destroyed after a garbage collection. |
248 void AddObjectGroup(Object*** handles, | 251 void AddObjectGroup(Object*** handles, |
249 size_t length, | 252 size_t length, |
250 v8::RetainedObjectInfo* info); | 253 v8::RetainedObjectInfo* info); |
251 | 254 |
252 // Associates handle with the object group represented by id. | 255 // Associates handle with the object group represented by id. |
253 // Should be only used in GC callback function before a collection. | 256 // Should be only used in GC callback function before a collection. |
254 // All groups are destroyed after a garbage collection. | 257 // All groups are destroyed after a garbage collection. |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; | 455 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; |
453 | 456 |
454 DISALLOW_COPY_AND_ASSIGN(EternalHandles); | 457 DISALLOW_COPY_AND_ASSIGN(EternalHandles); |
455 }; | 458 }; |
456 | 459 |
457 | 460 |
458 } // namespace internal | 461 } // namespace internal |
459 } // namespace v8 | 462 } // namespace v8 |
460 | 463 |
461 #endif // V8_GLOBAL_HANDLES_H_ | 464 #endif // V8_GLOBAL_HANDLES_H_ |
OLD | NEW |