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

Side by Side Diff: src/heap/spaces.cc

Issue 2826593004: [heap] Reland: Take page lock when scavenging old to new references in Scavenger. (Closed)
Patch Set: Use recursive mutex. Created 3 years, 8 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/heap/spaces.h ('k') | no next file » | 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 // 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/heap/spaces.h" 5 #include "src/heap/spaces.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 chunk->set_owner(owner); 528 chunk->set_owner(owner);
529 chunk->InitializeReservedMemory(); 529 chunk->InitializeReservedMemory();
530 chunk->slot_set_[OLD_TO_NEW].SetValue(nullptr); 530 chunk->slot_set_[OLD_TO_NEW].SetValue(nullptr);
531 chunk->slot_set_[OLD_TO_OLD].SetValue(nullptr); 531 chunk->slot_set_[OLD_TO_OLD].SetValue(nullptr);
532 chunk->typed_slot_set_[OLD_TO_NEW].SetValue(nullptr); 532 chunk->typed_slot_set_[OLD_TO_NEW].SetValue(nullptr);
533 chunk->typed_slot_set_[OLD_TO_OLD].SetValue(nullptr); 533 chunk->typed_slot_set_[OLD_TO_OLD].SetValue(nullptr);
534 chunk->skip_list_ = nullptr; 534 chunk->skip_list_ = nullptr;
535 chunk->progress_bar_ = 0; 535 chunk->progress_bar_ = 0;
536 chunk->high_water_mark_.SetValue(static_cast<intptr_t>(area_start - base)); 536 chunk->high_water_mark_.SetValue(static_cast<intptr_t>(area_start - base));
537 chunk->concurrent_sweeping_state().SetValue(kSweepingDone); 537 chunk->concurrent_sweeping_state().SetValue(kSweepingDone);
538 chunk->mutex_ = new base::Mutex(); 538 chunk->mutex_ = new base::RecursiveMutex();
539 chunk->available_in_free_list_ = 0; 539 chunk->available_in_free_list_ = 0;
540 chunk->wasted_memory_ = 0; 540 chunk->wasted_memory_ = 0;
541 chunk->young_generation_bitmap_ = nullptr; 541 chunk->young_generation_bitmap_ = nullptr;
542 chunk->set_next_chunk(nullptr); 542 chunk->set_next_chunk(nullptr);
543 chunk->set_prev_chunk(nullptr); 543 chunk->set_prev_chunk(nullptr);
544 chunk->local_tracker_ = nullptr; 544 chunk->local_tracker_ = nullptr;
545 545
546 MarkingState::Internal(chunk).ClearLiveness(); 546 MarkingState::Internal(chunk).ClearLiveness();
547 547
548 DCHECK(OFFSET_OF(MemoryChunk, flags_) == kFlagsOffset); 548 DCHECK(OFFSET_OF(MemoryChunk, flags_) == kFlagsOffset);
(...skipping 2765 matching lines...) Expand 10 before | Expand all | Expand 10 after
3314 PrintF("\n"); 3314 PrintF("\n");
3315 } 3315 }
3316 printf(" --------------------------------------\n"); 3316 printf(" --------------------------------------\n");
3317 printf(" Marked: %x, LiveCount: %" V8PRIdPTR "\n", mark_size, 3317 printf(" Marked: %x, LiveCount: %" V8PRIdPTR "\n", mark_size,
3318 MarkingState::Internal(this).live_bytes()); 3318 MarkingState::Internal(this).live_bytes());
3319 } 3319 }
3320 3320
3321 #endif // DEBUG 3321 #endif // DEBUG
3322 } // namespace internal 3322 } // namespace internal
3323 } // namespace v8 3323 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698