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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 |
2048 Object* native_contexts_list_; | 2053 Object* native_contexts_list_; |
2049 | 2054 |
2050 Object* array_buffers_list_; | 2055 Object* array_buffers_list_; |
2051 | 2056 |
2057 Object* allocation_sites_list_; | |
Michael Starzinger
2013/07/16 18:14:46
nit: Can we group these three fields together (rem
mvstanton
2013/07/16 19:34:57
Done.
| |
2058 | |
2052 StoreBufferRebuilder store_buffer_rebuilder_; | 2059 StoreBufferRebuilder store_buffer_rebuilder_; |
2053 | 2060 |
2054 struct StringTypeTable { | 2061 struct StringTypeTable { |
2055 InstanceType type; | 2062 InstanceType type; |
2056 int size; | 2063 int size; |
2057 RootListIndex index; | 2064 RootListIndex index; |
2058 }; | 2065 }; |
2059 | 2066 |
2060 struct ConstantStringTable { | 2067 struct ConstantStringTable { |
2061 const char* contents; | 2068 const char* contents; |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2190 StoreBufferEvent event); | 2197 StoreBufferEvent event); |
2191 | 2198 |
2192 // Performs a major collection in the whole heap. | 2199 // Performs a major collection in the whole heap. |
2193 void MarkCompact(GCTracer* tracer); | 2200 void MarkCompact(GCTracer* tracer); |
2194 | 2201 |
2195 // Code to be run before and after mark-compact. | 2202 // Code to be run before and after mark-compact. |
2196 void MarkCompactPrologue(); | 2203 void MarkCompactPrologue(); |
2197 | 2204 |
2198 void ProcessNativeContexts(WeakObjectRetainer* retainer, bool record_slots); | 2205 void ProcessNativeContexts(WeakObjectRetainer* retainer, bool record_slots); |
2199 void ProcessArrayBuffers(WeakObjectRetainer* retainer, bool record_slots); | 2206 void ProcessArrayBuffers(WeakObjectRetainer* retainer, bool record_slots); |
2207 void ProcessAllocationSites(WeakObjectRetainer* retainer, bool record_slots); | |
2200 | 2208 |
2201 // Called on heap tear-down. | 2209 // Called on heap tear-down. |
2202 void TearDownArrayBuffers(); | 2210 void TearDownArrayBuffers(); |
2203 | 2211 |
2204 // Record statistics before and after garbage collection. | 2212 // Record statistics before and after garbage collection. |
2205 void ReportStatisticsBeforeGC(); | 2213 void ReportStatisticsBeforeGC(); |
2206 void ReportStatisticsAfterGC(); | 2214 void ReportStatisticsAfterGC(); |
2207 | 2215 |
2208 // Slow part of scavenge object. | 2216 // Slow part of scavenge object. |
2209 static void ScavengeObjectSlow(HeapObject** p, HeapObject* object); | 2217 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. | 3095 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3088 | 3096 |
3089 private: | 3097 private: |
3090 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3098 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3091 }; | 3099 }; |
3092 #endif // DEBUG | 3100 #endif // DEBUG |
3093 | 3101 |
3094 } } // namespace v8::internal | 3102 } } // namespace v8::internal |
3095 | 3103 |
3096 #endif // V8_HEAP_H_ | 3104 #endif // V8_HEAP_H_ |
OLD | NEW |