src/common/Spinlock.h


Log

Author Commit Date CI Message
Igor Nazarov 9faf7059 2023-06-20T19:04:49 Optimize angle::Spinlock performance This optimization is a preparation for future commits. Performance was tested by defining `ContextMutexType = angle::Spinlock` to use `SharedContextMutex<angle::Spinlock>` as `mSharedContextMutex`. Test result is average time for 1000'000 `glGetError()` calls on S906B with locked CPU frequencies: SharedContextMutex<angle::Spinlock> Before the optimization: 14.289 ms After the optimization: 12.941 ms (-9.4%) Performance when not using `angle::Spinlock` (current code): SingleContextMutex: 9.115 ms (-36.2%) SharedContextMutex<std::mutex>: 29.186 ms (+204.3%) Bug: angleproject:8226 Change-Id: I447ff807cd6b72ff3fc115e73736fe63eb642785 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4632728 Commit-Queue: Igor Nazarov <i.nazarov@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Steven Noonan f6c7dc89 2023-06-23T02:21:02 Spinlock: implement ANGLE_SMT_PAUSE for ARM/ARM64 This intrinsic is available on GCC, Clang, and MSVC. Bug: angleproject:6067 Change-Id: I010eefa3417df196407fb8182c0de927f4bf0cab Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4639491 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
John Plate 44a5c913 2021-06-17T09:29:29 CL: Make CL front end and back end thread-safe Add locking to all mutable variables of the CL objects in the front end and pass-through back end to make them thread-safe. This fixes a crash in a multi-threaded CTS test. Bug: angleproject:6015 Change-Id: I1d6471c851217639411c434c82acd32d14035291 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2967468 Commit-Queue: John Plate <jplate@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>