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

Side by Side Diff: src/heap.cc

Issue 227533006: Synchronize store buffer processing and concurrent sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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
« no previous file with comments | « src/heap.h ('k') | src/heap-inl.h » ('j') | src/spaces.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5916 matching lines...) Expand 10 before | Expand all | Expand 10 after
5927 while (slot_address < end) { 5927 while (slot_address < end) {
5928 Object** slot = reinterpret_cast<Object**>(slot_address); 5928 Object** slot = reinterpret_cast<Object**>(slot_address);
5929 Object* object = *slot; 5929 Object* object = *slot;
5930 // If the store buffer becomes overfull we mark pages as being exempt from 5930 // If the store buffer becomes overfull we mark pages as being exempt from
5931 // the store buffer. These pages are scanned to find pointers that point 5931 // the store buffer. These pages are scanned to find pointers that point
5932 // to the new space. In that case we may hit newly promoted objects and 5932 // to the new space. In that case we may hit newly promoted objects and
5933 // fix the pointers before the promotion queue gets to them. Thus the 'if'. 5933 // fix the pointers before the promotion queue gets to them. Thus the 'if'.
5934 if (object->IsHeapObject()) { 5934 if (object->IsHeapObject()) {
5935 if (Heap::InFromSpace(object)) { 5935 if (Heap::InFromSpace(object)) {
5936 callback(reinterpret_cast<HeapObject**>(slot), 5936 callback(reinterpret_cast<HeapObject**>(slot),
5937 HeapObject::cast(object)); 5937 HeapObject::cast(object),
5938 NULL);
5938 Object* new_object = *slot; 5939 Object* new_object = *slot;
5939 if (InNewSpace(new_object)) { 5940 if (InNewSpace(new_object)) {
5940 SLOW_ASSERT(Heap::InToSpace(new_object)); 5941 SLOW_ASSERT(Heap::InToSpace(new_object));
5941 SLOW_ASSERT(new_object->IsHeapObject()); 5942 SLOW_ASSERT(new_object->IsHeapObject());
5942 store_buffer_.EnterDirectlyIntoStoreBuffer( 5943 store_buffer_.EnterDirectlyIntoStoreBuffer(
5943 reinterpret_cast<Address>(slot)); 5944 reinterpret_cast<Address>(slot));
5944 } 5945 }
5945 SLOW_ASSERT(!MarkCompactCollector::IsOnEvacuationCandidate(new_object)); 5946 SLOW_ASSERT(!MarkCompactCollector::IsOnEvacuationCandidate(new_object));
5946 } else if (record_slots && 5947 } else if (record_slots &&
5947 MarkCompactCollector::IsOnEvacuationCandidate(object)) { 5948 MarkCompactCollector::IsOnEvacuationCandidate(object)) {
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
7704 static_cast<int>(object_sizes_last_time_[index])); 7705 static_cast<int>(object_sizes_last_time_[index]));
7705 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7706 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7706 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7707 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7707 7708
7708 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7709 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7709 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7710 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7710 ClearObjectStats(); 7711 ClearObjectStats();
7711 } 7712 }
7712 7713
7713 } } // namespace v8::internal 7714 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/heap-inl.h » ('j') | src/spaces.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698