| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job mac-m1_mini_2020-perf/speedometer3 complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/15024cbe490000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Generally looks good arleady. Nice optimization!
Since the concurrent marker only needs to perform inner-pointerAlso incremental
DCHECK_LT(address, reinterpret_cast<ConstAddress>(header) +Lets try this as CHECK
DCHECK_LT(address, reinterpret_cast<ConstAddress>(header) +CHECK here?
ConstAddress object_end =I'd add a comment here explaining that this method may find other headers (before this object) because not all object start bits are initially set. The fixup then makes sure that we indeed find the right one.
template <AccessMode = AccessMode::kNonAtomic>I'd add a comment here that these methods assume that the bit exists for address and do not perform any fixups.
// |address| must refer to real object.I'd mention here that these methods must run on the main thread as they potentially fix up any missing bits.
ObjectStartBitmapVerifier().Verify(heap_);Can we verify individual pages after sweeping?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Since the concurrent marker only needs to perform inner-pointerAnton BikineevAlso incremental
Done
DCHECK_LT(address, reinterpret_cast<ConstAddress>(header) +Lets try this as CHECK
Done
DCHECK_LT(address, reinterpret_cast<ConstAddress>(header) +Anton BikineevCHECK here?
Done
I'd add a comment here explaining that this method may find other headers (before this object) because not all object start bits are initially set. The fixup then makes sure that we indeed find the right one.
Done
I'd add a comment here that these methods assume that the bit exists for address and do not perform any fixups.
Done
I'd mention here that these methods must run on the main thread as they potentially fix up any missing bits.
Done
ObjectStartBitmapVerifier().Verify(heap_);Can we verify individual pages after sweeping?
We do verify it (see line 743). This one is for before sweeping.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
😿 Job android-pixel10-perf/blink_perf.css failed.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/15bdc296490000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
NormalPage::From(BasePage::FromPayload(&filler))I guess we rarely go into this path here because it requires double-word alignment on the caller side? We could also avoid writing this bit fwiw.
Reading this code, I wonder if it's not slightly better to refactor this a bit into
```
if (kAlignment != kAllocaitonGranularity) {
return AllocateWithCustomAlignment();
}
// Assume single-word alignment here.
```
Feel free to ignore this comment.
ObjectStartBitmapVerifier().Verify(heap_);Anton BikineevCan we verify individual pages after sweeping?
We do verify it (see line 743). This one is for before sweeping.
Ack, thanks. Before sweeping doesn't work anymore.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I guess we rarely go into this path here because it requires double-word alignment on the caller side? We could also avoid writing this bit fwiw.
Reading this code, I wonder if it's not slightly better to refactor this a bit into
```
if (kAlignment != kAllocaitonGranularity) {
return AllocateWithCustomAlignment();
}
// Assume single-word alignment here.
```Feel free to ignore this comment.
agreed, refactoring could be done in a separate CL.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
39 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/heap/cppgc/object-allocator.h
Insertions: 1, Deletions: 4.
@@ -231,10 +231,7 @@
if (!lab_allocation_will_succeed &&
(current_lab_size >= (size + kPaddingSize))) {
void* filler_memory = current_lab.Allocate(kPaddingSize);
- auto& filler = Filler::CreateAt(filler_memory, kPaddingSize);
- NormalPage::From(BasePage::FromPayload(&filler))
- ->object_start_bitmap()
- .SetBit<AccessMode::kAtomic>(reinterpret_cast<ConstAddress>(&filler));
+ Filler::CreateAt(filler_memory, kPaddingSize);
lab_allocation_will_succeed = true;
}
if (V8_UNLIKELY(!lab_allocation_will_succeed)) {
```
[cppgc] Don't set object start bit on regular LAB allocations
To improve allocation performance, this CL avoids setting the object
start bit in the ObjectStartBitmap during fast-path LAB allocations for
regular (non-mixin) objects.
Since the concurrent/incremental marker only needs to perform
inner-pointer resolution for mixin types, we can safely omit setting
the start bit for non-mixin objects during allocation. The bitmap is
instead repaired on-the-fly by the mutator when needed, and fully
populated during sweeping.
Detailed changes:
1. Allocation Optimization: Removed the `SetBit` call in `ObjectAllocator`
for LAB allocations, except when `may_contain_mixins == kYes`. Mixins
continue to set their start bit immediately to ensure they can be
reliably found by the concurrent marker.
2. On-the-fly Repair (Mutator): `BasePage::ObjectHeaderFromInnerAddress`
now detects if the bitmap has gaps and repairs it on-the-fly by
linearizing the bitmap from the last known set bit up to the requested
address. This is safe as it is only called by the mutator.
3. Concurrent Lookup (Marker): Introduced
`BasePage::ObjectHeaderFromInnerAddressConcurrent` for the concurrent
marker. To avoid data races with the mutator, it strictly reads from
the bitmap and does not attempt to repair it. This is safe because the
concurrent marker only resolves inner pointers for mixin objects, which
are guaranteed to have had their start bits set upon allocation.
4. Sweeper Updates: The sweeper now populates the start bit for all
live objects and free-list entries, restoring the bitmap to a fully
consistent state at the end of the sweep phase.
Design Doc: https://docs.google.com/document/d/1i4Sx-p6a_toYLwEt4HnQeJ9Xm28FmevwT2e5DzkGIaQ/edit?usp=sharing
Bug: 516682115
Change-Id: Ib8a3dfd28778d3b07beb5bf8f38331861b384b6b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7828550
Commit-Queue: Anton Bikineev <biki...@chromium.org>
Reviewed-by: Michael Lippautz <mlip...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#107560}
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job android-pixel6-perf/speedometer3.crossbench complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/10efe686490000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
😿 Job android-pixel10-perf/blink_perf.css failed.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/1529ef76490000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job android-pixel10-perf/blink_perf.css complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/106a3be9490000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job android-pixel10-perf/speedometer3.crossbench complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/1221d509490000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
📍 Job android-pixel9-perf/blink_perf.css complete.
See results at: https://pinpoint-dot-chromeperf.appspot.com/job/12549c06490000
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |