Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/spaces.cc

Issue 10959011: Allow partial scanning of large arrays in order to avoid (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/mark-compact.cc ('K') | « src/spaces.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2660 matching lines...) Expand 10 before | Expand all | Expand 10 after
2671 for (uintptr_t key = base; key <= limit; key++) { 2671 for (uintptr_t key = base; key <= limit; key++) {
2672 HashMap::Entry* entry = chunk_map_.Lookup(reinterpret_cast<void*>(key), 2672 HashMap::Entry* entry = chunk_map_.Lookup(reinterpret_cast<void*>(key),
2673 static_cast<uint32_t>(key), 2673 static_cast<uint32_t>(key),
2674 true); 2674 true);
2675 ASSERT(entry != NULL); 2675 ASSERT(entry != NULL);
2676 entry->value = page; 2676 entry->value = page;
2677 } 2677 }
2678 2678
2679 HeapObject* object = page->GetObject(); 2679 HeapObject* object = page->GetObject();
2680 2680
2681 #ifdef DEBUG 2681 // Make the object consistent so the large object space can be traversed.
2682 // Make the object consistent so the heap can be vefified in OldSpaceStep.
2683 reinterpret_cast<Object**>(object->address())[0] = 2682 reinterpret_cast<Object**>(object->address())[0] =
2684 heap()->fixed_array_map(); 2683 heap()->fixed_array_map();
2685 reinterpret_cast<Object**>(object->address())[1] = Smi::FromInt(0); 2684 reinterpret_cast<Object**>(object->address())[1] = Smi::FromInt(0);
2686 #endif
2687 2685
2688 heap()->incremental_marking()->OldSpaceStep(object_size); 2686 heap()->incremental_marking()->OldSpaceStep(object_size);
2689 return object; 2687 return object;
2690 } 2688 }
2691 2689
2692 2690
2693 // GC support 2691 // GC support
2694 MaybeObject* LargeObjectSpace::FindObject(Address a) { 2692 MaybeObject* LargeObjectSpace::FindObject(Address a) {
2695 LargePage* page = FindPage(a); 2693 LargePage* page = FindPage(a);
2696 if (page != NULL) { 2694 if (page != NULL) {
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
2887 object->ShortPrint(); 2885 object->ShortPrint();
2888 PrintF("\n"); 2886 PrintF("\n");
2889 } 2887 }
2890 printf(" --------------------------------------\n"); 2888 printf(" --------------------------------------\n");
2891 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 2889 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
2892 } 2890 }
2893 2891
2894 #endif // DEBUG 2892 #endif // DEBUG
2895 2893
2896 } } // namespace v8::internal 2894 } } // namespace v8::internal
OLDNEW
« src/mark-compact.cc ('K') | « src/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698