Changeset 196917 in webkit


Ignore:
Timestamp:
Feb 22, 2016, 1:30:51 AM (10 years ago)
Author:
Carlos Garcia Campos
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):

Location:
releases/WebKitGTK/webkit-2.10/Source/WTF
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.10/Source/WTF/ChangeLog

    r195192 r196917  
     12016-02-08  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Make sure that locking code that relies on module boundaries for compiler fences uses NEVER_INLINE
     4        https://bugs.webkit.org/show_bug.cgi?id=153972
     5
     6        Reviewed by Andreas Kling.
     7
     8        When this code was written, we assumed that module boundaries were compiler fences. That might
     9        not be the case if we ever do LTO.
     10
     11        * wtf/Lock.cpp:
     12        (WTF::LockBase::lockSlow):
     13        (WTF::LockBase::unlockSlow):
     14        * wtf/ParkingLot.cpp:
     15        (WTF::ParkingLot::parkConditionally):
     16        (WTF::ParkingLot::unparkOne):
     17        (WTF::ParkingLot::unparkAll):
     18        (WTF::ParkingLot::forEach):
     19        * wtf/WordLock.cpp:
     20        (WTF::WordLock::lockSlow):
     21        (WTF::WordLock::unlockSlow):
     22
    1232015-12-20  Michael Catanzaro  <mcatanzaro@igalia.com>
    224
  • releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/Lock.cpp

    r188907 r196917  
    3737static const bool verbose = false;
    3838
    39 void LockBase::lockSlow()
     39NEVER_INLINE void LockBase::lockSlow()
    4040{
    4141    unsigned spinCount = 0;
     
    7575}
    7676
    77 void LockBase::unlockSlow()
     77NEVER_INLINE void LockBase::unlockSlow()
    7878{
    7979    // We could get here because the weak CAS in unlock() failed spuriously, or because there is
  • releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/ParkingLot.cpp

    r189724 r196917  
    508508} // anonymous namespace
    509509
    510 bool ParkingLot::parkConditionally(
     510NEVER_INLINE bool ParkingLot::parkConditionally(
    511511    const void* address,
    512512    std::function<bool()> validation,
     
    593593}
    594594
    595 bool ParkingLot::unparkOne(const void* address)
     595NEVER_INLINE bool ParkingLot::unparkOne(const void* address)
    596596{
    597597    if (verbose)
     
    624624}
    625625
    626 void ParkingLot::unparkOne(
     626NEVER_INLINE void ParkingLot::unparkOne(
    627627    const void* address,
    628628    std::function<void(bool didUnparkThread, bool mayHaveMoreThreads)> callback)
     
    657657}
    658658
    659 void ParkingLot::unparkAll(const void* address)
     659NEVER_INLINE void ParkingLot::unparkAll(const void* address)
    660660{
    661661    if (verbose)
     
    691691}
    692692
    693 void ParkingLot::forEach(std::function<void(ThreadIdentifier, const void*)> callback)
     693NEVER_INLINE void ParkingLot::forEach(std::function<void(ThreadIdentifier, const void*)> callback)
    694694{
    695695    Vector<Bucket*> bucketsToUnlock = lockHashtable();
  • releases/WebKitGTK/webkit-2.10/Source/WTF/wtf/WordLock.cpp

    r188323 r196917  
    7878} // anonymous namespace
    7979
    80 void WordLock::lockSlow()
     80NEVER_INLINE void WordLock::lockSlow()
    8181{
    8282    unsigned spinCount = 0;
     
    179179}
    180180
    181 void WordLock::unlockSlow()
     181NEVER_INLINE void WordLock::unlockSlow()
    182182{
    183183    // The fast path can fail either because of spurious weak CAS failure, or because someone put a
Note: See TracChangeset for help on using the changeset viewer.