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

Side by Side Diff: src/store-buffer.cc

Issue 23597017: Search for page_has_scan_on_scavenge_flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
« no previous file with comments | « no previous file | 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 if (old_buffer_is_filtered_) return; 163 if (old_buffer_is_filtered_) return;
164 ASSERT(may_move_store_buffer_entries_); 164 ASSERT(may_move_store_buffer_entries_);
165 Compact(); 165 Compact();
166 166
167 old_buffer_is_filtered_ = true; 167 old_buffer_is_filtered_ = true;
168 bool page_has_scan_on_scavenge_flag = false; 168 bool page_has_scan_on_scavenge_flag = false;
169 169
170 PointerChunkIterator it(heap_); 170 PointerChunkIterator it(heap_);
171 MemoryChunk* chunk; 171 MemoryChunk* chunk;
172 while ((chunk = it.next()) != NULL) { 172 while ((chunk = it.next()) != NULL) {
173 if (chunk->scan_on_scavenge()) page_has_scan_on_scavenge_flag = true; 173 if (chunk->scan_on_scavenge()) {
174 page_has_scan_on_scavenge_flag = true;
175 break;
176 }
174 } 177 }
175 178
176 if (page_has_scan_on_scavenge_flag) { 179 if (page_has_scan_on_scavenge_flag) {
177 Filter(MemoryChunk::SCAN_ON_SCAVENGE); 180 Filter(MemoryChunk::SCAN_ON_SCAVENGE);
178 } 181 }
179 182
180 if (SpaceAvailable(space_needed)) return; 183 if (SpaceAvailable(space_needed)) return;
181 184
182 // Sample 1 entry in 97 and filter out the pages where we estimate that more 185 // Sample 1 entry in 97 and filter out the pages where we estimate that more
183 // than 1 in 8 pointers are to new space. 186 // than 1 in 8 pointers are to new space.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 ClearFilteringHashSets(); 275 ClearFilteringHashSets();
273 } 276 }
274 277
275 278
276 bool StoreBuffer::PrepareForIteration() { 279 bool StoreBuffer::PrepareForIteration() {
277 Compact(); 280 Compact();
278 PointerChunkIterator it(heap_); 281 PointerChunkIterator it(heap_);
279 MemoryChunk* chunk; 282 MemoryChunk* chunk;
280 bool page_has_scan_on_scavenge_flag = false; 283 bool page_has_scan_on_scavenge_flag = false;
281 while ((chunk = it.next()) != NULL) { 284 while ((chunk = it.next()) != NULL) {
282 if (chunk->scan_on_scavenge()) page_has_scan_on_scavenge_flag = true; 285 if (chunk->scan_on_scavenge()) {
286 page_has_scan_on_scavenge_flag = true;
287 break;
288 }
283 } 289 }
284 290
285 if (page_has_scan_on_scavenge_flag) { 291 if (page_has_scan_on_scavenge_flag) {
286 Filter(MemoryChunk::SCAN_ON_SCAVENGE); 292 Filter(MemoryChunk::SCAN_ON_SCAVENGE);
287 } 293 }
288 294
289 // Filtering hash sets are inconsistent with the store buffer after 295 // Filtering hash sets are inconsistent with the store buffer after
290 // iteration. 296 // iteration.
291 ClearFilteringHashSets(); 297 ClearFilteringHashSets();
292 298
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 } 724 }
719 old_buffer_is_sorted_ = false; 725 old_buffer_is_sorted_ = false;
720 old_buffer_is_filtered_ = false; 726 old_buffer_is_filtered_ = false;
721 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); 727 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2);
722 ASSERT(old_top_ <= old_limit_); 728 ASSERT(old_top_ <= old_limit_);
723 } 729 }
724 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); 730 heap_->isolate()->counters()->store_buffer_compactions()->Increment();
725 } 731 }
726 732
727 } } // namespace v8::internal 733 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698