heap: Avoid multiple retracing of weak containers
We found that erasing from the weak container worklist caused timeouts in some blink_perf benchmarks. The erase operation was meant to avoid retracing the same backing store multiple times (an iterator to a hash table would result in at least 2 on-stack references to the backing store). Instead of erasing, this CL pushes retraced backing stores to a vector. Backing stores are retraced only if they are not yet in the vector. Thus iterators should trigger only a single retracing of the backing store. The vector is limited in size to avoid making it uncontrollably large. That means it is possible to retrace the same backing store multiple times if it was already ejected from the backing store. However this is very unlikely in practice. Drive-by: re-enable skipped tests. Bug: 1142315 Change-Id: I49bd30263db46e66293d046b85699826298aa033 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2516363Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Omer Katz <omerkatz@chromium.org> Cr-Commit-Position: refs/heads/master@{#824069}
Showing
Please register or sign in to comment