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

Side by Side Diff: src/heap/slot-set.h

Issue 2110213003: Fix clearing of slots on large page uncommit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: x Created 4 years, 5 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/remembered-set.h ('k') | src/heap/spaces.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #ifndef V8_SLOT_SET_H 5 #ifndef V8_SLOT_SET_H
6 #define V8_SLOT_SET_H 6 #define V8_SLOT_SET_H
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/utils.h" 10 #include "src/utils.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if (cell & bit_mask) { 57 if (cell & bit_mask) {
58 bucket[bucket_index][cell_index] ^= bit_mask; 58 bucket[bucket_index][cell_index] ^= bit_mask;
59 } 59 }
60 } 60 }
61 } 61 }
62 } 62 }
63 63
64 // The slot offsets specify a range of slots at addresses: 64 // The slot offsets specify a range of slots at addresses:
65 // [page_start_ + start_offset ... page_start_ + end_offset). 65 // [page_start_ + start_offset ... page_start_ + end_offset).
66 void RemoveRange(int start_offset, int end_offset) { 66 void RemoveRange(int start_offset, int end_offset) {
67 CHECK_LE(end_offset, 1 << kPageSizeBits);
67 DCHECK_LE(start_offset, end_offset); 68 DCHECK_LE(start_offset, end_offset);
68 int start_bucket, start_cell, start_bit; 69 int start_bucket, start_cell, start_bit;
69 SlotToIndices(start_offset, &start_bucket, &start_cell, &start_bit); 70 SlotToIndices(start_offset, &start_bucket, &start_cell, &start_bit);
70 int end_bucket, end_cell, end_bit; 71 int end_bucket, end_cell, end_bit;
71 SlotToIndices(end_offset, &end_bucket, &end_cell, &end_bit); 72 SlotToIndices(end_offset, &end_bucket, &end_cell, &end_bit);
72 uint32_t start_mask = (1u << start_bit) - 1; 73 uint32_t start_mask = (1u << start_bit) - 1;
73 uint32_t end_mask = ~((1u << end_bit) - 1); 74 uint32_t end_mask = ~((1u << end_bit) - 1);
74 if (start_bucket == end_bucket && start_cell == end_cell) { 75 if (start_bucket == end_bucket && start_cell == end_cell) {
75 MaskCell(start_bucket, start_cell, start_mask | end_mask); 76 MaskCell(start_bucket, start_cell, start_mask | end_mask);
76 return; 77 return;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 }; 349 };
349 350
350 Address page_start_; 351 Address page_start_;
351 Chunk* chunk_; 352 Chunk* chunk_;
352 }; 353 };
353 354
354 } // namespace internal 355 } // namespace internal
355 } // namespace v8 356 } // namespace v8
356 357
357 #endif // V8_SLOT_SET_H 358 #endif // V8_SLOT_SET_H
OLDNEW
« no previous file with comments | « src/heap/remembered-set.h ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698