Title: [289556] branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_config.h
- Revision
- 289556
- Author
- [email protected]
- Date
- 2022-02-10 11:12:19 -0800 (Thu, 10 Feb 2022)
Log Message
Cherry-pick r289145. rdar://problem/88366590
[libpas] Use os_unfair_lock instead of spinlock
https://bugs.webkit.org/show_bug.cgi?id=236158
Reviewed by Geoffrey Garen.
os_unfair_lock is very fast while it can properly suspend threads.
A/B test result was neutral on Speedometer2 and JetStream2. So, to
reduce unnecessary CPU spins, let's replace spinlock with os_unfair_lock
if it is supported (if OS is Darwin).
* libpas/src/libpas/pas_config.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_config.h (289555 => 289556)
--- branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_config.h 2022-02-10 19:10:16 UTC (rev 289555)
+++ branches/safari-613-branch/Source/bmalloc/libpas/src/libpas/pas_config.h 2022-02-10 19:12:19 UTC (rev 289556)
@@ -99,10 +99,10 @@
#define PAS_ALLOCATOR_INDEX_BYTES 4
-#ifdef PAS_BMALLOC
+#if PAS_OS(DARWIN)
+#define PAS_USE_SPINLOCKS 0
+#else
#define PAS_USE_SPINLOCKS 1
-#else
-#define PAS_USE_SPINLOCKS 0
#endif
#endif /* PAS_CONFIG_H */
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes