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

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

Issue 125983002: Fix selection of popular pages in store buffer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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 | test/mjsunit/regress/regress-331444.js » ('j') | 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 MemoryChunk* previous_chunk = NULL; 217 MemoryChunk* previous_chunk = NULL;
218 for (Address* p = old_start_; p < old_top_; p += prime_sample_step) { 218 for (Address* p = old_start_; p < old_top_; p += prime_sample_step) {
219 Address addr = *p; 219 Address addr = *p;
220 MemoryChunk* containing_chunk = NULL; 220 MemoryChunk* containing_chunk = NULL;
221 if (previous_chunk != NULL && previous_chunk->Contains(addr)) { 221 if (previous_chunk != NULL && previous_chunk->Contains(addr)) {
222 containing_chunk = previous_chunk; 222 containing_chunk = previous_chunk;
223 } else { 223 } else {
224 containing_chunk = MemoryChunk::FromAnyPointerAddress(heap_, addr); 224 containing_chunk = MemoryChunk::FromAnyPointerAddress(heap_, addr);
225 } 225 }
226 int old_counter = containing_chunk->store_buffer_counter(); 226 int old_counter = containing_chunk->store_buffer_counter();
227 if (old_counter == threshold) { 227 if (old_counter >= threshold) {
228 containing_chunk->set_scan_on_scavenge(true); 228 containing_chunk->set_scan_on_scavenge(true);
229 created_new_scan_on_scavenge_pages = true; 229 created_new_scan_on_scavenge_pages = true;
230 } 230 }
231 containing_chunk->set_store_buffer_counter(old_counter + 1); 231 containing_chunk->set_store_buffer_counter(old_counter + 1);
232 previous_chunk = containing_chunk; 232 previous_chunk = containing_chunk;
233 } 233 }
234 if (created_new_scan_on_scavenge_pages) { 234 if (created_new_scan_on_scavenge_pages) {
235 Filter(MemoryChunk::SCAN_ON_SCAVENGE); 235 Filter(MemoryChunk::SCAN_ON_SCAVENGE);
236 } 236 }
237 old_buffer_is_filtered_ = true; 237 old_buffer_is_filtered_ = true;
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 } 724 }
725 old_buffer_is_sorted_ = false; 725 old_buffer_is_sorted_ = false;
726 old_buffer_is_filtered_ = false; 726 old_buffer_is_filtered_ = false;
727 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); 727 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2);
728 ASSERT(old_top_ <= old_limit_); 728 ASSERT(old_top_ <= old_limit_);
729 } 729 }
730 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); 730 heap_->isolate()->counters()->store_buffer_compactions()->Increment();
731 } 731 }
732 732
733 } } // namespace v8::internal 733 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-331444.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698