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

Side by Side Diff: src/heap.cc

Issue 8776032: Let store buffer start out small for a 1Mbyte saving in boot (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years 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/platform.h » ('j') | src/store-buffer.cc » ('J')
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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 start_of_current_page_ = store_buffer_->Top(); 1005 start_of_current_page_ = store_buffer_->Top();
1006 current_page_ = page; 1006 current_page_ = page;
1007 } else if (event == kStoreBufferFullEvent) { 1007 } else if (event == kStoreBufferFullEvent) {
1008 // The current page overflowed the store buffer again. Wipe out its entries 1008 // The current page overflowed the store buffer again. Wipe out its entries
1009 // in the store buffer and mark it scan-on-scavenge again. This may happen 1009 // in the store buffer and mark it scan-on-scavenge again. This may happen
1010 // several times while scanning. 1010 // several times while scanning.
1011 if (current_page_ == NULL) { 1011 if (current_page_ == NULL) {
1012 // Store Buffer overflowed while scanning promoted objects. These are not 1012 // Store Buffer overflowed while scanning promoted objects. These are not
1013 // in any particular page, though they are likely to be clustered by the 1013 // in any particular page, though they are likely to be clustered by the
1014 // allocation routines. 1014 // allocation routines.
1015 store_buffer_->HandleFullness(); 1015 store_buffer_->EnsureSpace(StoreBuffer::kStoreBufferSize);
1016 } else { 1016 } else {
1017 // Store Buffer overflowed while scanning a particular old space page for 1017 // Store Buffer overflowed while scanning a particular old space page for
1018 // pointers to new space. 1018 // pointers to new space.
1019 ASSERT(current_page_ == page); 1019 ASSERT(current_page_ == page);
1020 ASSERT(page != NULL); 1020 ASSERT(page != NULL);
1021 current_page_->set_scan_on_scavenge(true); 1021 current_page_->set_scan_on_scavenge(true);
1022 ASSERT(start_of_current_page_ != store_buffer_->Top()); 1022 ASSERT(start_of_current_page_ != store_buffer_->Top());
1023 store_buffer_->SetTop(start_of_current_page_); 1023 store_buffer_->SetTop(start_of_current_page_);
1024 } 1024 }
1025 } else { 1025 } else {
(...skipping 5557 matching lines...) Expand 10 before | Expand all | Expand 10 after
6583 isolate_->heap()->store_buffer()->Compact(); 6583 isolate_->heap()->store_buffer()->Compact();
6584 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); 6584 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED);
6585 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 6585 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
6586 next = chunk->next_chunk(); 6586 next = chunk->next_chunk();
6587 isolate_->memory_allocator()->Free(chunk); 6587 isolate_->memory_allocator()->Free(chunk);
6588 } 6588 }
6589 chunks_queued_for_free_ = NULL; 6589 chunks_queued_for_free_ = NULL;
6590 } 6590 }
6591 6591
6592 } } // namespace v8::internal 6592 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/platform.h » ('j') | src/store-buffer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698