Changeset 249065 in webkit


Ignore:
Timestamp:
Aug 23, 2019 1:55:28 PM (5 years ago)
Author:
mark.lam@apple.com
Message:

Undo disabling of IsoHeaps when Gigacage is off.
https://bugs.webkit.org/show_bug.cgi?id=201061
<rdar://problem/54622500>

Reviewed by Saam Barati and Michael Saboff.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/IsoTLS.cpp:

(bmalloc::IsoTLS::determineMallocFallbackState):

  • bmalloc/PerThread.cpp: Removed.
  • bmalloc/PerThread.h:
Location:
trunk/Source/bmalloc
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/bmalloc/CMakeLists.txt

    r245940 r249065  
    3030    bmalloc/ObjectType.cpp
    3131    bmalloc/PerProcess.cpp
    32     bmalloc/PerThread.cpp
    3332    bmalloc/Scavenger.cpp
    3433    bmalloc/VMHeap.cpp
  • trunk/Source/bmalloc/ChangeLog

    r248850 r249065  
     12019-08-22  Mark Lam  <mark.lam@apple.com>
     2
     3        Undo disabling of IsoHeaps when Gigacage is off.
     4        https://bugs.webkit.org/show_bug.cgi?id=201061
     5        <rdar://problem/54622500>
     6
     7        Reviewed by Saam Barati and Michael Saboff.
     8
     9        * CMakeLists.txt:
     10        * bmalloc.xcodeproj/project.pbxproj:
     11        * bmalloc/IsoTLS.cpp:
     12        (bmalloc::IsoTLS::determineMallocFallbackState):
     13        * bmalloc/PerThread.cpp: Removed.
     14        * bmalloc/PerThread.h:
     15
    1162019-08-19  Yusuke Suzuki  <ysuzuki@apple.com>
    217
  • trunk/Source/bmalloc/bmalloc.xcodeproj/project.pbxproj

    r245908 r249065  
    131131                4426E2831C839547008EB042 /* BSoftLinking.h in Headers */ = {isa = PBXBuildFile; fileRef = 4426E2821C839547008EB042 /* BSoftLinking.h */; };
    132132                52F47249210BA30200B730BB /* MemoryStatusSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 52F47248210BA2F500B730BB /* MemoryStatusSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
    133                 6543DDB420EEAEF3003B23D8 /* PerThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6543DDB320EEAEF3003B23D8 /* PerThread.cpp */; };
    134133                6599C5CC1EC3F15900A2F7BB /* AvailableMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6599C5CA1EC3F15900A2F7BB /* AvailableMemory.cpp */; };
    135134                6599C5CD1EC3F15900A2F7BB /* AvailableMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 6599C5CB1EC3F15900A2F7BB /* AvailableMemory.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    283282                4426E2821C839547008EB042 /* BSoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSoftLinking.h; path = bmalloc/darwin/BSoftLinking.h; sourceTree = "<group>"; };
    284283                52F47248210BA2F500B730BB /* MemoryStatusSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemoryStatusSPI.h; path = bmalloc/darwin/MemoryStatusSPI.h; sourceTree = "<group>"; };
    285                 6543DDB320EEAEF3003B23D8 /* PerThread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = PerThread.cpp; path = bmalloc/PerThread.cpp; sourceTree = "<group>"; };
    286284                6599C5CA1EC3F15900A2F7BB /* AvailableMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AvailableMemory.cpp; path = bmalloc/AvailableMemory.cpp; sourceTree = "<group>"; };
    287285                6599C5CB1EC3F15900A2F7BB /* AvailableMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AvailableMemory.h; path = bmalloc/AvailableMemory.h; sourceTree = "<group>"; };
     
    529527                                0F26A7A42054830D0090A141 /* PerProcess.cpp */,
    530528                                14446A0717A61FA400F9EA1D /* PerProcess.h */,
    531                                 6543DDB320EEAEF3003B23D8 /* PerThread.cpp */,
    532529                                144469FD17A61F1F00F9EA1D /* PerThread.h */,
    533530                                145F6878179E3A4400D65598 /* Range.h */,
     
    772769                                14F271C818EA3990008C152F /* ObjectType.cpp in Sources */,
    773770                                0F26A7A5205483130090A141 /* PerProcess.cpp in Sources */,
    774                                 6543DDB420EEAEF3003B23D8 /* PerThread.cpp in Sources */,
    775771                                AD14AD2A202529C700890E3B /* ProcessCheck.mm in Sources */,
    776772                                0F5BF1521F22E1570029D91D /* Scavenger.cpp in Sources */,
  • trunk/Source/bmalloc/bmalloc/IsoTLS.cpp

    r247714 r249065  
    2727
    2828#include "Environment.h"
    29 #include "Gigacage.h"
    3029#include "IsoTLSEntryInlines.h"
    3130#include "IsoTLSInlines.h"
     
    185184                return;
    186185
    187 #if GIGACAGE_ENABLED || BCPU(ARM64)
    188 #if !BCPU(ARM64)
    189             if (!Gigacage::shouldBeEnabled()) {
    190                 s_mallocFallbackState = MallocFallbackState::FallBackToMalloc;
    191                 return;
    192             }
    193 #endif
    194186            const char* env = getenv("bmalloc_IsoHeap");
    195187            if (env && (!strcasecmp(env, "false") || !strcasecmp(env, "no") || !strcmp(env, "0")))
     
    197189            else
    198190                s_mallocFallbackState = MallocFallbackState::DoNotFallBack;
    199 #else
    200             s_mallocFallbackState = MallocFallbackState::FallBackToMalloc;
    201 #endif
    202191        });
    203192}
  • trunk/Source/bmalloc/bmalloc/PerThread.cpp

    r233773 r249065  
    1 /*
    2  * Copyright (C) 2018 Apple Inc. All rights reserved.
    3  *
    4  * Redistribution and use in source and binary forms, with or without
    5  * modification, are permitted provided that the following conditions
    6  * are met:
    7  * 1. Redistributions of source code must retain the above copyright
    8  *    notice, this list of conditions and the following disclaimer.
    9  * 2. Redistributions in binary form must reproduce the above copyright
    10  *    notice, this list of conditions and the following disclaimer in the
    11  *    documentation and/or other materials provided with the distribution.
    12  *
    13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
    21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    24  */
    25 
    26 #include "PerThread.h"
    27 
    28 #include "BExport.h"
    29 #include "Cache.h"
    30 #include "Heap.h"
    31 
    32 namespace bmalloc {
    33 
    34 #if !HAVE_PTHREAD_MACHDEP_H
    35 
    36 template<> BEXPORT bool PerThreadStorage<PerHeapKind<Cache>>::s_didInitialize = false;
    37 template<> BEXPORT pthread_key_t PerThreadStorage<PerHeapKind<Cache>>::s_key = 0;
    38 template<> BEXPORT std::once_flag PerThreadStorage<PerHeapKind<Cache>>::s_onceFlag = { };
    39 
    40 template<> BEXPORT bool PerThreadStorage<PerHeapKind<Heap>>::s_didInitialize = false;
    41 template<> BEXPORT pthread_key_t PerThreadStorage<PerHeapKind<Heap>>::s_key = 0;
    42 template<> BEXPORT std::once_flag PerThreadStorage<PerHeapKind<Heap>>::s_onceFlag = { };
    43 
    44 #endif
    45 
    46 } // namespace bmalloc
  • trunk/Source/bmalloc/bmalloc/PerThread.h

    r233773 r249065  
    11/*
    2  * Copyright (C) 2014-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    109109};
    110110
    111 class Cache;
    112 class Heap;
    113 
    114 template<> bool PerThreadStorage<PerHeapKind<Cache>>::s_didInitialize;
    115 template<> pthread_key_t PerThreadStorage<PerHeapKind<Cache>>::s_key;
    116 template<> std::once_flag PerThreadStorage<PerHeapKind<Cache>>::s_onceFlag;
    117 
    118 template<> bool PerThreadStorage<PerHeapKind<Heap>>::s_didInitialize;
    119 template<> pthread_key_t PerThreadStorage<PerHeapKind<Heap>>::s_key;
    120 template<> std::once_flag PerThreadStorage<PerHeapKind<Heap>>::s_onceFlag;
     111template<typename T> bool PerThreadStorage<T>::s_didInitialize;
     112template<typename T> pthread_key_t PerThreadStorage<T>::s_key;
     113template<typename T> std::once_flag PerThreadStorage<T>::s_onceFlag;
    121114
    122115#endif
Note: See TracChangeset for help on using the changeset viewer.