Nika Layzell fe5df0abfe Bug 1887870 - Reduce the number of mutexes used by mojo in TSAN builds, r=ipc-reviewers,mccr8
This changes the locking behaviour for IPC port mutexes in TSAN builds
to use a single shared mutex for all ports, rather than individual
mutexes per-port. This avoids the need to potentially lock a large
number of mutexes simultaneously when sending a large number of ports in
an IPC message.

I've tried to leave in the various debug assertions such that it still
acts like there are multiple mutexes under the hood. It is likely that
this could harm performance somewhat due to the increased contention,
however it should have no impact on actual release builds.

Differential Revision: https://phabricator.services.mozilla.com/D207073
2024-04-09 20:16:53 +00:00
..