Title: [196917] releases/WebKitGTK/webkit-2.10/Source/WTF
- Revision
- 196917
- Author
- [email protected]
- Date
- 2016-02-22 01:30:51 -0800 (Mon, 22 Feb 2016)
Log Message
Merge r196259 - Make sure that locking code that relies on module boundaries for compiler fences uses NEVER_INLINE
https://bugs.webkit.org/show_bug.cgi?id=153972
Reviewed by Andreas Kling.
When this code was written, we assumed that module boundaries were compiler fences. That might
not be the case if we ever do LTO.
* wtf/Lock.cpp:
(WTF::LockBase::lockSlow):
(WTF::LockBase::unlockSlow):
* wtf/ParkingLot.cpp:
(WTF::ParkingLot::parkConditionally):
(WTF::ParkingLot::unparkOne):
(WTF::ParkingLot::unparkAll):
(WTF::ParkingLot::forEach):
* wtf/WordLock.cpp:
(WTF::WordLock::lockSlow):
(WTF::WordLock::unlockSlow):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.10/Source/WTF/ChangeLog (196916 => 196917)
--- releases/WebKitGTK/webkit-2.10/Source/WTF/ChangeLog 2016-02-22 09:29:39 UTC (rev 196916)
+++ releases/WebKitGTK/webkit-2.10/Source/WTF/ChangeLog 2016-02-22 09:30:51 UTC (rev 196917)
@@ -1,3 +1,25 @@
+2016-02-08 Filip Pizlo <[email protected]>
+
+ Make sure that locking code that relies on module boundaries for compiler fences uses NEVER_INLINE
+ https://bugs.webkit.org/show_bug.cgi?id=153972
+
+ Reviewed by Andreas Kling.
+
+ When this code was written, we assumed that module boundaries were compiler fences. That might
+ not be the case if we ever do LTO.
+
+ * wtf/Lock.cpp:
+ (WTF::LockBase::lockSlow):
+ (WTF::LockBase::unlockSlow):
+ * wtf/ParkingLot.cpp:
+ (WTF::ParkingLot::parkConditionally):
+ (WTF::ParkingLot::unparkOne):
+ (WTF::ParkingLot::unparkAll):
+ (WTF::ParkingLot::forEach):
+ * wtf/WordLock.cpp:
+ (WTF::WordLock::lockSlow):
+ (WTF::WordLock::unlockSlow):
+
2015-12-20 Michael Catanzaro <[email protected]>
[SOUP] Performs DNS prefetch when a proxy is configured (information leak)
Modified: releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/Lock.cpp (196916 => 196917)
--- releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/Lock.cpp 2016-02-22 09:29:39 UTC (rev 196916)
+++ releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/Lock.cpp 2016-02-22 09:30:51 UTC (rev 196917)
@@ -36,7 +36,7 @@
static const bool verbose = false;
-void LockBase::lockSlow()
+NEVER_INLINE void LockBase::lockSlow()
{
unsigned spinCount = 0;
@@ -74,7 +74,7 @@
}
}
-void LockBase::unlockSlow()
+NEVER_INLINE void LockBase::unlockSlow()
{
// We could get here because the weak CAS in unlock() failed spuriously, or because there is
// someone parked. So, we need a CAS loop: even if right now the lock is just held, it could
Modified: releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/ParkingLot.cpp (196916 => 196917)
--- releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/ParkingLot.cpp 2016-02-22 09:29:39 UTC (rev 196916)
+++ releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/ParkingLot.cpp 2016-02-22 09:30:51 UTC (rev 196917)
@@ -507,7 +507,7 @@
} // anonymous namespace
-bool ParkingLot::parkConditionally(
+NEVER_INLINE bool ParkingLot::parkConditionally(
const void* address,
std::function<bool()> validation,
std::function<void()> beforeSleep,
@@ -592,7 +592,7 @@
return !didFind;
}
-bool ParkingLot::unparkOne(const void* address)
+NEVER_INLINE bool ParkingLot::unparkOne(const void* address)
{
if (verbose)
dataLog(toString(currentThread(), ": unparking one.\n"));
@@ -623,7 +623,7 @@
return result;
}
-void ParkingLot::unparkOne(
+NEVER_INLINE void ParkingLot::unparkOne(
const void* address,
std::function<void(bool didUnparkThread, bool mayHaveMoreThreads)> callback)
{
@@ -656,7 +656,7 @@
threadData->parkingCondition.notify_one();
}
-void ParkingLot::unparkAll(const void* address)
+NEVER_INLINE void ParkingLot::unparkAll(const void* address)
{
if (verbose)
dataLog(toString(currentThread(), ": unparking all from ", RawPointer(address), ".\n"));
@@ -690,7 +690,7 @@
dataLog(toString(currentThread(), ": done unparking.\n"));
}
-void ParkingLot::forEach(std::function<void(ThreadIdentifier, const void*)> callback)
+NEVER_INLINE void ParkingLot::forEach(std::function<void(ThreadIdentifier, const void*)> callback)
{
Vector<Bucket*> bucketsToUnlock = lockHashtable();
Modified: releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/WordLock.cpp (196916 => 196917)
--- releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/WordLock.cpp 2016-02-22 09:29:39 UTC (rev 196916)
+++ releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/WordLock.cpp 2016-02-22 09:30:51 UTC (rev 196917)
@@ -77,7 +77,7 @@
} // anonymous namespace
-void WordLock::lockSlow()
+NEVER_INLINE void WordLock::lockSlow()
{
unsigned spinCount = 0;
@@ -178,7 +178,7 @@
}
}
-void WordLock::unlockSlow()
+NEVER_INLINE void WordLock::unlockSlow()
{
// The fast path can fail either because of spurious weak CAS failure, or because someone put a
// thread on the queue, or the queue lock is held. If the queue lock is held, it can only be
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes