OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1369 void set_native_contexts_list(Object* object) { | 1369 void set_native_contexts_list(Object* object) { |
1370 native_contexts_list_ = object; | 1370 native_contexts_list_ = object; |
1371 } | 1371 } |
1372 Object* native_contexts_list() { return native_contexts_list_; } | 1372 Object* native_contexts_list() { return native_contexts_list_; } |
1373 | 1373 |
1374 void set_array_buffers_list(Object* object) { | 1374 void set_array_buffers_list(Object* object) { |
1375 array_buffers_list_ = object; | 1375 array_buffers_list_ = object; |
1376 } | 1376 } |
1377 Object* array_buffers_list() { return array_buffers_list_; } | 1377 Object* array_buffers_list() { return array_buffers_list_; } |
1378 | 1378 |
| 1379 void set_allocation_sites_list(Object* object) { |
| 1380 allocation_sites_list_ = object; |
| 1381 } |
| 1382 Object* allocation_sites_list() { return allocation_sites_list_; } |
| 1383 Object** allocation_sites_list_address() { return &allocation_sites_list_; } |
1379 | 1384 |
1380 // Number of mark-sweeps. | 1385 // Number of mark-sweeps. |
1381 unsigned int ms_count() { return ms_count_; } | 1386 unsigned int ms_count() { return ms_count_; } |
1382 | 1387 |
1383 // Iterates over all roots in the heap. | 1388 // Iterates over all roots in the heap. |
1384 void IterateRoots(ObjectVisitor* v, VisitMode mode); | 1389 void IterateRoots(ObjectVisitor* v, VisitMode mode); |
1385 // Iterates over all strong roots in the heap. | 1390 // Iterates over all strong roots in the heap. |
1386 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode); | 1391 void IterateStrongRoots(ObjectVisitor* v, VisitMode mode); |
1387 // Iterates over all the other roots in the heap. | 1392 // Iterates over all the other roots in the heap. |
1388 void IterateWeakRoots(ObjectVisitor* v, VisitMode mode); | 1393 void IterateWeakRoots(ObjectVisitor* v, VisitMode mode); |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2038 // by global handles | 2043 // by global handles |
2039 intptr_t amount_of_external_allocated_memory_; | 2044 intptr_t amount_of_external_allocated_memory_; |
2040 | 2045 |
2041 // Caches the amount of external memory registered at the last global gc. | 2046 // Caches the amount of external memory registered at the last global gc. |
2042 intptr_t amount_of_external_allocated_memory_at_last_global_gc_; | 2047 intptr_t amount_of_external_allocated_memory_at_last_global_gc_; |
2043 | 2048 |
2044 // Indicates that an allocation has failed in the old generation since the | 2049 // Indicates that an allocation has failed in the old generation since the |
2045 // last GC. | 2050 // last GC. |
2046 bool old_gen_exhausted_; | 2051 bool old_gen_exhausted_; |
2047 | 2052 |
| 2053 // Weak list heads, threaded through the objects. |
2048 Object* native_contexts_list_; | 2054 Object* native_contexts_list_; |
2049 | |
2050 Object* array_buffers_list_; | 2055 Object* array_buffers_list_; |
| 2056 Object* allocation_sites_list_; |
2051 | 2057 |
2052 StoreBufferRebuilder store_buffer_rebuilder_; | 2058 StoreBufferRebuilder store_buffer_rebuilder_; |
2053 | 2059 |
2054 struct StringTypeTable { | 2060 struct StringTypeTable { |
2055 InstanceType type; | 2061 InstanceType type; |
2056 int size; | 2062 int size; |
2057 RootListIndex index; | 2063 RootListIndex index; |
2058 }; | 2064 }; |
2059 | 2065 |
2060 struct ConstantStringTable { | 2066 struct ConstantStringTable { |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2190 StoreBufferEvent event); | 2196 StoreBufferEvent event); |
2191 | 2197 |
2192 // Performs a major collection in the whole heap. | 2198 // Performs a major collection in the whole heap. |
2193 void MarkCompact(GCTracer* tracer); | 2199 void MarkCompact(GCTracer* tracer); |
2194 | 2200 |
2195 // Code to be run before and after mark-compact. | 2201 // Code to be run before and after mark-compact. |
2196 void MarkCompactPrologue(); | 2202 void MarkCompactPrologue(); |
2197 | 2203 |
2198 void ProcessNativeContexts(WeakObjectRetainer* retainer, bool record_slots); | 2204 void ProcessNativeContexts(WeakObjectRetainer* retainer, bool record_slots); |
2199 void ProcessArrayBuffers(WeakObjectRetainer* retainer, bool record_slots); | 2205 void ProcessArrayBuffers(WeakObjectRetainer* retainer, bool record_slots); |
| 2206 void ProcessAllocationSites(WeakObjectRetainer* retainer, bool record_slots); |
2200 | 2207 |
2201 // Called on heap tear-down. | 2208 // Called on heap tear-down. |
2202 void TearDownArrayBuffers(); | 2209 void TearDownArrayBuffers(); |
2203 | 2210 |
2204 // Record statistics before and after garbage collection. | 2211 // Record statistics before and after garbage collection. |
2205 void ReportStatisticsBeforeGC(); | 2212 void ReportStatisticsBeforeGC(); |
2206 void ReportStatisticsAfterGC(); | 2213 void ReportStatisticsAfterGC(); |
2207 | 2214 |
2208 // Slow part of scavenge object. | 2215 // Slow part of scavenge object. |
2209 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); | 2216 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); |
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3087 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3094 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3088 | 3095 |
3089 private: | 3096 private: |
3090 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3097 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3091 }; | 3098 }; |
3092 #endif // DEBUG | 3099 #endif // DEBUG |
3093 | 3100 |
3094 } } // namespace v8::internal | 3101 } } // namespace v8::internal |
3095 | 3102 |
3096 #endif // V8_HEAP_H_ | 3103 #endif // V8_HEAP_H_ |
OLD | NEW |