Allow no-op background merges to complete
It is possible, though unlikely, that V8 will deserialize code cache data, decide to merge that new data with an existing script from the Isolate compilation cache, and subsequently do nothing in the background portion of the merge (make no heap changes, and request no follow-up changes on the main thread). In this case, the most optimal outcome is to reuse the script from the Isolate compilation cache, not to use the newly deserialized script. CodeSerializer::FinishOffThreadDeserialize uses BackgroundMergeTask::HasPendingForegroundWork to determine whether it should complete the merge and use the Script from the compilation cache or complete the deserialization and use the newly deserialized Script. This change updates HasPendingForegroundWork so that it will return true even if the merge was a no-op. Bug: v8:12808 Change-Id: I08fcb814e797218e5be2b4ce4f45bd4e0637ec80 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3916270 Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#83439}
Showing
Please
register
or
sign in
to comment