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

Side by Side Diff: src/heap.cc

Issue 16690006: Clean up StoreBuffer::EnsureSpace. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | src/store-buffer.h » ('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 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 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 start_of_current_page_ = store_buffer_->Top(); 1205 start_of_current_page_ = store_buffer_->Top();
1206 current_page_ = page; 1206 current_page_ = page;
1207 } else if (event == kStoreBufferFullEvent) { 1207 } else if (event == kStoreBufferFullEvent) {
1208 // The current page overflowed the store buffer again. Wipe out its entries 1208 // The current page overflowed the store buffer again. Wipe out its entries
1209 // in the store buffer and mark it scan-on-scavenge again. This may happen 1209 // in the store buffer and mark it scan-on-scavenge again. This may happen
1210 // several times while scanning. 1210 // several times while scanning.
1211 if (current_page_ == NULL) { 1211 if (current_page_ == NULL) {
1212 // Store Buffer overflowed while scanning promoted objects. These are not 1212 // Store Buffer overflowed while scanning promoted objects. These are not
1213 // in any particular page, though they are likely to be clustered by the 1213 // in any particular page, though they are likely to be clustered by the
1214 // allocation routines. 1214 // allocation routines.
1215 store_buffer_->EnsureSpace(StoreBuffer::kStoreBufferSize); 1215 store_buffer_->EnsureSpace(StoreBuffer::kStoreBufferSize / 2);
1216 } else { 1216 } else {
1217 // Store Buffer overflowed while scanning a particular old space page for 1217 // Store Buffer overflowed while scanning a particular old space page for
1218 // pointers to new space. 1218 // pointers to new space.
1219 ASSERT(current_page_ == page); 1219 ASSERT(current_page_ == page);
1220 ASSERT(page != NULL); 1220 ASSERT(page != NULL);
1221 current_page_->set_scan_on_scavenge(true); 1221 current_page_->set_scan_on_scavenge(true);
1222 ASSERT(start_of_current_page_ != store_buffer_->Top()); 1222 ASSERT(start_of_current_page_ != store_buffer_->Top());
1223 store_buffer_->SetTop(start_of_current_page_); 1223 store_buffer_->SetTop(start_of_current_page_);
1224 } 1224 }
1225 } else { 1225 } else {
(...skipping 6760 matching lines...) Expand 10 before | Expand all | Expand 10 after
7986 if (FLAG_parallel_recompilation) { 7986 if (FLAG_parallel_recompilation) {
7987 heap_->relocation_mutex_->Lock(); 7987 heap_->relocation_mutex_->Lock();
7988 #ifdef DEBUG 7988 #ifdef DEBUG
7989 heap_->relocation_mutex_locked_by_optimizer_thread_ = 7989 heap_->relocation_mutex_locked_by_optimizer_thread_ =
7990 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); 7990 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread();
7991 #endif // DEBUG 7991 #endif // DEBUG
7992 } 7992 }
7993 } 7993 }
7994 7994
7995 } } // namespace v8::internal 7995 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/store-buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698