Skip to content

Commit 16f8990

Browse files
committed
TZone update - Eliminate type registration, update seeding and add logging
https://bugs.webkit.org/show_bug.cgi?id=277383 rdar://132850563 Reviewed by Yusuke Suzuki. Eliminated the need to register TZone annotated types. Did this by changing the number of buckets per size class to be based the size of the class and not the number of types in the size class. Changed the seeding, for Darwin platforms, to use the boot UUID and the name of the current process. These two changes allow for the TZone infrastructure to be lazily initialized as participating types are allocated. Added logging for TZone with output either to stderr or os_log based upon the setting of the TZONE_LOGGING environment variable. Most of the logging is compile time turned off via the setting of the TZoneHeapManager::verbose constant. Eliminated several files and the passing of the seed from the command line. This change has the TZone system turned off via the PlatformUsh.h macro USE_TZONE_MALLOC being set to 0. * Source/JavaScriptCore/API/tests/testapi.cpp: * Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj: * Source/JavaScriptCore/Sources.txt: * Source/JavaScriptCore/assembler/testmasm.cpp: (main): * Source/JavaScriptCore/b3/air/testair.cpp: (main): * Source/JavaScriptCore/b3/testb3.h: * Source/JavaScriptCore/b3/testb3_1.cpp: (main): * Source/JavaScriptCore/dfg/testdfg.cpp: (main): * Source/JavaScriptCore/jsc.cpp: (main): (jscmain): * Source/JavaScriptCore/runtime/InitializeThreading.cpp: (JSC::initialize): * Source/JavaScriptCore/runtime/RegisterTZoneTypes.cpp: Removed. * Source/JavaScriptCore/runtime/RegisterTZoneTypes.h: Removed. * Source/JavaScriptCore/runtime/TZoneInit.cpp: Removed. * Source/JavaScriptCore/runtime/TZoneInit.h: Removed. * Source/JavaScriptCore/runtime/WeakGCSet.h: * Source/JavaScriptCore/wasm/WasmMemory.cpp: * Source/JavaScriptCore/wasm/WasmMemory.h: * Source/WTF/WTF.xcodeproj/project.pbxproj: * Source/WTF/wtf/CMakeLists.txt: * Source/WTF/wtf/PlatformUse.h: * Source/WTF/wtf/TZoneMalloc.h: * Source/WTF/wtf/TZoneMallocInlines.h: * Source/WebKit/Shared/API/Cocoa/WKMain.h: * Source/WebKit/Shared/API/Cocoa/WKMain.mm: (WKXPCServiceMain): * Source/WebKit/Shared/API/RegisterTZoneTypes.cpp: Removed. * Source/WebKit/Shared/API/RegisterTZoneTypes.h: Removed. * Source/WebKit/Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp: (main): * Source/WebKit/Sources.txt: * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Source/bmalloc/bmalloc.xcodeproj/project.pbxproj: * Source/bmalloc/bmalloc/BPlatform.h: * Source/bmalloc/bmalloc/ProcessCheck.h: * Source/bmalloc/bmalloc/ProcessCheck.mm: (bmalloc::ProcessNames::getAppName): (bmalloc::ProcessNames::getProcessName): (bmalloc::ProcessNames::getCString): (bmalloc::ProcessNames::ProcessNames): (bmalloc::ProcessNames::ensureInstance): (bmalloc::ProcessNames::getInstance): (bmalloc::ProcessNames::appName): (bmalloc::ProcessNames::processName): (bmalloc::ProcessNames::asCString): (bmalloc::processNameString): (bmalloc::gigacageEnabledForProcess): (bmalloc::shouldProcessUnconditionallyUseBmalloc): * Source/bmalloc/bmalloc/TZoneHeap.h: (bmalloc::api::TZoneHeapBase::provideHeap): (bmalloc::api::TZoneHeap::allocate): * Source/bmalloc/bmalloc/TZoneHeapInlines.h: * Source/bmalloc/bmalloc/TZoneHeapManager.cpp: (bmalloc::api::dumpRegisterdTypesAtExit): (bmalloc::api::TZoneHeapManager::init): (bmalloc::api::TZoneHeapManager::isReady): (bmalloc::api::TZoneHeapManager::dumpRegisterdTypes): (bmalloc::api::TZoneHeapManager::ensureInstance): (bmalloc::api::TZoneHeapManager::populateBucketsForSizeClass): (bmalloc::api::TZoneHeapManager::heapRefForTZoneType): (bmalloc::api::TZoneHeapManager::registerTZoneTypes): Deleted. (bmalloc::api::TZoneHeapManager::closeRegistration): Deleted. * Source/bmalloc/bmalloc/TZoneHeapManager.h: (bmalloc::api::TZoneHeapManager::SizeAndAlign::hash): (bmalloc::api::TZoneHeapManager::SizeAndAlign::operator< const): (bmalloc::api::TZoneHeapManager::bucketCountForSizeClass): (bmalloc::api::TZoneHeapManager::tzoneBucketForKey): (bmalloc::api::TZoneHeapManager::bucketCountForTypeCount): Deleted. * Source/bmalloc/bmalloc/TZoneLog.cpp: Added. (bmalloc::api::TZoneLog::init): (bmalloc::api::TZoneLog::getInstance): (bmalloc::api::TZoneLog::log): (bmalloc::api::TZoneLog::osLogWithLineBuffer): (bmalloc::api::TZoneLog::ensureInstance): * Source/bmalloc/bmalloc/TZoneLog.h: Renamed from Source/WTF/wtf/TZoneMallocInitialization.h. (bmalloc::api::TZoneLog::TZoneLog): (bmalloc::api::TZoneLog::useStdErr): (bmalloc::api::TZoneLog::useOSLog): (bmalloc::api::TZoneLog::osLog const): * Tools/DumpRenderTree/mac/DumpRenderTree.mm: (DumpRenderTreeMain): Canonical link: https://commits.webkit.org/281673@main
1 parent 718f9c8 commit 16f8990

40 files changed

Lines changed: 506 additions & 599 deletions

‎Source/JavaScriptCore/API/tests/testapi.cpp‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,13 @@
2828
#include "APICast.h"
2929
#include "JSGlobalObjectInlines.h"
3030
#include "MarkedJSValueRefArray.h"
31-
#include "RegisterTZoneTypes.h"
3231
#include <JavaScriptCore/JSContextRefPrivate.h>
3332
#include <JavaScriptCore/JSObjectRefPrivate.h>
3433
#include <JavaScriptCore/JavaScript.h>
3534
#include <wtf/DataLog.h>
3635
#include <wtf/Expected.h>
3736
#include <wtf/Noncopyable.h>
3837
#include <wtf/NumberOfCores.h>
39-
#include <wtf/TZoneMallocInitialization.h>
4038
#include <wtf/Vector.h>
4139
#include <wtf/text/MakeString.h>
4240
#include <wtf/text/StringCommon.h>

‎Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,6 @@
12441244
641DF80E2890C7D500F9895F /* WasmSIMDOpcodes.h in Headers */ = {isa = PBXBuildFile; fileRef = 641DF80D2890C7D500F9895F /* WasmSIMDOpcodes.h */; settings = {ATTRIBUTES = (Private, ); }; };
12451245
642D20D42B476A250030545E /* WasmSlowPaths.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14AB0C92231747B7000250BC /* WasmSlowPaths.cpp */; };
12461246
642D20D52B476A2E0030545E /* WasmIPIntSlowPaths.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 53091F972ABE1F570076CBC4 /* WasmIPIntSlowPaths.cpp */; };
1247-
65072B082B6C3DEA0065065C /* RegisterTZoneTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 65072B062B6C3DEA0065065C /* RegisterTZoneTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
12481247
6507D29E0E871E5E00D7D896 /* JSTypeInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 6507D2970E871E4A00D7D896 /* JSTypeInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
12491248
651122FD14046A4C002B101D /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* JavaScriptCore.framework */; };
12501249
651122FE14046A4C002B101D /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */; };
@@ -1258,7 +1257,6 @@
12581257
658D3A5619638268003C45D6 /* VMEntryRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = 658D3A5519638268003C45D6 /* VMEntryRecord.h */; settings = {ATTRIBUTES = (Private, ); }; };
12591258
659CDA5B1F6753F200D3E53F /* YarrUnicodeProperties.h in Headers */ = {isa = PBXBuildFile; fileRef = 659CDA5A1F67509800D3E53F /* YarrUnicodeProperties.h */; settings = {ATTRIBUTES = (Private, ); }; };
12601259
65B8392E1BACAD360044E824 /* CachedRecovery.h in Headers */ = {isa = PBXBuildFile; fileRef = 65B8392C1BACA92A0044E824 /* CachedRecovery.h */; };
1261-
65F85BD42B7F067600D0AC74 /* TZoneInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 65F85BD22B7F067500D0AC74 /* TZoneInit.h */; settings = {ATTRIBUTES = (Private, ); }; };
12621260
6A38CFAA1E32B5AB0060206F /* AsyncStackTrace.h in Headers */ = {isa = PBXBuildFile; fileRef = 6A38CFA81E32B58B0060206F /* AsyncStackTrace.h */; settings = {ATTRIBUTES = (Private, ); }; };
12631261
6A4C2E162A2E353900D56933 /* FunctionToStringTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6A4C2E152A2E353900D56933 /* FunctionToStringTests.cpp */; };
12641262
6AD2CB4D19B9140100065719 /* DebuggerEvalEnabler.h in Headers */ = {isa = PBXBuildFile; fileRef = 6AD2CB4C19B9140100065719 /* DebuggerEvalEnabler.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -4345,8 +4343,6 @@
43454343
62EC9BB41B7EB07C00303AD1 /* CallFrameShuffleData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CallFrameShuffleData.cpp; sourceTree = "<group>"; };
43464344
62EC9BB51B7EB07C00303AD1 /* CallFrameShuffleData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallFrameShuffleData.h; sourceTree = "<group>"; };
43474345
641DF80D2890C7D500F9895F /* WasmSIMDOpcodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmSIMDOpcodes.h; sourceTree = "<group>"; };
4348-
65072B052B6C3DEA0065065C /* RegisterTZoneTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterTZoneTypes.cpp; sourceTree = "<group>"; };
4349-
65072B062B6C3DEA0065065C /* RegisterTZoneTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterTZoneTypes.h; sourceTree = "<group>"; };
43504346
6507D2970E871E4A00D7D896 /* JSTypeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTypeInfo.h; sourceTree = "<group>"; };
43514347
651122E5140469BA002B101D /* testRegExp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = testRegExp.cpp; sourceTree = "<group>"; };
43524348
6511230514046A4C002B101D /* testRegExp */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = testRegExp; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -4407,8 +4403,6 @@
44074403
65EA4C9A092AF9E20093D800 /* JSLock.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = JSLock.h; sourceTree = "<group>"; tabWidth = 8; };
44084404
65EA73620BAE35D1001BB560 /* CommonIdentifiers.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CommonIdentifiers.cpp; sourceTree = "<group>"; };
44094405
65EA73630BAE35D1001BB560 /* CommonIdentifiers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CommonIdentifiers.h; sourceTree = "<group>"; };
4410-
65F85BD22B7F067500D0AC74 /* TZoneInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZoneInit.h; sourceTree = "<group>"; };
4411-
65F85BD32B7F067500D0AC74 /* TZoneInit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TZoneInit.cpp; sourceTree = "<group>"; };
44124406
65FB5115184EE8F800C12B70 /* ProtoCallFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProtoCallFrame.h; sourceTree = "<group>"; };
44134407
6A38CFA71E32B58B0060206F /* AsyncStackTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AsyncStackTrace.cpp; sourceTree = "<group>"; };
44144408
6A38CFA81E32B58B0060206F /* AsyncStackTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncStackTrace.h; sourceTree = "<group>"; };
@@ -8641,8 +8635,6 @@
86418635
84925A9A22B30CBA00D1DFFF /* RegExpStringIteratorPrototype.cpp */,
86428636
84925A9B22B30CBA00D1DFFF /* RegExpStringIteratorPrototype.h */,
86438637
276B38A22A71D1B600252F4E /* RegExpStringIteratorPrototypeInlines.h */,
8644-
65072B052B6C3DEA0065065C /* RegisterTZoneTypes.cpp */,
8645-
65072B062B6C3DEA0065065C /* RegisterTZoneTypes.h */,
86468638
FE9F3FBA2613C87C0069E89F /* ResourceExhaustion.cpp */,
86478639
FE9F3FB82613C7880069E89F /* ResourceExhaustion.h */,
86488640
70B0A9D01A9B66200001306A /* RuntimeFlags.h */,
@@ -8823,8 +8815,6 @@
88238815
0F2D4DE019832D91007D4B19 /* TypeProfilerLog.h */,
88248816
0F2D4DE319832D91007D4B19 /* TypeSet.cpp */,
88258817
0F2D4DE419832D91007D4B19 /* TypeSet.h */,
8826-
65F85BD32B7F067500D0AC74 /* TZoneInit.cpp */,
8827-
65F85BD22B7F067500D0AC74 /* TZoneInit.h */,
88288818
0F5B4A321C84F0D600F1B17E /* UGPRPair.h */,
88298819
A7A8AF3217ADB5F3005AB174 /* Uint16Array.h */,
88308820
866739D113BFDE710023D87C /* Uint16WithFraction.h */,
@@ -11597,7 +11587,6 @@
1159711587
623A37EC1B87A7C000754209 /* RegisterMap.h in Headers */,
1159811588
0FC314121814559100033232 /* RegisterSet.h in Headers */,
1159911589
0FD0E5F01E46BF250006AB08 /* RegisterState.h in Headers */,
11600-
65072B082B6C3DEA0065065C /* RegisterTZoneTypes.h in Headers */,
1160111590
A57D23EE1891B5540031C7FA /* RegularExpression.h in Headers */,
1160211591
0F7CF94F1DBEEE880098CC12 /* ReleaseHeapAccessScope.h in Headers */,
1160311592
99D6A1161BEAD34D00E25C37 /* RemoteAutomationTarget.h in Headers */,
@@ -11787,7 +11776,6 @@
1178711776
52C952B719A289850069B386 /* TypeProfiler.h in Headers */,
1178811777
0F2D4DEC19832DC4007D4B19 /* TypeProfilerLog.h in Headers */,
1178911778
0F2D4DF019832DD6007D4B19 /* TypeSet.h in Headers */,
11790-
65F85BD42B7F067600D0AC74 /* TZoneInit.h in Headers */,
1179111779
0F5B4A331C84F0D600F1B17E /* UGPRPair.h in Headers */,
1179211780
A7A8AF4117ADB5F3005AB174 /* Uint16Array.h in Headers */,
1179311781
866739D313BFDE710023D87C /* Uint16WithFraction.h in Headers */,

‎Source/JavaScriptCore/Sources.txt‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,6 @@ runtime/RegExpMatchesArray.cpp
10271027
runtime/RegExpObject.cpp
10281028
runtime/RegExpPrototype.cpp
10291029
runtime/RegExpStringIteratorPrototype.cpp
1030-
runtime/RegisterTZoneTypes.cpp
10311030
runtime/ResourceExhaustion.cpp
10321031
runtime/RuntimeTZoneImpls.cpp
10331032
runtime/RuntimeType.cpp
@@ -1061,7 +1060,6 @@ runtime/SymbolObject.cpp
10611060
runtime/SymbolPrototype.cpp
10621061
runtime/SymbolTable.cpp
10631062
runtime/SyntheticModuleRecord.cpp
1064-
runtime/TZoneInit.cpp
10651063
runtime/TemplateObjectDescriptor.cpp
10661064
runtime/TemporalCalendar.cpp
10671065
runtime/TemporalCalendarConstructor.cpp

‎Source/JavaScriptCore/assembler/testmasm.cpp‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "InitializeThreading.h"
3333
#include "LinkBuffer.h"
3434
#include "ProbeContext.h"
35-
#include "RegisterTZoneTypes.h"
3635
#include "StackAlignment.h"
3736
#include <limits>
3837
#include <wtf/Compiler.h>
@@ -41,7 +40,6 @@
4140
#include <wtf/Lock.h>
4241
#include <wtf/NumberOfCores.h>
4342
#include <wtf/PtrTag.h>
44-
#include <wtf/TZoneMallocInitialization.h>
4543
#include <wtf/Threading.h>
4644
#include <wtf/WTFProcess.h>
4745
#include <wtf/text/StringCommon.h>
@@ -6291,15 +6289,8 @@ static void run(const char*)
62916289

62926290
#endif // ENABLE(JIT)
62936291

6294-
int main(int argc, char** argv WTF_TZONE_EXTRA_MAIN_ARGS)
6292+
int main(int argc, char** argv)
62956293
{
6296-
#if USE(TZONE_MALLOC)
6297-
const char* boothash = GET_TZONE_SEED_FROM_ENV(darwinEnvp);
6298-
WTF_TZONE_INIT(boothash);
6299-
JSC::registerTZoneTypes();
6300-
WTF_TZONE_REGISTRATION_DONE();
6301-
#endif
6302-
63036294
const char* filter = nullptr;
63046295
switch (argc) {
63056296
case 1:

‎Source/JavaScriptCore/b3/air/testair.cpp‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,12 @@
4141
#include "Options.h"
4242
#include "ProbeContext.h"
4343
#include "PureNaN.h"
44-
#include "RegisterTZoneTypes.h"
4544
#include <regex>
4645
#include <string>
4746
#include <wtf/DataLog.h>
4847
#include <wtf/Lock.h>
4948
#include <wtf/NumberOfCores.h>
5049
#include <wtf/StdMap.h>
51-
#include <wtf/TZoneMallocInitialization.h>
5250
#include <wtf/Threading.h>
5351
#include <wtf/WTFProcess.h>
5452
#include <wtf/text/StringCommon.h>
@@ -2778,15 +2776,8 @@ static void run(const char*)
27782776

27792777
#endif // ENABLE(B3_JIT)
27802778

2781-
int main(int argc, char** argv WTF_TZONE_EXTRA_MAIN_ARGS)
2779+
int main(int argc, char** argv)
27822780
{
2783-
#if USE(TZONE_MALLOC)
2784-
const char* boothash = GET_TZONE_SEED_FROM_ENV(darwinEnvp);
2785-
WTF_TZONE_INIT(boothash);
2786-
JSC::registerTZoneTypes();
2787-
WTF_TZONE_REGISTRATION_DONE();
2788-
#endif
2789-
27902781
const char* filter = nullptr;
27912782
switch (argc) {
27922783
case 1:

‎Source/JavaScriptCore/b3/testb3.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979
#include <wtf/Lock.h>
8080
#include <wtf/NumberOfCores.h>
8181
#include <wtf/StdList.h>
82-
#include <wtf/TZoneMallocInitialization.h>
8382
#include <wtf/Threading.h>
8483
#include <wtf/WTFProcess.h>
8584
#include <wtf/text/StringCommon.h>

‎Source/JavaScriptCore/b3/testb3_1.cpp‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
#include "config.h"
2727
#include "testb3.h"
2828

29-
#include "RegisterTZoneTypes.h"
30-
#include <wtf/TZoneMallocInitialization.h>
31-
3229
#if ENABLE(B3_JIT) && !CPU(ARM)
3330

3431
Lock crashLock;
@@ -938,15 +935,8 @@ extern const JSC::JITOperationAnnotation startOfJITOperationsInTestB3 __asm("sec
938935
extern const JSC::JITOperationAnnotation endOfJITOperationsInTestB3 __asm("section$end$__DATA_CONST$__jsc_ops");
939936
#endif
940937

941-
int main(int argc, char** argv WTF_TZONE_EXTRA_MAIN_ARGS)
938+
int main(int argc, char** argv)
942939
{
943-
#if USE(TZONE_MALLOC)
944-
const char* boothash = GET_TZONE_SEED_FROM_ENV(darwinEnvp);
945-
WTF_TZONE_INIT(boothash);
946-
JSC::registerTZoneTypes();
947-
WTF_TZONE_REGISTRATION_DONE();
948-
#endif
949-
950940
TestConfig config;
951941
for (int i = 1; i < argc; i++) {
952942
if (!strcmp(argv[i], "-filter")) {

‎Source/JavaScriptCore/dfg/testdfg.cpp‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
// The above are needed before DFGAbstractValue.h
3030
#include "DFGAbstractValue.h"
3131
#include "InitializeThreading.h"
32-
#include "RegisterTZoneTypes.h"
3332
#include <wtf/DataLog.h>
34-
#include <wtf/TZoneMallocInitialization.h>
3533
#include <wtf/Threading.h>
3634
#include <wtf/WTFProcess.h>
3735
#include <wtf/text/StringCommon.h>
@@ -101,15 +99,8 @@ static void run(const char*)
10199

102100
#endif // ENABLE(DFG_JIT)
103101

104-
int main(int argc, char** argv WTF_TZONE_EXTRA_MAIN_ARGS)
102+
int main(int argc, char** argv)
105103
{
106-
#if USE(TZONE_MALLOC)
107-
const char* boothash = GET_TZONE_SEED_FROM_ENV(darwinEnvp);
108-
WTF_TZONE_INIT(boothash);
109-
JSC::registerTZoneTypes();
110-
WTF_TZONE_REGISTRATION_DONE();
111-
#endif
112-
113104
const char* filter = nullptr;
114105
switch (argc) {
115106
case 1:

‎Source/JavaScriptCore/jsc.cpp‎

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
#include "ObjectConstructor.h"
7171
#include "ParserError.h"
7272
#include "ProfilerDatabase.h"
73-
#include "RegisterTZoneTypes.h"
7473
#include "ReleaseHeapAccessScope.h"
7574
#include "SamplingProfiler.h"
7675
#include "SideDataRepository.h"
@@ -103,7 +102,6 @@
103102
#include <wtf/SafeStrerror.h>
104103
#include <wtf/Scope.h>
105104
#include <wtf/StringPrintStream.h>
106-
#include <wtf/TZoneMallocInitialization.h>
107105
#include <wtf/TZoneMallocInlines.h>
108106
#include <wtf/URL.h>
109107
#include <wtf/WTFProcess.h>
@@ -3460,13 +3458,8 @@ static void startTimeoutThreadIfNeeded(VM& vm)
34603458
startTimeoutTimer(timeoutDuration);
34613459
}
34623460

3463-
int main(int argc, char** argv WTF_TZONE_EXTRA_MAIN_ARGS)
3461+
int main(int argc, char** argv)
34643462
{
3465-
#if USE(TZONE_MALLOC)
3466-
const char* boothash = GET_TZONE_SEED_FROM_ENV(darwinEnvp);
3467-
WTF_TZONE_INIT(boothash);
3468-
#endif
3469-
34703463
#if OS(DARWIN)
34713464
#if __has_include(<libproc.h>)
34723465
// Let the kernel kill us when OOM
@@ -4356,22 +4349,12 @@ extern const JITOperationAnnotation startOfJITOperationsInShell __asm("section$s
43564349
extern const JITOperationAnnotation endOfJITOperationsInShell __asm("section$end$__DATA_CONST$__jsc_ops");
43574350
#endif
43584351

4359-
#if USE(TZONE_MALLOC)
4360-
extern const bmalloc::api::TZoneAnnotation startOfTZoneTypesInShell __asm("section$start$__DATA_CONST$__tzone_descs");
4361-
extern const bmalloc::api::TZoneAnnotation endOfTZoneTypesInShell __asm("section$end$__DATA_CONST$__tzone_descs");
4362-
#endif
4363-
43644352
int jscmain(int argc, char** argv)
43654353
{
43664354
// Need to override and enable restricted options before we start parsing options below.
43674355
JSC::Config::enableRestrictedOptions();
43684356

43694357
WTF::initializeMainThread();
4370-
#if USE(TZONE_MALLOC)
4371-
WTF_TZONE_REGISTER_TYPES(&startOfTZoneTypesInShell, &endOfTZoneTypesInShell);
4372-
JSC::registerTZoneTypes();
4373-
WTF_TZONE_REGISTRATION_DONE();
4374-
#endif
43754358

43764359
// Note that the options parsing can affect VM creation, and thus
43774360
// comes first.

‎Source/JavaScriptCore/runtime/InitializeThreading.cpp‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,12 @@
3939
#include "LLIntData.h"
4040
#include "NativeCalleeRegistry.h"
4141
#include "Options.h"
42-
#include "RegisterTZoneTypes.h"
4342
#include "SuperSampler.h"
4443
#include "VMTraps.h"
4544
#include "WasmCapabilities.h"
4645
#include "WasmFaultSignalHandler.h"
4746
#include "WasmThunks.h"
4847
#include <mutex>
49-
#include <wtf/TZoneMallocInitialization.h>
5048
#include <wtf/Threading.h>
5149
#include <wtf/threads/Signals.h>
5250

@@ -72,14 +70,6 @@ void initialize()
7270
static std::once_flag onceFlag;
7371

7472
std::call_once(onceFlag, [] {
75-
#if USE(TZONE_MALLOC)
76-
// This is needed for apps that link with the JavaScriptCore ObjC API
77-
if (!WTF_TZONE_IS_READY()) {
78-
WTF_TZONE_INIT(nullptr);
79-
JSC::registerTZoneTypes();
80-
WTF_TZONE_REGISTRATION_DONE();
81-
}
82-
#endif
8373
WTF::initialize();
8474
Options::initialize();
8575

0 commit comments

Comments
 (0)