Commit 9b2ca70
committed
[JSC] Do not create JIT related data under non-JIT mode
https://bugs.webkit.org/show_bug.cgi?id=195982
Reviewed by Mark Lam.
We avoid creations of JIT related data structures under non-JIT mode.
This patch removes the following allocations.
1. JITThunks
2. FTLThunks
3. FixedVMPoolExecutableAllocator
4. noJITValueProfileSingleton since it is no longer used
5. ARM disassembler should be initialized when it is used
6. Wasm related data structures are accidentally allocated if VM::canUseJIT() == false &&
Options::useWebAssembly() == true. Add Wasm::isSupported() function to check the both conditions.
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/Heap.cpp:
(JSC::Heap::runEndPhase):
* jit/ExecutableAllocator.cpp:
(JSC::FixedVMPoolExecutableAllocator::~FixedVMPoolExecutableAllocator):
(JSC::ExecutableAllocator::initializeUnderlyingAllocator):
(JSC::ExecutableAllocator::isValid const):
(JSC::ExecutableAllocator::underMemoryPressure):
(JSC::ExecutableAllocator::memoryPressureMultiplier):
(JSC::ExecutableAllocator::allocate):
(JSC::ExecutableAllocator::isValidExecutableMemory):
(JSC::ExecutableAllocator::getLock const):
(JSC::ExecutableAllocator::committedByteCount):
(JSC::ExecutableAllocator::dumpProfile):
(JSC::startOfFixedExecutableMemoryPoolImpl):
(JSC::endOfFixedExecutableMemoryPoolImpl):
(JSC::ExecutableAllocator::initialize):
(JSC::ExecutableAllocator::initializeAllocator): Deleted.
(JSC::ExecutableAllocator::ExecutableAllocator): Deleted.
(JSC::ExecutableAllocator::~ExecutableAllocator): Deleted.
* jit/ExecutableAllocator.h:
(JSC::ExecutableAllocatorBase::isValid const):
(JSC::ExecutableAllocatorBase::underMemoryPressure):
(JSC::ExecutableAllocatorBase::memoryPressureMultiplier):
(JSC::ExecutableAllocatorBase::dumpProfile):
(JSC::ExecutableAllocatorBase::allocate):
(JSC::ExecutableAllocatorBase::setJITEnabled):
(JSC::ExecutableAllocatorBase::isValidExecutableMemory):
(JSC::ExecutableAllocatorBase::committedByteCount):
(JSC::ExecutableAllocatorBase::getLock const):
(JSC::ExecutableAllocator::isValid const): Deleted.
(JSC::ExecutableAllocator::underMemoryPressure): Deleted.
(JSC::ExecutableAllocator::memoryPressureMultiplier): Deleted.
(JSC::ExecutableAllocator::allocate): Deleted.
(JSC::ExecutableAllocator::setJITEnabled): Deleted.
(JSC::ExecutableAllocator::isValidExecutableMemory): Deleted.
(JSC::ExecutableAllocator::committedByteCount): Deleted.
(JSC::ExecutableAllocator::getLock const): Deleted.
* jsc.cpp:
(functionWebAssemblyMemoryMode):
* runtime/InitializeThreading.cpp:
(JSC::initializeThreading):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSLock.cpp:
(JSC::JSLock::didAcquireLock):
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):
* runtime/VM.cpp:
(JSC::enableAssembler):
(JSC::VM::canUseAssembler):
(JSC::VM::VM):
* runtime/VM.h:
* wasm/WasmCapabilities.h: Added.
(JSC::Wasm::isSupported):
* wasm/WasmFaultSignalHandler.cpp:
(JSC::Wasm::enableFastMemory):
Canonical link: https://commits.webkit.org/210376@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243312 268f45cc-cd09-0410-ab3c-d52691b4dbfc1 parent 6a36d96 commit 9b2ca70
15 files changed
Lines changed: 228 additions & 97 deletions
File tree
- Source/JavaScriptCore
- JavaScriptCore.xcodeproj
- heap
- jit
- runtime
- wasm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
977 | 977 | | |
978 | 978 | | |
979 | 979 | | |
| 980 | + | |
980 | 981 | | |
981 | 982 | | |
982 | 983 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
1 | 78 | | |
2 | 79 | | |
3 | 80 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1752 | 1752 | | |
1753 | 1753 | | |
1754 | 1754 | | |
| 1755 | + | |
1755 | 1756 | | |
1756 | 1757 | | |
1757 | 1758 | | |
| |||
4693 | 4694 | | |
4694 | 4695 | | |
4695 | 4696 | | |
| 4697 | + | |
4696 | 4698 | | |
4697 | 4699 | | |
4698 | 4700 | | |
| |||
5083 | 5085 | | |
5084 | 5086 | | |
5085 | 5087 | | |
| 5088 | + | |
5086 | 5089 | | |
5087 | 5090 | | |
5088 | 5091 | | |
5089 | 5092 | | |
5090 | | - | |
5091 | 5093 | | |
5092 | 5094 | | |
5093 | 5095 | | |
| |||
6493 | 6495 | | |
6494 | 6496 | | |
6495 | 6497 | | |
| 6498 | + | |
6496 | 6499 | | |
6497 | 6500 | | |
6498 | 6501 | | |
| |||
9824 | 9827 | | |
9825 | 9828 | | |
9826 | 9829 | | |
| 9830 | + | |
9827 | 9831 | | |
9828 | 9832 | | |
9829 | 9833 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1496 | 1496 | | |
1497 | 1497 | | |
1498 | 1498 | | |
1499 | | - | |
1500 | | - | |
1501 | | - | |
1502 | 1499 | | |
1503 | 1500 | | |
1504 | 1501 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
| |||
404 | 403 | | |
405 | 404 | | |
406 | 405 | | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
| 406 | + | |
429 | 407 | | |
| 408 | + | |
430 | 409 | | |
431 | 410 | | |
432 | | - | |
| 411 | + | |
433 | 412 | | |
434 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
435 | 416 | | |
436 | 417 | | |
437 | 418 | | |
438 | 419 | | |
| 420 | + | |
| 421 | + | |
439 | 422 | | |
440 | 423 | | |
441 | 424 | | |
442 | 425 | | |
443 | 426 | | |
| 427 | + | |
| 428 | + | |
444 | 429 | | |
445 | 430 | | |
446 | 431 | | |
447 | 432 | | |
448 | 433 | | |
449 | 434 | | |
| 435 | + | |
| 436 | + | |
450 | 437 | | |
451 | 438 | | |
452 | 439 | | |
| |||
465 | 452 | | |
466 | 453 | | |
467 | 454 | | |
| 455 | + | |
| 456 | + | |
468 | 457 | | |
469 | 458 | | |
470 | 459 | | |
| |||
514 | 503 | | |
515 | 504 | | |
516 | 505 | | |
| 506 | + | |
| 507 | + | |
517 | 508 | | |
518 | 509 | | |
519 | 510 | | |
520 | 511 | | |
521 | 512 | | |
| 513 | + | |
| 514 | + | |
522 | 515 | | |
523 | 516 | | |
524 | 517 | | |
525 | 518 | | |
526 | 519 | | |
| 520 | + | |
| 521 | + | |
527 | 522 | | |
528 | 523 | | |
529 | 524 | | |
530 | 525 | | |
531 | 526 | | |
532 | 527 | | |
| 528 | + | |
| 529 | + | |
533 | 530 | | |
534 | 531 | | |
535 | 532 | | |
536 | 533 | | |
537 | 534 | | |
538 | 535 | | |
| 536 | + | |
| 537 | + | |
539 | 538 | | |
540 | 539 | | |
541 | 540 | | |
542 | 541 | | |
543 | 542 | | |
| 543 | + | |
| 544 | + | |
544 | 545 | | |
545 | 546 | | |
546 | 547 | | |
| |||
551 | 552 | | |
552 | 553 | | |
553 | 554 | | |
554 | | - | |
| 555 | + | |
555 | 556 | | |
556 | 557 | | |
557 | 558 | | |
558 | 559 | | |
559 | 560 | | |
560 | | - | |
| 561 | + | |
561 | 562 | | |
562 | 563 | | |
563 | 564 | | |
| |||
569 | 570 | | |
570 | 571 | | |
571 | 572 | | |
572 | | - | |
573 | | - | |
0 commit comments