| 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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 // Last hope GC, should try to squeeze as much as possible. | 871 // Last hope GC, should try to squeeze as much as possible. |
| 872 void CollectAllAvailableGarbage(); | 872 void CollectAllAvailableGarbage(); |
| 873 | 873 |
| 874 // Notify the heap that a context has been disposed. | 874 // Notify the heap that a context has been disposed. |
| 875 int NotifyContextDisposed() { return ++contexts_disposed_; } | 875 int NotifyContextDisposed() { return ++contexts_disposed_; } |
| 876 | 876 |
| 877 // Utility to invoke the scavenger. This is needed in test code to | 877 // Utility to invoke the scavenger. This is needed in test code to |
| 878 // ensure correct callback for weak global handles. | 878 // ensure correct callback for weak global handles. |
| 879 void PerformScavenge(); | 879 void PerformScavenge(); |
| 880 | 880 |
| 881 inline void increment_scan_on_scavenge_pages() { |
| 882 scan_on_scavenge_pages_++; |
| 883 } |
| 884 |
| 885 inline void decrement_scan_on_scavenge_pages() { |
| 886 scan_on_scavenge_pages_--; |
| 887 } |
| 888 |
| 881 PromotionQueue* promotion_queue() { return &promotion_queue_; } | 889 PromotionQueue* promotion_queue() { return &promotion_queue_; } |
| 882 | 890 |
| 883 #ifdef DEBUG | 891 #ifdef DEBUG |
| 884 // Utility used with flag gc-greedy. | 892 // Utility used with flag gc-greedy. |
| 885 void GarbageCollectionGreedyCheck(); | 893 void GarbageCollectionGreedyCheck(); |
| 886 #endif | 894 #endif |
| 887 | 895 |
| 888 void AddGCPrologueCallback( | 896 void AddGCPrologueCallback( |
| 889 GCEpilogueCallback callback, GCType gc_type_filter); | 897 GCEpilogueCallback callback, GCType gc_type_filter); |
| 890 void RemoveGCPrologueCallback(GCEpilogueCallback callback); | 898 void RemoveGCPrologueCallback(GCEpilogueCallback callback); |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1316 // For keeping track of how much data has survived | 1324 // For keeping track of how much data has survived |
| 1317 // scavenge since last new space expansion. | 1325 // scavenge since last new space expansion. |
| 1318 int survived_since_last_expansion_; | 1326 int survived_since_last_expansion_; |
| 1319 | 1327 |
| 1320 int always_allocate_scope_depth_; | 1328 int always_allocate_scope_depth_; |
| 1321 int linear_allocation_scope_depth_; | 1329 int linear_allocation_scope_depth_; |
| 1322 | 1330 |
| 1323 // For keeping track of context disposals. | 1331 // For keeping track of context disposals. |
| 1324 int contexts_disposed_; | 1332 int contexts_disposed_; |
| 1325 | 1333 |
| 1334 int scan_on_scavenge_pages_; |
| 1335 |
| 1326 #if defined(V8_TARGET_ARCH_X64) | 1336 #if defined(V8_TARGET_ARCH_X64) |
| 1327 static const int kMaxObjectSizeInNewSpace = 1024*KB; | 1337 static const int kMaxObjectSizeInNewSpace = 1024*KB; |
| 1328 #else | 1338 #else |
| 1329 static const int kMaxObjectSizeInNewSpace = 512*KB; | 1339 static const int kMaxObjectSizeInNewSpace = 512*KB; |
| 1330 #endif | 1340 #endif |
| 1331 | 1341 |
| 1332 NewSpace new_space_; | 1342 NewSpace new_space_; |
| 1333 OldSpace* old_pointer_space_; | 1343 OldSpace* old_pointer_space_; |
| 1334 OldSpace* old_data_space_; | 1344 OldSpace* old_data_space_; |
| 1335 OldSpace* code_space_; | 1345 OldSpace* code_space_; |
| (...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2317 | 2327 |
| 2318 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2328 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2319 }; | 2329 }; |
| 2320 #endif // DEBUG || LIVE_OBJECT_LIST | 2330 #endif // DEBUG || LIVE_OBJECT_LIST |
| 2321 | 2331 |
| 2322 } } // namespace v8::internal | 2332 } } // namespace v8::internal |
| 2323 | 2333 |
| 2324 #undef HEAP | 2334 #undef HEAP |
| 2325 | 2335 |
| 2326 #endif // V8_HEAP_H_ | 2336 #endif // V8_HEAP_H_ |
| OLD | NEW |