[sampling heap profiler] Implement lock-free hash set.
It turned out the std::unordered_set does not support concurrent access even to distinct items in the container. Here's the custom implementation of a hash set with keys of void* type. It supports lock-free concurrent access to Insert, Remove, and Contains operations. The latter made as fast as possible since it is on the hot path of the memory allocation hooks. BUG=854399 Change-Id: Ia53eeff08bafc363df2aef8ac5cdd5212f124452 Reviewed-on: https://chromium-review.googlesource.com/1121101Reviewed-by:Daniel Cheng <dcheng@chromium.org> Reviewed-by:
Andrey Kosyakov <caseq@chromium.org> Commit-Queue: Alexei Filippov <alph@chromium.org> Cr-Commit-Position: refs/heads/master@{#572446}
Showing
Please register or sign in to comment