Repository navigation
[JSC][32bit] Enable concurrency - #4
Closed
mikhailramalho wants to merge 1 commit into
Closed
mikhailramalho wants to merge 1 commit into
mikhailramalho wants to merge 1 commit into
Conversation
https://bugs.webkit.org/show_bug.cgi?id=239821 Reviewed by NOBODY (OOPS!). This enables concurrent compilation in 32bit systems (disabled by default for now). This patch adds a CellAddressChecker singleton that works by checking if the MarkedBlock for the cell pointer is part of the MarkedSpace or if the cell pointer is a precise allocation, this prevents us from checking if an invalid cell pointer is alive. Once we are sure that the pointer is indeed the address of a cell, we then check its liveness. The patch increases JetStream2's core by 10%, compared to the sequential compilation version (tested on ARMv7): ----------------------------------------------------------------------------------------------------------------------- | subtest | pts | pts | b / a | pValue (significance using False Discovery Rate) | ----------------------------------------------------------------------------------------------------------------------- | 3d-cube-SP |168.003460 |197.896428 |1.177931 | 0.000000 (significant) | | 3d-raytrace-SP |125.885263 |142.579454 |1.132614 | 0.000000 (significant) | | Air |99.404368 |122.999226 |1.237362 | 0.000000 (significant) | | Babylon |145.309347 |214.018907 |1.472850 | 0.000000 (significant) | | Basic |153.158175 |179.640718 |1.172910 | 0.000000 (significant) | | Box2D |101.180117 |143.276976 |1.416059 | 0.000000 (significant) | | FlightPlanner |196.794488 |243.650837 |1.238098 | 0.000000 (significant) | | ML |22.791899 |24.481748 |1.074143 | 0.000000 (significant) | | UniPoker |77.137275 |79.285938 |1.027855 | 0.000000 (significant) | | ai-astar |182.780239 |192.567385 |1.053546 | 0.000000 (significant) | | async-fs |59.342978 |66.959267 |1.128344 | 0.000000 (significant) | | base64-SP |167.225606 |166.802542 |0.997470 | 0.686498 | | cdjs |66.631593 |71.385236 |1.071342 | 0.000000 (significant) | | chai-wtb |31.810256 |37.836007 |1.189428 | 0.000000 (significant) | | crypto |377.627866 |430.428794 |1.139823 | 0.000000 (significant) | | crypto-aes-SP |167.633223 |184.030500 |1.097816 | 0.000000 (significant) | | crypto-md5-SP |139.184882 |145.389688 |1.044580 | 0.000000 (significant) | | crypto-sha1-SP |149.166710 |154.578164 |1.036278 | 0.000000 (significant) | | date-format-tofte-SP |93.580246 |98.618666 |1.053841 | 0.000000 (significant) | | date-format-xparb-SP |85.166072 |85.961056 |1.009335 | 0.110983 | | delta-blue |209.319699 |261.134918 |1.247541 | 0.000000 (significant) | | earley-boyer |199.174380 |278.115727 |1.396343 | 0.000000 (significant) | | first-inspector-code-load |133.066103 |132.872875 |0.998548 | 0.699516 | | gaussian-blur |104.991541 |103.204811 |0.982982 | 0.000113 (significant) | | gbemu |29.857200 |35.426628 |1.186536 | 0.000000 (significant) | | hash-map |129.324986 |129.253819 |0.999450 | 0.883168 | | jshint-wtb |14.001002 |16.196957 |1.156843 | 0.000000 (significant) | | json-parse-inspector |88.522108 |98.992214 |1.118277 | 0.000000 (significant) | | json-stringify-inspector |116.269868 |113.402364 |0.975338 | 0.000454 (significant) | | multi-inspector-code-load |141.882395 |140.619342 |0.991098 | 0.000022 (significant) | | json-stringify-inspector |116.269868 |113.402364 |0.975338 | 0.000454 (significant) | | multi-inspector-code-load |141.882395 |140.619342 |0.991098 | 0.000022 (significant) | | n-body-SP |338.518764 |344.335936 |1.017184 | 0.000000 (significant) | | navier-stokes |431.763636 |410.351046 |0.950407 | 0.000000 (significant) | | octane-code-load |513.281303 |514.226398 |1.001841 | 0.721463 | | pdfjs |55.440344 |63.234387 |1.140584 | 0.000000 (significant) | | prepack-wtb |13.652194 |18.923115 |1.386086 | 0.000000 (significant) | | raytrace |190.641417 |224.514530 |1.177680 | 0.000000 (significant) | | regex-dna-SP |211.065997 |213.340272 |1.010775 | 0.000757 (significant) | | regexp |122.335100 |130.886583 |1.069902 | 0.000000 (significant) | | richards |237.696021 |252.108170 |1.060633 | 0.000000 (significant) | | splay |114.302415 |136.889106 |1.197605 | 0.000000 (significant) | | stanford-crypto-aes |111.760524 |112.780801 |1.009129 | 0.000254 (significant) | | stanford-crypto-pbkdf2 |213.502982 |228.299684 |1.069304 | 0.000000 (significant) | | stanford-crypto-sha256 |191.188159 |192.977730 |1.009360 | 0.000345 (significant) | | string-unpack-code-SP |141.324251 |146.013753 |1.033183 | 0.000000 (significant) | | tagcloud-SP |120.221802 |123.945633 |1.030975 | 0.000000 (significant) | ----------------------------------------------------------------------------------------------------------------------- a mean = 118.02347 b mean = 130.31223 pValue = 0.0000000000 (Bigger means are better.) 1.104 times better Results ARE significant * JSTests/stress/dont-link-virtual-calls-on-compiler-thread.js: * PerformanceTests/JetStream2/watch-cli.js: * Source/JavaScriptCore/bytecode/AccessCase.cpp: (JSC::AccessCase::generateImpl): * Source/JavaScriptCore/bytecode/SpeculatedType.cpp: (JSC::speculationFromStructure): (JSC::speculationFromCell): * Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h: (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects): * Source/JavaScriptCore/dfg/DFGAbstractValue.cpp: (JSC::DFG::AbstractValue::set): (JSC::DFG::AbstractValue::fixTypeForRepresentation): (JSC::DFG::AbstractValue::mergeOSREntryValue): * Source/JavaScriptCore/heap/Heap.cpp: (JSC::Heap::Heap): (JSC::Heap::~Heap): (JSC::CellAddressChecker::instance): (JSC::CellAddressChecker::add): (JSC::CellAddressChecker::remove): (JSC::CellAddressChecker::isValidCell): * Source/JavaScriptCore/heap/Heap.h: * Source/JavaScriptCore/jit/AssemblyHelpers.h: (JSC::AssemblyHelpers::storeCell): * Source/JavaScriptCore/jit/JITPlan.cpp: (JSC::verboseCompilationEnabled): (JSC::JITPlan::compileInThread): * Source/JavaScriptCore/runtime/JSCell.cpp: (JSC::isLiveConcurrently): * Source/JavaScriptCore/runtime/JSCell.h: * Source/JavaScriptCore/runtime/OptionsList.h: * Source/WTF/wtf/PlatformEnable.h:
mikhailramalho
pushed a commit
that referenced
this pull request
Jan 31, 2023
https://bugs.webkit.org/show_bug.cgi?id=251063 rdar://104585575 Reviewed by Mark Lam and Justin Michaud. This patch enhances CallFrame::dump to support wasm frames in btjs stacktrace. The example is as follows. frame #0: 0x00000001035fca78 JavaScriptCore`JSC::functionBreakpoint(globalObject=0x000000012f410068, callFrame=0x000000016fdfa9d0) at JSDollarVM.cpp:2273:9 [opt] frame #1: 0x000000010ec44204 0x10eccc5dc frame #2: 0x000000010eccc5dc callback#Dwaxn6 [Baseline bc#50](Undefined) frame #3: 0x000000010ec4ca84 wasm-stub [WasmToJS](Wasm::Instance: 0x10d29da40) frame #4: 0x000000010ed0c060 <?>.wasm-function[1] [OMG](Wasm::Instance: 0x10d29da40) frame #5: 0x000000010ed100d0 jsToWasm#CWTx6k [FTL bc#22](Cell[JSModuleEnvironment]: 0x12f524540, Cell[WebAssemblyFunction]: 0x10d06a3a8, 1, 2, 3) frame WebKit#6: 0x000000010ec881b0 #D5ymZE [Baseline bc#733](Undefined, Cell[Generator]: 0x12f55c180, 1, Cell[Object]: 0x12f69dfc0, 0, Cell[JSLexicalEnvironment]: 0x12f52cee0) frame WebKit#7: 0x000000010ec3c008 asyncFunctionResume#A4ayYg [LLInt bc#49](Undefined, Cell[Generator]: 0x12f55c180, Cell[Object]: 0x12f69dfc0, 0) frame WebKit#8: 0x000000010ec3c008 promiseReactionJobWithoutPromise#D0yDF1 [LLInt bc#25](Undefined, Cell[Function]: 0x12f44f3c0, Cell[Object]: 0x12f69dfc0, Cell[Generator]: 0x12f55c180) frame WebKit#9: 0x000000010ec80ec0 promiseReactionJob#EdShZz [Baseline bc#74](Undefined, Undefined, Cell[Function]: 0x12f44f3c0, Cell[Object]: 0x12f69dfc0, Cell[Generator]: 0x12f55c180) frame WebKit#10: 0x000000010ec3c728 frame WebKit#11: 0x0000000103137560 JavaScriptCore`JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) [inlined] JSC::JITCode::execute(this=<unavailable>, vm=<unavailable>, protoCallFrame=<unavailable>) at JITCodeInlines.h:42:38 [opt] frame WebKit#12: 0x0000000103137524 JavaScriptCore`JSC::Interpreter::executeCall(this=<unavailable>, lexicalGlobalObject=<unavailable>, function=<unavailable>, callData=<unavailable>, thisValue=<unavailable>, args=<unavailable>) at Interpreter.cpp:1093:27 [opt] frame WebKit#13: 0x000000010349d6d0 JavaScriptCore`JSC::runJSMicrotask(globalObject=0x000000012f410068, identifier=(m_identifier = 81), job=JSValue @ x22, argument0=JSValue @ x26, argument1=JSValue @ x25, argument2=<unavailable>, argument3=<unavailable>) at JSMicrotask.cpp:98:9 [opt] frame WebKit#14: 0x00000001039dfc54 JavaScriptCore`JSC::VM::drainMicrotasks() (.cold.1) at VM.cpp:0:9 [opt] frame WebKit#15: 0x00000001035e58a4 JavaScriptCore`JSC::VM::drainMicrotasks() [inlined] JSC::MicrotaskQueue::dequeue(this=<unavailable>) at VM.cpp:0:9 [opt] frame WebKit#16: 0x00000001035e5894 JavaScriptCore`JSC::VM::drainMicrotasks(this=0x000000012f000000) at VM.cpp:1255:46 [opt] ... * Source/JavaScriptCore/interpreter/CallFrame.cpp: (JSC::CallFrame::dump const): Canonical link: https://commits.webkit.org/259262@main
mikhailramalho
pushed a commit
that referenced
this pull request
May 9, 2024
…te-isolation rdar://127515199 https://bugs.webkit.org/show_bug.cgi?id=273715 Unreviewed test gardening. * LayoutTests/platform/mac-site-isolation/TestExpectations: Canonical link: https://commits.webkit.org/278516@main
webkit-commit-queue
pushed a commit
that referenced
this pull request
Jun 14, 2024
…volume scrubber on a video player https://bugs.webkit.org/show_bug.cgi?id=275469 <rdar://129080145> Reviewed by Antti Koivisto. 1. In EventHandler::mouseDragged we dispatch the "mouse move" event 2. JS triggers some mutation which makes the tree dirty 3. later in EventHandler::handleMouseMoveEvent() we call EventHandler::handleMouseDraggedEvent() (tree is dirty) which, through a few layers of functions calls VisiblePosition::canonicalPosition() 4. VisiblePosition::canonicalPosition() needs a clean tree so it calls Document::updateLayout() which is turn destroys some renderers (see #2) 5. In-between EventHandler::handleMouseDraggedEvent() and VisiblePosition::canonicalPosition(), we CheckPtr a renderer which gets destroyed at #4. The fix (what we normally do with cases like this) is to make sure we clean the tree before entering VisiblePosition. * Source/WebCore/page/EventHandler.cpp: (WebCore::EventHandler::handleMouseDraggedEvent): Canonical link: https://commits.webkit.org/280013@main
webkit-commit-queue
pushed a commit
that referenced
this pull request
Nov 13, 2025
https://bugs.webkit.org/show_bug.cgi?id=302403 Reviewed by Yusuke Suzuki. This PR includes seveal changes to improve the codegen of store/load: * Optimized storePair to use a single move when constants are equal * Eliminated register materialization for constant integer store * Constant pointer folding when they are statically known One example where these work together is I64Store, before: [ 0x22d] I64Store 0xf1a22bcc: ldrd r1, r2, [r10, #0x34] 0xf1a22bd0: movw r0, #0x5d18 0xf1a22bd4: mov r5, r0 0xf1a22bd6: adds r5, r5, WebKit#7 0xf1a22bd8: bhs.w #0xf1a22c44 0xf1a22bdc: cmp r5, r2 0xf1a22bde: bhs.w #0xf1a22c44 0xf1a22be2: mov r5, r0 0xf1a22be4: add r5, r1 0xf1a22be6: movs r4, #0 0xf1a22be8: movs r3, #0 0xf1a22bea: str r3, [r5] 0xf1a22bec: str r4, [r5, #4] after: [ 0x22d] I64Store 0xf1b22c50: ldrd r1, r2, [r10, #0x34] 0xf1b22c54: movw r5, #0x5d1f 0xf1b22c58: cmp r5, r2 0xf1b22c5a: bhs.w #0xf1b22cc0 0xf1b22c5e: movw r12, #0x5d18 0xf1b22c62: add.w r5, r1, r12 0xf1b22c66: mov.w r12, #0 0xf1b22c6a: str.w r12, [r5] 0xf1b22c6e: str.w r12, [r5, #4] On JetStream3's tfjs-wasm.js, we reduce the code size by -9,5KiB: Base total code size: 433254 bytes (424KiB) New total code size: 423578 bytes (414KiB) Difference (new - base): -9676 bytes (-9,5KiB) Percentage change: -2.23% * Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h: (JSC::MacroAssemblerARMv7::store16): (JSC::MacroAssemblerARMv7::storePair32): * Source/JavaScriptCore/wasm/WasmBBQJIT32_64.cpp: (JSC::Wasm::BBQJITImpl::BBQJIT::store): * Source/JavaScriptCore/wasm/WasmBBQJIT32_64.h: (JSC::Wasm::BBQJITImpl::BBQJIT::emitCheckAndPrepareAndMaterializePointerApply): Canonical link: https://commits.webkit.org/302984@main
webkit-commit-queue
pushed a commit
that referenced
this pull request
Nov 14, 2025
… is also a destination https://bugs.webkit.org/show_bug.cgi?id=302469 Reviewed by Justin Michaud. This patch expands a ldrd into a pair of ldr if any of the destination registers is also the register holding the memory address. Before: 0xf1502462: ldrd r0, r1, [r0] After: 0xf1502462: ldr r1, [r0, #4] 0xf1502464: ldr r0, [r0] * Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h: (JSC::MacroAssemblerARMv7::loadPair32): Canonical link: https://commits.webkit.org/303043@main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://bugs.webkit.org/show_bug.cgi?id=239821
Reviewed by NOBODY (OOPS!).
This enables concurrent compilation in 32bit systems (disabled by default for now).
This patch adds a CellAddressChecker singleton that works by checking if the MarkedBlock for the cell pointer is part of the MarkedSpace or if the cell pointer is a precise allocation, this prevents us from checking if an invalid cell pointer is alive. Once we are sure that the pointer is indeed the address of a cell, we then check its liveness.
The patch increases JetStream2's core by 10%, compared to the sequential compilation version (tested on ARMv7):
| subtest | pts | pts | b / a | pValue (significance using False Discovery Rate) |
| 3d-cube-SP |168.003460 |197.896428 |1.177931 | 0.000000 (significant) |
| 3d-raytrace-SP |125.885263 |142.579454 |1.132614 | 0.000000 (significant) |
| Air |99.404368 |122.999226 |1.237362 | 0.000000 (significant) |
| Babylon |145.309347 |214.018907 |1.472850 | 0.000000 (significant) |
| Basic |153.158175 |179.640718 |1.172910 | 0.000000 (significant) |
| Box2D |101.180117 |143.276976 |1.416059 | 0.000000 (significant) |
| FlightPlanner |196.794488 |243.650837 |1.238098 | 0.000000 (significant) |
| ML |22.791899 |24.481748 |1.074143 | 0.000000 (significant) |
| UniPoker |77.137275 |79.285938 |1.027855 | 0.000000 (significant) |
| ai-astar |182.780239 |192.567385 |1.053546 | 0.000000 (significant) |
| async-fs |59.342978 |66.959267 |1.128344 | 0.000000 (significant) |
| base64-SP |167.225606 |166.802542 |0.997470 | 0.686498 |
| cdjs |66.631593 |71.385236 |1.071342 | 0.000000 (significant) |
| chai-wtb |31.810256 |37.836007 |1.189428 | 0.000000 (significant) |
| crypto |377.627866 |430.428794 |1.139823 | 0.000000 (significant) |
| crypto-aes-SP |167.633223 |184.030500 |1.097816 | 0.000000 (significant) |
| crypto-md5-SP |139.184882 |145.389688 |1.044580 | 0.000000 (significant) |
| crypto-sha1-SP |149.166710 |154.578164 |1.036278 | 0.000000 (significant) |
| date-format-tofte-SP |93.580246 |98.618666 |1.053841 | 0.000000 (significant) |
| date-format-xparb-SP |85.166072 |85.961056 |1.009335 | 0.110983 |
| delta-blue |209.319699 |261.134918 |1.247541 | 0.000000 (significant) |
| earley-boyer |199.174380 |278.115727 |1.396343 | 0.000000 (significant) |
| first-inspector-code-load |133.066103 |132.872875 |0.998548 | 0.699516 |
| gaussian-blur |104.991541 |103.204811 |0.982982 | 0.000113 (significant) |
| gbemu |29.857200 |35.426628 |1.186536 | 0.000000 (significant) |
| hash-map |129.324986 |129.253819 |0.999450 | 0.883168 |
| jshint-wtb |14.001002 |16.196957 |1.156843 | 0.000000 (significant) |
| json-parse-inspector |88.522108 |98.992214 |1.118277 | 0.000000 (significant) |
| json-stringify-inspector |116.269868 |113.402364 |0.975338 | 0.000454 (significant) |
| multi-inspector-code-load |141.882395 |140.619342 |0.991098 | 0.000022 (significant) |
| json-stringify-inspector |116.269868 |113.402364 |0.975338 | 0.000454 (significant) |
| multi-inspector-code-load |141.882395 |140.619342 |0.991098 | 0.000022 (significant) |
| n-body-SP |338.518764 |344.335936 |1.017184 | 0.000000 (significant) |
| navier-stokes |431.763636 |410.351046 |0.950407 | 0.000000 (significant) |
| octane-code-load |513.281303 |514.226398 |1.001841 | 0.721463 |
| pdfjs |55.440344 |63.234387 |1.140584 | 0.000000 (significant) |
| prepack-wtb |13.652194 |18.923115 |1.386086 | 0.000000 (significant) |
| raytrace |190.641417 |224.514530 |1.177680 | 0.000000 (significant) |
| regex-dna-SP |211.065997 |213.340272 |1.010775 | 0.000757 (significant) |
| regexp |122.335100 |130.886583 |1.069902 | 0.000000 (significant) |
| richards |237.696021 |252.108170 |1.060633 | 0.000000 (significant) |
| splay |114.302415 |136.889106 |1.197605 | 0.000000 (significant) |
| stanford-crypto-aes |111.760524 |112.780801 |1.009129 | 0.000254 (significant) |
| stanford-crypto-pbkdf2 |213.502982 |228.299684 |1.069304 | 0.000000 (significant) |
| stanford-crypto-sha256 |191.188159 |192.977730 |1.009360 | 0.000345 (significant) |
| string-unpack-code-SP |141.324251 |146.013753 |1.033183 | 0.000000 (significant) |
| tagcloud-SP |120.221802 |123.945633 |1.030975 | 0.000000 (significant) |
a mean = 118.02347
b mean = 130.31223
pValue = 0.0000000000
(Bigger means are better.)
1.104 times better
Results ARE significant
(JSC::speculationFromCell):
(JSC::DFG::AbstractValue::fixTypeForRepresentation): (JSC::DFG::AbstractValue::mergeOSREntryValue):
(JSC::Heap::~Heap):
(JSC::CellAddressChecker::instance):
(JSC::CellAddressChecker::add):
(JSC::CellAddressChecker::remove):
(JSC::CellAddressChecker::isValidCell):
(JSC::JITPlan::compileInThread):
Pull Request Template
File a Bug
All changes should be associated with a bug. The WebKit project is currently using Bugzilla as our bug tracker. Note that multiple changes may be associated with a single bug.
Provided Tooling
The WebKit Project strongly recommends contributors use
Tools/Scripts/git-webkitto generate pull requests. See Setup and Contributing Code for how to do this.Template
If a contributor wishes to file a pull request manually, the template is below. Manually-filed pull requests should contain their commit message as the pull request description, and their commit message should be formatted like the template below.
Additionally, the pull request should be mentioned on Bugzilla, labels applied to the pull request matching the component and version of the Bugzilla associated with the pull request and the pull request assigned to its author.