| OLD | NEW |
| 1 // Copyright 2006-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 } else { | 792 } else { |
| 793 Address top = current_page->AllocationTop(); | 793 Address top = current_page->AllocationTop(); |
| 794 if (current_page == top_page) { | 794 if (current_page == top_page) { |
| 795 ASSERT(top == allocation_info_.top); | 795 ASSERT(top == allocation_info_.top); |
| 796 // The next page will be above the allocation top. | 796 // The next page will be above the allocation top. |
| 797 above_allocation_top = true; | 797 above_allocation_top = true; |
| 798 } | 798 } |
| 799 | 799 |
| 800 HeapObjectIterator it(current_page, NULL); | 800 HeapObjectIterator it(current_page, NULL); |
| 801 Address end_of_previous_object = current_page->ObjectAreaStart(); | 801 Address end_of_previous_object = current_page->ObjectAreaStart(); |
| 802 for(HeapObject* object = it.next(); object != NULL; object = it.next()) { | 802 for (HeapObject* object = it.next(); object != NULL; object = it.next()) { |
| 803 ASSERT(end_of_previous_object <= object->address()); | 803 ASSERT(end_of_previous_object <= object->address()); |
| 804 | 804 |
| 805 // The first word should be a map, and we expect all map pointers to | 805 // The first word should be a map, and we expect all map pointers to |
| 806 // be in map space. | 806 // be in map space. |
| 807 Map* map = object->map(); | 807 Map* map = object->map(); |
| 808 ASSERT(map->IsMap()); | 808 ASSERT(map->IsMap()); |
| 809 ASSERT(Heap::map_space()->Contains(map)); | 809 ASSERT(Heap::map_space()->Contains(map)); |
| 810 | 810 |
| 811 // Perform space-specific object verification. | 811 // Perform space-specific object verification. |
| 812 VerifyObject(object); | 812 VerifyObject(object); |
| 813 | 813 |
| 814 if (object->IsCodeCache() && ((uint32_t*)object->address())[2] == 0x2) { | |
| 815 current_page->PrintMarkbits(); | |
| 816 } | |
| 817 | |
| 818 // The object itself should look OK. | 814 // The object itself should look OK. |
| 819 object->Verify(); | 815 object->Verify(); |
| 820 | 816 |
| 821 // All the interior pointers should be contained in the heap and | 817 // All the interior pointers should be contained in the heap and |
| 822 // have page regions covering intergenerational references should be | 818 // have page regions covering intergenerational references should be |
| 823 // marked dirty. | 819 // marked dirty. |
| 824 int size = object->Size(); | 820 int size = object->Size(); |
| 825 object->IterateBody(map->instance_type(), size, visitor); | 821 object->IterateBody(map->instance_type(), size, visitor); |
| 826 | 822 |
| 827 ASSERT(object->address() + size <= top); | 823 ASSERT(object->address() + size <= top); |
| (...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2488 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { | 2484 for (HeapObject* obj = obj_it.next(); obj != NULL; obj = obj_it.next()) { |
| 2489 if (obj->IsCode()) { | 2485 if (obj->IsCode()) { |
| 2490 Code* code = Code::cast(obj); | 2486 Code* code = Code::cast(obj); |
| 2491 code_kind_statistics[code->kind()] += code->Size(); | 2487 code_kind_statistics[code->kind()] += code->Size(); |
| 2492 } | 2488 } |
| 2493 } | 2489 } |
| 2494 } | 2490 } |
| 2495 #endif // DEBUG | 2491 #endif // DEBUG |
| 2496 | 2492 |
| 2497 } } // namespace v8::internal | 2493 } } // namespace v8::internal |
| OLD | NEW |