28d5f133df
It could happen (e.g. with --stress-background-compile) that the main thread blocks for a background thread but the background thread requests a GC from the main thread. This would result in a deadlock. Avoid this by parking the main thread for potentially blocking operations and allow allocations while the main thread is parked. This CL introduces new states for the main thread: CollectionRequested and ParkedCollectionRequested. These states will force Safepoint(), Park() and Unpark() on the main thread into slow paths. The slow path can then perform a GC on the main thread - right before parking or after the main thread got unparked. Bug: v8:10315 Change-Id: If7ef31622d27320613139a0b7f79086fe3200f99 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2731528 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/master@{#73707} |
||
---|---|---|
.. | ||
base | ||
cppgc | ||
allocation-observer-unittest.cc | ||
barrier-unittest.cc | ||
bitmap-test-utils.h | ||
bitmap-unittest.cc | ||
code-object-registry-unittest.cc | ||
embedder-tracing-unittest.cc | ||
gc-idle-time-handler-unittest.cc | ||
gc-tracer-unittest.cc | ||
heap-controller-unittest.cc | ||
heap-unittest.cc | ||
heap-utils.cc | ||
heap-utils.h | ||
index-generator-unittest.cc | ||
item-parallel-job-unittest.cc | ||
list-unittest.cc | ||
local-factory-unittest.cc | ||
local-heap-unittest.cc | ||
marking-unittest.cc | ||
marking-worklist-unittest.cc | ||
memory-reducer-unittest.cc | ||
object-start-bitmap-unittest.cc | ||
object-stats-unittest.cc | ||
persistent-handles-unittest.cc | ||
safepoint-unittest.cc | ||
slot-set-unittest.cc | ||
spaces-unittest.cc | ||
traced-reference-unittest.cc | ||
unified-heap-snapshot-unittest.cc | ||
unified-heap-unittest.cc | ||
unified-heap-utils.cc | ||
unified-heap-utils.h | ||
unmapper-unittest.cc | ||
worklist-unittest.cc |