Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/base/once.h" | 9 #include "src/base/once.h" |
| 10 #include "src/base/utils/random-number-generator.h" | 10 #include "src/base/utils/random-number-generator.h" |
| (...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1943 } | 1943 } |
| 1944 } | 1944 } |
| 1945 | 1945 |
| 1946 // Helper function used by CopyObject to copy a source object to an | 1946 // Helper function used by CopyObject to copy a source object to an |
| 1947 // allocated target object and update the forwarding pointer in the source | 1947 // allocated target object and update the forwarding pointer in the source |
| 1948 // object. Returns the target object. | 1948 // object. Returns the target object. |
| 1949 INLINE(static void MigrateObject(Heap* heap, | 1949 INLINE(static void MigrateObject(Heap* heap, |
| 1950 HeapObject* source, | 1950 HeapObject* source, |
| 1951 HeapObject* target, | 1951 HeapObject* target, |
| 1952 int size)) { | 1952 int size)) { |
| 1953 ASSERT(!heap->InToSpace(target) || | |
|
titzer
2014/07/01 11:58:20
Comments here too?
Hannes Payer (out of office)
2014/07/01 16:08:11
Done.
| |
| 1954 heap->promotion_queue()->IsBelowPromotionQueue( | |
| 1955 target->address() + size)); | |
| 1956 | |
| 1953 // Copy the content of source to target. | 1957 // Copy the content of source to target. |
| 1954 heap->CopyBlock(target->address(), source->address(), size); | 1958 heap->CopyBlock(target->address(), source->address(), size); |
| 1955 | 1959 |
| 1956 // Set the forwarding address. | 1960 // Set the forwarding address. |
| 1957 source->set_map_word(MapWord::FromForwardingAddress(target)); | 1961 source->set_map_word(MapWord::FromForwardingAddress(target)); |
| 1958 | 1962 |
| 1959 if (logging_and_profiling_mode == LOGGING_AND_PROFILING_ENABLED) { | 1963 if (logging_and_profiling_mode == LOGGING_AND_PROFILING_ENABLED) { |
| 1960 // Update NewSpace stats if necessary. | 1964 // Update NewSpace stats if necessary. |
| 1961 RecordCopiedObject(heap, target); | 1965 RecordCopiedObject(heap, target); |
| 1962 heap->OnMoveEvent(target, source, size); | 1966 heap->OnMoveEvent(target, source, size); |
| (...skipping 4480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6443 static_cast<int>(object_sizes_last_time_[index])); | 6447 static_cast<int>(object_sizes_last_time_[index])); |
| 6444 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6448 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6445 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6449 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6446 | 6450 |
| 6447 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6451 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6448 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6452 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6449 ClearObjectStats(); | 6453 ClearObjectStats(); |
| 6450 } | 6454 } |
| 6451 | 6455 |
| 6452 } } // namespace v8::internal | 6456 } } // namespace v8::internal |
| OLD | NEW |