| 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 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 return &global_contexts_list_; | 925 return &global_contexts_list_; |
| 926 } | 926 } |
| 927 | 927 |
| 928 #ifdef DEBUG | 928 #ifdef DEBUG |
| 929 static void Print(); | 929 static void Print(); |
| 930 static void PrintHandles(); | 930 static void PrintHandles(); |
| 931 | 931 |
| 932 // Verify the heap is in its normal state before or after a GC. | 932 // Verify the heap is in its normal state before or after a GC. |
| 933 static void Verify(); | 933 static void Verify(); |
| 934 | 934 |
| 935 static void OldPointerSpaceCheckStoreBuffer( |
| 936 ExpectedPageWatermarkState watermark_state); |
| 937 static void MapSpaceCheckStoreBuffer( |
| 938 ExpectedPageWatermarkState watermark_state); |
| 939 static void LargeObjectSpaceCheckStoreBuffer(); |
| 940 |
| 935 // Report heap statistics. | 941 // Report heap statistics. |
| 936 static void ReportHeapStatistics(const char* title); | 942 static void ReportHeapStatistics(const char* title); |
| 937 static void ReportCodeStatistics(const char* title); | 943 static void ReportCodeStatistics(const char* title); |
| 938 | 944 |
| 939 // Fill in bogus values in from space | 945 // Fill in bogus values in from space |
| 940 static void ZapFromSpace(); | 946 static void ZapFromSpace(); |
| 941 #endif | 947 #endif |
| 942 | 948 |
| 943 #if defined(ENABLE_LOGGING_AND_PROFILING) | 949 #if defined(ENABLE_LOGGING_AND_PROFILING) |
| 944 // Print short heap statistics. | 950 // Print short heap statistics. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 static Map* MapForExternalArrayType(ExternalArrayType array_type); | 1083 static Map* MapForExternalArrayType(ExternalArrayType array_type); |
| 1078 static RootListIndex RootIndexForExternalArrayType( | 1084 static RootListIndex RootIndexForExternalArrayType( |
| 1079 ExternalArrayType array_type); | 1085 ExternalArrayType array_type); |
| 1080 | 1086 |
| 1081 static void RecordStats(HeapStats* stats, bool take_snapshot = false); | 1087 static void RecordStats(HeapStats* stats, bool take_snapshot = false); |
| 1082 | 1088 |
| 1083 // Copy block of memory from src to dst. Size of block should be aligned | 1089 // Copy block of memory from src to dst. Size of block should be aligned |
| 1084 // by pointer size. | 1090 // by pointer size. |
| 1085 static inline void CopyBlock(Address dst, Address src, int byte_size); | 1091 static inline void CopyBlock(Address dst, Address src, int byte_size); |
| 1086 | 1092 |
| 1087 static inline void CopyBlockToOldSpaceAndUpdateRegionMarks(Address dst, | 1093 static inline void CopyBlockToOldSpaceAndUpdateWriteBarrier(Address dst, |
| 1088 Address src, | 1094 Address src, |
| 1089 int byte_size); | 1095 int byte_size); |
| 1090 | 1096 |
| 1091 // Optimized version of memmove for blocks with pointer size aligned sizes and | 1097 // Optimized version of memmove for blocks with pointer size aligned sizes and |
| 1092 // pointer size aligned addresses. | 1098 // pointer size aligned addresses. |
| 1093 static inline void MoveBlock(Address dst, Address src, int byte_size); | 1099 static inline void MoveBlock(Address dst, Address src, int byte_size); |
| 1094 | 1100 |
| 1095 static inline void MoveBlockToOldSpaceAndUpdateRegionMarks(Address dst, | |
| 1096 Address src, | |
| 1097 int byte_size); | |
| 1098 | |
| 1099 // Check new space expansion criteria and expand semispaces if it was hit. | 1101 // Check new space expansion criteria and expand semispaces if it was hit. |
| 1100 static void CheckNewSpaceExpansionCriteria(); | 1102 static void CheckNewSpaceExpansionCriteria(); |
| 1101 | 1103 |
| 1102 static inline void IncrementYoungSurvivorsCounter(int survived) { | 1104 static inline void IncrementYoungSurvivorsCounter(int survived) { |
| 1103 young_survivors_after_last_gc_ = survived; | 1105 young_survivors_after_last_gc_ = survived; |
| 1104 survived_since_last_expansion_ += survived; | 1106 survived_since_last_expansion_ += survived; |
| 1105 } | 1107 } |
| 1106 | 1108 |
| 1107 static void UpdateNewSpaceReferencesInExternalStringTable( | 1109 static void UpdateNewSpaceReferencesInExternalStringTable( |
| 1108 ExternalStringTableUpdaterCallback updater_func); | 1110 ExternalStringTableUpdaterCallback updater_func); |
| (...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2131 // Return whether this object should be retained. If NULL is returned the | 2133 // Return whether this object should be retained. If NULL is returned the |
| 2132 // object has no references. Otherwise the address of the retained object | 2134 // object has no references. Otherwise the address of the retained object |
| 2133 // should be returned as in some GC situations the object has been moved. | 2135 // should be returned as in some GC situations the object has been moved. |
| 2134 virtual Object* RetainAs(Object* object) = 0; | 2136 virtual Object* RetainAs(Object* object) = 0; |
| 2135 }; | 2137 }; |
| 2136 | 2138 |
| 2137 | 2139 |
| 2138 } } // namespace v8::internal | 2140 } } // namespace v8::internal |
| 2139 | 2141 |
| 2140 #endif // V8_HEAP_H_ | 2142 #endif // V8_HEAP_H_ |
| OLD | NEW |