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

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

Issue 25260003: Remove parallel marking support. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 | « src/mark-compact.h ('k') | src/marking-thread.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 20 matching lines...) Expand all
31 #include "compilation-cache.h" 31 #include "compilation-cache.h"
32 #include "cpu-profiler.h" 32 #include "cpu-profiler.h"
33 #include "deoptimizer.h" 33 #include "deoptimizer.h"
34 #include "execution.h" 34 #include "execution.h"
35 #include "gdb-jit.h" 35 #include "gdb-jit.h"
36 #include "global-handles.h" 36 #include "global-handles.h"
37 #include "heap-profiler.h" 37 #include "heap-profiler.h"
38 #include "ic-inl.h" 38 #include "ic-inl.h"
39 #include "incremental-marking.h" 39 #include "incremental-marking.h"
40 #include "mark-compact.h" 40 #include "mark-compact.h"
41 #include "marking-thread.h"
42 #include "objects-visiting.h" 41 #include "objects-visiting.h"
43 #include "objects-visiting-inl.h" 42 #include "objects-visiting-inl.h"
44 #include "stub-cache.h" 43 #include "stub-cache.h"
45 #include "sweeper-thread.h" 44 #include "sweeper-thread.h"
46 45
47 namespace v8 { 46 namespace v8 {
48 namespace internal { 47 namespace internal {
49 48
50 49
51 const char* Marking::kWhiteBitPattern = "00"; 50 const char* Marking::kWhiteBitPattern = "00";
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 bool MarkCompactCollector::AreSweeperThreadsActivated() { 593 bool MarkCompactCollector::AreSweeperThreadsActivated() {
595 return isolate()->sweeper_threads() != NULL; 594 return isolate()->sweeper_threads() != NULL;
596 } 595 }
597 596
598 597
599 bool MarkCompactCollector::IsConcurrentSweepingInProgress() { 598 bool MarkCompactCollector::IsConcurrentSweepingInProgress() {
600 return sweeping_pending_; 599 return sweeping_pending_;
601 } 600 }
602 601
603 602
604 void MarkCompactCollector::MarkInParallel() {
605 for (int i = 0; i < FLAG_marking_threads; i++) {
606 isolate()->marking_threads()[i]->StartMarking();
607 }
608 }
609
610
611 void MarkCompactCollector::WaitUntilMarkingCompleted() {
612 for (int i = 0; i < FLAG_marking_threads; i++) {
613 isolate()->marking_threads()[i]->WaitForMarkingThread();
614 }
615 }
616
617
618 bool Marking::TransferMark(Address old_start, Address new_start) { 603 bool Marking::TransferMark(Address old_start, Address new_start) {
619 // This is only used when resizing an object. 604 // This is only used when resizing an object.
620 ASSERT(MemoryChunk::FromAddress(old_start) == 605 ASSERT(MemoryChunk::FromAddress(old_start) ==
621 MemoryChunk::FromAddress(new_start)); 606 MemoryChunk::FromAddress(new_start));
622 607
623 // If the mark doesn't move, we don't check the color of the object. 608 // If the mark doesn't move, we don't check the color of the object.
624 // It doesn't matter whether the object is black, since it hasn't changed 609 // It doesn't matter whether the object is black, since it hasn't changed
625 // size, so the adjustment to the live data count will be zero anyway. 610 // size, so the adjustment to the live data count will be zero anyway.
626 if (old_start == new_start) return false; 611 if (old_start == new_start) return false;
627 612
(...skipping 3687 matching lines...) Expand 10 before | Expand all | Expand 10 after
4315 while (buffer != NULL) { 4300 while (buffer != NULL) {
4316 SlotsBuffer* next_buffer = buffer->next(); 4301 SlotsBuffer* next_buffer = buffer->next();
4317 DeallocateBuffer(buffer); 4302 DeallocateBuffer(buffer);
4318 buffer = next_buffer; 4303 buffer = next_buffer;
4319 } 4304 }
4320 *buffer_address = NULL; 4305 *buffer_address = NULL;
4321 } 4306 }
4322 4307
4323 4308
4324 } } // namespace v8::internal 4309 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.h ('k') | src/marking-thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698