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 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2360 // The second pass updates pointers to new space in all spaces. It is possible | 2360 // The second pass updates pointers to new space in all spaces. It is possible |
2361 // to encounter pointers to dead new space objects during traversal of pointers | 2361 // to encounter pointers to dead new space objects during traversal of pointers |
2362 // to new space. We should clear them to avoid encountering them during next | 2362 // to new space. We should clear them to avoid encountering them during next |
2363 // pointer iteration. This is an issue if the store buffer overflows and we | 2363 // pointer iteration. This is an issue if the store buffer overflows and we |
2364 // have to scan the entire old space, including dead objects, looking for | 2364 // have to scan the entire old space, including dead objects, looking for |
2365 // pointers to new space. | 2365 // pointers to new space. |
2366 void MarkCompactCollector::MigrateObject(Address dst, | 2366 void MarkCompactCollector::MigrateObject(Address dst, |
2367 Address src, | 2367 Address src, |
2368 int size, | 2368 int size, |
2369 AllocationSpace dest) { | 2369 AllocationSpace dest) { |
2370 HEAP_PROFILE(heap(), ObjectMoveEvent(src, dst)); | |
Vyacheslav Egorov (Chromium)
2011/09/26 15:52:00
For code objects do you expect to get both ObjectM
mnaganov (inactive)
2011/09/26 15:58:24
Yes, because CPU and Heap profilers are independen
| |
2370 if (dest == OLD_POINTER_SPACE || dest == LO_SPACE) { | 2371 if (dest == OLD_POINTER_SPACE || dest == LO_SPACE) { |
2371 Address src_slot = src; | 2372 Address src_slot = src; |
2372 Address dst_slot = dst; | 2373 Address dst_slot = dst; |
2373 ASSERT(IsAligned(size, kPointerSize)); | 2374 ASSERT(IsAligned(size, kPointerSize)); |
2374 | 2375 |
2375 for (int remaining = size / kPointerSize; remaining > 0; remaining--) { | 2376 for (int remaining = size / kPointerSize; remaining > 0; remaining--) { |
2376 Object* value = Memory::Object_at(src_slot); | 2377 Object* value = Memory::Object_at(src_slot); |
2377 | 2378 |
2378 Memory::Object_at(dst_slot) = value; | 2379 Memory::Object_at(dst_slot) = value; |
2379 | 2380 |
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3835 while (buffer != NULL) { | 3836 while (buffer != NULL) { |
3836 SlotsBuffer* next_buffer = buffer->next(); | 3837 SlotsBuffer* next_buffer = buffer->next(); |
3837 DeallocateBuffer(buffer); | 3838 DeallocateBuffer(buffer); |
3838 buffer = next_buffer; | 3839 buffer = next_buffer; |
3839 } | 3840 } |
3840 *buffer_address = NULL; | 3841 *buffer_address = NULL; |
3841 } | 3842 } |
3842 | 3843 |
3843 | 3844 |
3844 } } // namespace v8::internal | 3845 } } // namespace v8::internal |
OLD | NEW |