[wasm] Use std::shared_mutex instead of base::SharedMutex
base::SharedMutex was implemented as an exclusive lock on Mac, because of an OS issue on Mac (see https://crbug.com/v8/12037). https://crrev.com/c/3855361 then introduced a custom implementation on Mac, which caused performance regressions (see https://crbug.com/1358856). Since we rely on C++17 now, we can instead just use {std::shared_mutex}, which does not seem to have the deadlock issue of {pthread_rwlock_t}. As a smoke test (and to check whether this actually fixes the performance regressions), only switch one mutex in Wasm compilation to std::shared_mutex. If this CL looks good, then other places can be switched over as well. R=ishell@chromium.org Bug: chromium:1358856, v8:13256 Change-Id: Ia56efcb7747f191cc3ed7a381096c8f57142aff8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3868954 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#82916}
Showing
Please
register
or
sign in
to comment