Repository navigation
Commit fb940ca
authored
[test] Fix flake in
In V8, `--concurrent-array-buffer-sweeping` is enabled by default, so a
single synchronous `gc()` call spawns a background `SweepingJob` and
returns before `ArrayBufferSweeper::FinalizeAndDelete` frees dead
`ArrayBuffer` backing stores and updates
`process.memoryUsage().arrayBuffers`. Under CPU contention on CI bots,
the main thread can read `process.memoryUsage().arrayBuffers` before the
background sweep job completes.
Call `gc()` twice before each measurement so that the start of the
second `gc()` (`ArrayBufferSweeper::EnsureFinished()`) waits for the
first `gc()`'s background sweep job to finish.
See: #28002test_dlopen_binary_not_retained (#28041)1 parent 7ce1535 commit fb940ca
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7325 | 7325 | | |
7326 | 7326 | | |
7327 | 7327 | | |
| 7328 | + | |
| 7329 | + | |
| 7330 | + | |
| 7331 | + | |
7328 | 7332 | | |
7329 | 7333 | | |
7330 | 7334 | | |
| |||
7333 | 7337 | | |
7334 | 7338 | | |
7335 | 7339 | | |
| 7340 | + | |
7336 | 7341 | | |
7337 | 7342 | | |
7338 | 7343 | | |
| |||
0 commit comments