Changeset 263055 in webkit
- Timestamp:
- Jun 15, 2020, 12:59:24 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r263054 r263055 1 2020-06-15 Mark Lam <mark.lam@apple.com> 2 3 Do not install the VMTraps signal handler if Options::useJIT=false. 4 https://bugs.webkit.org/show_bug.cgi?id=212543 5 <rdar://problem/63772519> 6 7 Reviewed by Keith Miller. 8 9 VMTraps is only needed for JITted code. Hence, if the JIT is disabled, we should 10 set Options::usePollingTraps() to true to indicate that we won't be using VMTraps. 11 12 With this change, we no longer install any signal handling machinery if 13 Options::useJIT() is false. 14 15 Because we may still disable the JIT even if useJIT() is true (due to failure to 16 allocate JIT memory or a number of other factors), we will also add a check of 17 VM::canUseJIT() in initializeThreading(), and disable useJIT() if needed. Of 18 course, this also means we need to call Options::recomputeDependentOptions() to 19 make other options consistent with useJIT() being false. 20 21 * runtime/InitializeThreading.cpp: 22 (JSC::initializeThreading): 23 * runtime/Options.cpp: 24 (JSC::disableAllJITOptions): 25 (JSC::Options::recomputeDependentOptions): 26 (JSC::recomputeDependentOptions): Deleted. 27 * runtime/Options.h: 28 * runtime/VMTraps.cpp: 29 (JSC::VMTraps::initializeSignals): 30 * tools/SigillCrashAnalyzer.cpp: 31 (JSC::SigillCrashAnalyzer::instance): 32 1 33 2020-06-15 Keith Miller <keith_miller@apple.com> 2 34 -
trunk/Source/JavaScriptCore/runtime/InitializeThreading.cpp
r263045 r263055 67 67 ExecutableAllocator::initialize(); 68 68 VM::computeCanUseJIT(); 69 if (!VM::canUseJIT()) { 70 Options::useJIT() = false; 71 Options::recomputeDependentOptions(); 72 } 69 73 70 if ( VM::canUseJIT() &&Options::useSigillCrashAnalyzer())74 if (Options::useSigillCrashAnalyzer()) 71 75 enableSigillCrashAnalyzer(); 72 76 -
trunk/Source/JavaScriptCore/runtime/Options.cpp
r263046 r263055 1 1 /* 2 * Copyright (C) 2011-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2011-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 376 376 } 377 377 378 static void recomputeDependentOptions() 379 { 380 #if !defined(NDEBUG) 381 Options::validateDFGExceptionHandling() = true; 382 #endif 383 #if !ENABLE(JIT) 378 static void disableAllJITOptions() 379 { 384 380 Options::useLLInt() = true; 385 381 Options::useJIT() = false; … … 389 385 Options::useDOMJIT() = false; 390 386 Options::useRegExpJIT() = false; 387 } 388 389 void Options::recomputeDependentOptions() 390 { 391 #if !defined(NDEBUG) 392 Options::validateDFGExceptionHandling() = true; 393 #endif 394 #if !ENABLE(JIT) 395 disableAllJITOptions(); 391 396 #endif 392 397 #if !ENABLE(CONCURRENT_JS) … … 408 413 #endif 409 414 415 // At initialization time, we may decide that useJIT should be false for any 416 // number of reasons (including failing to allocate JIT memory), and therefore, 417 // will / should not be able to enable any JIT related services. 410 418 if (!Options::useJIT()) { 419 disableAllJITOptions(); 420 Options::useConcurrentJIT() = false; 411 421 Options::useSigillCrashAnalyzer() = false; 412 422 Options::useWebAssembly() = false; 423 Options::usePollingTraps() = true; 413 424 } 414 425 -
trunk/Source/JavaScriptCore/runtime/Options.h
r253164 r263055 1 1 /* 2 * Copyright (C) 2011-20 19Apple Inc. All rights reserved.2 * Copyright (C) 2011-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 88 88 89 89 JS_EXPORT_PRIVATE static void ensureOptionsAreCoherent(); 90 static void recomputeDependentOptions(); 90 91 91 92 #define DECLARE_OPTION_ACCESSORS(type_, name_, defaultValue_, availability_, description_) \ -
trunk/Source/JavaScriptCore/runtime/VMTraps.cpp
r263045 r263055 298 298 { 299 299 #if ENABLE(SIGNAL_BASED_VM_TRAPS) 300 if (!Options::usePollingTraps()) 300 if (!Options::usePollingTraps()) { 301 ASSERT(Options::useJIT()); 301 302 SignalSender::initializeSignals(); 303 } 302 304 #endif 303 305 } -
trunk/Source/JavaScriptCore/tools/SigillCrashAnalyzer.cpp
r263045 r263055 1 1 /* 2 * Copyright (C) 2017-20 18Apple Inc. All rights reserved.2 * Copyright (C) 2017-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 200 200 static std::once_flag once; 201 201 std::call_once(once, [] { 202 ASSERT(Options::useJIT()); 202 203 installCrashHandler(); 203 204 analyzer = new SigillCrashAnalyzer;
Note:
See TracChangeset
for help on using the changeset viewer.