For ordinary JS helper threads, we can update names and create wrappers using
the existing thread profiler hooks, but we still need to update their default
stack sizes to avoid huge pages.
For the XPConnect JS Watchdog thread, we sometimes get a wrapper as it is, but
only sometimes. And we never use a reasonable stack size.
MozReview-Commit-ID: EuR3gL5JATL
--HG--
extra : rebase_source : 99985a751a37fb8c515cea8cdae4526b319aba67
extra : intermediate-source : 4831cbfd03ded9ea6dcc8d6f0797f5f80fb717c7
extra : source : f092a32a363911e58c71ed5d2e4bd92347437c7e
We can't use memcmp to compare PODs, largely because of undefined
padding. The rest of the Pod* functions are fine though, since we're
replicating or zeroing PODs.
MozReview-Commit-ID: LSspAi8qCWw
self-test/assertRecoveredOnBailout-1.js relies on the shell actually
crashing, but TSAN catches that instead, and returns its own error code
instead of -11.
TSAN's value, however, is not in catching crashes, so we disable its
handling of segfaults while running the JIT tests. Crashes would still
happen and cause tests failures, while allowing the harness to catch the
expected crash from self-test/assertRecoveredOnBailout-1.js.
--HG--
extra : rebase_source : 38f0251cf226756de80ab9f84af91e73b9ba2435
We need to generalize the barrier to handle not just globals, but also
fields in structures. To do this we pass the location of the store
(ie the Cell**) to the C++ barrier machinery, not the global index.
--HG--
extra : rebase_source : e036ab3500cfa838f8a7dcbfade6dcc5d5765e85
For ordinary JS helper threads, we can update names and create wrappers using
the existing thread profiler hooks, but we still need to update their default
stack sizes to avoid huge pages.
For the XPConnect JS Watchdog thread, we sometimes get a wrapper as it is, but
only sometimes. And we never use a reasonable stack size.
MozReview-Commit-ID: EuR3gL5JATL
--HG--
extra : source : f092a32a363911e58c71ed5d2e4bd92347437c7e
extra : histedit_source : e66e41015f56882fb94b82244da9da3a8dd15c30
For ordinary JS helper threads, we can update names and create wrappers using
the existing thread profiler hooks, but we still need to update their default
stack sizes to avoid huge pages.
For the XPConnect JS Watchdog thread, we sometimes get a wrapper as it is, but
only sometimes. And we never use a reasonable stack size.
MozReview-Commit-ID: EuR3gL5JATL
--HG--
extra : rebase_source : ccf47a10321d2f859d3a3d93e79ac18bf44b73a8
Wasm-via-IonMonkey creates accesses to indirect globals using a double
indirection of the form
* ( *(tls + imm_offset) )
The inner load produces a pointer to the global cell holding the global's
value, and the outer load or store reads or writes the actual value.
Currently both accesses are represented by a single MIR node,
WasmLoadGlobalVar or WasmStoreGlobalVar respectively. This has the
disadvantage that it inhibits CSEing of the |*(tls + imm_offset)| part,
which generates poor code when the same indirect global is referred to
repeatedly, which is a common idiom. For example
(set_global 0 (i32.add (get_global 0) (i32.const 1)))
produces
[Codegen] instruction WasmLoadGlobalVar
[Codegen] movq 0x40(%r14), %rcx
[Codegen] movl 0x0(%rcx), %eax
[Codegen] instruction AddI
[Codegen] addl $1, %eax
[Codegen] instruction WasmStoreGlobalVar
[Codegen] movq 0x40(%r14), %rcx <-- a load we want to avoid
[Codegen] movl %eax, 0x0(%rcx)
It also causes confusion in specifying the aliasing behaviour for
Wasm{Load,Store}GlobalVar. See bug 1467415.
This patch splits Wasm{Load,Store}GlobalVar in two:
* Wasm{Load,Store}GlobalVar is reduced in scope, so that it now loads/stores
*only* at |tls + imm_offset| -- the inner load/store in the description
above.
* Wasm{Load,Store}GlobalCell performs the outer load/store.
As a result, Wasm{Load,Store}GlobalVar no longer have an |isIndirect| boolean.
Instead, a direct global access is expressed using Wasm{Load,Store}GlobalVar
alone, and an indirect global access is expressed using WasmLoadGlobalVar to
acquire the cell address, followed by Wasm{Load,Store}GlobalCell to access the
cell.
MWasmLoadGlobal{Var,Cell}::mightAlias are updated accordingly. We believe the
resulting alias analysis to be non-optimal in that there are certain
known-not-to-alias cases that are not discovered.
Most of the changes are boilerplate:
* js/src/jit/AliasAnalysisShared.cpp GetObject(const MDefinition* ins)
- Handle new MIR node types.
* js/src/jit/CodeGenerator.cpp
- New functions {Load,Store}PrimitiveValue, to avoid code duplication
- CodeGenerator::visitWasmLoadGlobalVar
CodeGenerator::visitWasmLoadGlobalCell
CodeGenerator::visitWasmStoreGlobalVar
CodeGenerator::visitWasmStoreGlobalCell
CodeGenerator::visitWasmLoadGlobalVarI64
CodeGenerator::visitWasmLoadGlobalCellI64
CodeGenerator::visitWasmStoreGlobalVarI64
CodeGenerator::visitWasmStoreGlobalCellI64:
new/refactored code gen fns
* js/src/jit/Lowering.cpp
- LIRGenerator::visitWasmLoadGlobalVar
LIRGenerator::visitWasmLoadGlobalCell
LIRGenerator::visitWasmStoreGlobalVar
LIRGenerator::visitWasmStoreGlobalCell:
route through to the above code gen fns
- MWasmLoadGlobalVar::mightAlias
- MWasmLoadGlobalCell::mightAlias:
updated
- MWasmLoadGlobalVar::congruentTo: updated
- MWasmLoadGlobalCell::congruentTo: new function
* js/src/jit/MIR.h
- class AliasSet {
add WasmGlobalCell
- other classes:
remove |isIndirect| flag from MWasm{Load,Store}GlobalVar
add classes MWasm{Load,Store}GlobalCell{,I64}
* js/src/wasm/WasmIonCompile.cpp class FunctionCompiler
- loadGlobalVar(), storeGlobalVar():
actually take notice of |isIndirect|
and generate one or two MIR nodes accordingly
* js/src/jit-test/tests/wasm/globals-impl.js
- New test case.
--HG--
extra : rebase_source : 6944f01757421d4a6f07211166bb167fc714ec2d
Added a new CoarseType that refers to DOM nodes. Updated the trees to represent the CoarseType. Created a new type of count in the heap snapshot that sorts the data by a more descriptive type name. Created the descriptive in JS::ubi::Base.
--HG--
extra : histedit_source : be24efa4d2ccb85e82046d7cf7d2c3a1e13b1fd7