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

Side by Side Diff: src/heap/mark-compact.cc

Issue 938683002: Add --single-threaded flag that disables background threads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « src/flag-definitions.h ('k') | src/isolate.cc » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 454 }
455 455
456 Heap* heap_; 456 Heap* heap_;
457 PagedSpace* space_; 457 PagedSpace* space_;
458 458
459 DISALLOW_COPY_AND_ASSIGN(SweeperTask); 459 DISALLOW_COPY_AND_ASSIGN(SweeperTask);
460 }; 460 };
461 461
462 462
463 void MarkCompactCollector::StartSweeperThreads() { 463 void MarkCompactCollector::StartSweeperThreads() {
464 DCHECK(!FLAG_single_threaded);
464 DCHECK(free_list_old_pointer_space_.get()->IsEmpty()); 465 DCHECK(free_list_old_pointer_space_.get()->IsEmpty());
465 DCHECK(free_list_old_data_space_.get()->IsEmpty()); 466 DCHECK(free_list_old_data_space_.get()->IsEmpty());
466 V8::GetCurrentPlatform()->CallOnBackgroundThread( 467 V8::GetCurrentPlatform()->CallOnBackgroundThread(
467 new SweeperTask(heap(), heap()->old_data_space()), 468 new SweeperTask(heap(), heap()->old_data_space()),
468 v8::Platform::kShortRunningTask); 469 v8::Platform::kShortRunningTask);
469 V8::GetCurrentPlatform()->CallOnBackgroundThread( 470 V8::GetCurrentPlatform()->CallOnBackgroundThread(
470 new SweeperTask(heap(), heap()->old_pointer_space()), 471 new SweeperTask(heap(), heap()->old_pointer_space()),
471 v8::Platform::kShortRunningTask); 472 v8::Platform::kShortRunningTask);
472 } 473 }
473 474
(...skipping 3939 matching lines...) Expand 10 before | Expand all | Expand 10 after
4413 SlotsBuffer* buffer = *buffer_address; 4414 SlotsBuffer* buffer = *buffer_address;
4414 while (buffer != NULL) { 4415 while (buffer != NULL) {
4415 SlotsBuffer* next_buffer = buffer->next(); 4416 SlotsBuffer* next_buffer = buffer->next();
4416 DeallocateBuffer(buffer); 4417 DeallocateBuffer(buffer);
4417 buffer = next_buffer; 4418 buffer = next_buffer;
4418 } 4419 }
4419 *buffer_address = NULL; 4420 *buffer_address = NULL;
4420 } 4421 }
4421 } 4422 }
4422 } // namespace v8::internal 4423 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698