The change instruments code generation for Gap Solver so that these
counters are run-time and didn't impact register allocation.
The implementation is put behind a flag to help better register
allocation analysis.
Bug: v8:10663
Change-Id: Ia342d990e2b2bfc6a7653a770f670e51eef71312
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2269362
Commit-Queue: Z Nguyen-Huu <duongn@microsoft.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#68664}
This adds Google benchmark for microbenchmarking C++ code as an
optional dependency.
To enable, add the following to the .gclient before syncing
"custom_vars": {
"checkout_google_benchmark": True
}
Change-Id: Id0eab772dd71558906658ef4bb60e31acd665948
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2275964
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68663}
Split off ConservativeMarkingVisitor from MarkingVisitor.
After this change, MarkingVisitor and ConservativeMarkingVisitor are
types that are instantiated with Marking and merely forward to
MarkingState accrodingly. The two marking-related visitors can be
passed along as interface types cppgc::Visitor and
ConservativeTracingVisitor, respectively.
Change-Id: Iad103dc3053c61d1a104a8802edd420d21cdf935
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270538
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68661}
Split off MarkingState from MarkingVisitor.
With this CL the marking implementation is moved to "MarkingState"
which is the new bottleneck for marking a single object.
MarkingVisitor merely forwards to MarkingState, which knows how to set
the markbit and add the object to the worklist accordingly. This
allows to have a "UnifiedHeapMarkingVisitor" in future which can
easily reuse Marking to provide C++ marking.
Change-Id: I87ebbe37e8e8cd841e872cae9dc3490e2b55c4dd
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270172
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68660}
Currently, FindOptimalSpillingPos uses GetSpillState on the loop header
block when attempting to find the live range that covers the top of the
loop. However, GetSpillState represents the state at the end of a block,
and is not written until the allocator leaves the block. So when `pos`
is within the loop header block, FindOptimalSpillingPos is incorrectly
recommending a split rather than recommending a spill of the live range
covering the loop top. This change implements a better search for the
live range that covers the beginning of the loop.
Bug: v8:10606
Change-Id: I454a009b5806d1a01ee59d6d34b9e9ef8784d294
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274308
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#68656}
Using x16/x17 for tail calls allows us to use a "BTI c" instead
of "BTI jc" landing pad. This means that we cannot enter functions
with a jump to a register other than x16/x17 anymore.
Bug: v8:10026
Change-Id: If5af1af861acc19f9e0dfc19c38d6a57a6fb6b6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276049
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#68655}
Introduce explicit fast path for allocation in PagedSpace. The slow path
is moved into AllocateRawSlow which refills the LAB and retries the
allocation.
Bug: v8:10315
Change-Id: I807e56ccde833b0e9a42166b4883c1978d01e828
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277808
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68653}
This moves some more tracing functionality into the {TraceLine} helper,
such that for most operations we only need to instantiate a {TraceLine}
object via its constructor and be done with it.
R=thibaudm@chromium.org
Bug: v8:10576
Change-Id: Ide368d4a52768089a23744b9e1e25df4b8fed2ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276275
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68650}
Call synchronized_instance_descriptors only once in LookupTransition to
make sure we have the same DescriptorArray in the method.
Bug: v8:7790
Change-Id: Ie2a610d9c1229f7f467f56365498b89f078d6347
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2278043
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68648}
Rolling v8/build: 29bc352..cee6c15
Rolling v8/buildtools: 6099f10..6b2a302
Rolling v8/buildtools/linux64: git_revision:7d7e8deea36d126397bda2cf924682504271f0e1..git_revision:cd3869be2477f7ee1aa3f27f43ee934e74722dfb
Rolling v8/third_party/aemu-linux-x64: OQ8c-S6dNd0LdVeElhAYBgsHeiiM4xyJ8E6hy3pRIUMC..NwKjfDOL_ugbEGGNcm2u6NzakaOJ9ad36bFd7bUVpXIC
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/3f5d1ca..7bb44ab
Rolling v8/third_party/depot_tools: fdd2cd6..95099f4TBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com
Change-Id: I58603a49de4941abc054b659ebe39a7dfce5c09d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2278769
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#68644}
What we need is a multiple readers single writer (MRSW) lock. The
main thread is the only one that is going to be writing, while the
readers might be either the main thread or background threads.
The shared_mutex is in the isolate itself, so that different isolates
will not block each other.
Bug: v8:7790
Change-Id: Idd6bb1826bd0cc6279df1c0694a84e00d53a7eae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2241513
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68639}
This CL mostly removes code paths which join again after a big switch.
Instead of updating a local variable (for the length of the decoded
operation), and then breaking out of the switch just to return the value
of that local variable, we now just return directly from within the
switch.
This will allow to
1) split the switch into individual methods per opcode, and
2) tail-call to helpers like {BuildSimpleOperator} or
{DecodeNumericOpcode}.
R=thibaudm@chromium.org
Bug: v8:10576
Change-Id: I466068d3566c6bff8bd3ac78a2bba60c3663dd52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276274
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68638}
This makes the 4GB max length compilable for 32 bit MSVC.
Bug: chromium:1095721
Change-Id: I2be9f69668687f18beb86028debb3fd5ff350202
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2272558
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68637}
This changes the default scope info for SyntheticFunctionContexts
to the EmptyScopeInfo which does not contain an extension slot.
The bug happened because, previously, the native context scope info
was used as dummy.
Change-Id: I4d6bf6918c11c79201d16bde99ed76800ad6f6c5
Bug: v8:10629
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277806
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68636}
Also fix a typo in a log message.
Change-Id: I247e5347b7f7d71b08630489896da463dd76b8a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2277885
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68635}
We spawn individual tests in their own shell, and then just kill that
shell later. This often leaves the tests running (see linked bugs).
By spawning the shell in its own new process group, we can just kill
that whole process group later, which seems to work reliably for hanging
tests.
R=machenbach@chromium.org
Bug: v8:8292, v8:8700
Change-Id: I6e38467d687cc0b395467d4b377644de7700f066
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274634
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68634}
Motivation:
We used to approximate s33/i33 value parsing by first checking for
specific negative codes, and then parsing an u32 value if that failed.
This is not correct in all cases.
Changes:
- Implement i33 parsing in Decoder.
- Factor out parsing of heap types into read_heap_type.
- Introduce HeapType::kBottom.
- Introduce helper functions in WasmFeatures and value_type_reader.
- Remove macros from the parsing of value types.
- HeapType::code now returns an i32 for compatibility with the i33
requirement.
- Introduce HeapType::Repr.
- Renamings: HeapType::type() -> representation(),
ValueType::heap() -> heap_representation()
Bug: v8:7748
Change-Id: I04deabce8837a48af2226411cd706a397f9e5725
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274118
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68633}
It's actually not an atomic variable, just raw memory, so this is
technically not correct. However, the expert advice is to do this
until atomic_ref is available.
Change-Id: I4b74aa7123ed6ffeb2a06800c35b03e428861e80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270162
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68632}
Modify the output of --trace-deopt to specify which version of the
caller's pc (signed with PAC or unsigned) is shown when CFI is enabled.
Change-Id: I77006839997a5f50d37d65facbba24d8a86a1509
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274867
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68629}
This refactors the FastApiCall reduction to be more explicit about
which inputs of the JSCall node are used.
Bug: v8:8888
Change-Id: Ia950bbfcf359ec4ae232b8dd21adafb0b4a05177
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276032
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68628}
The typed version takes Effect/Control arguments instead of untyped
Node* arguments.
Bug: v8:8888
Change-Id: Ia4b9895256ab9ea2a22f9e590490280d7536eac7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274609
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68626}
Rolling v8/base/trace_event/common: ef35868..23ef533
Rolling v8/build: 3a5fbeb..29bc352
Rolling v8/buildtools: 1ed9957..6099f10
Rolling v8/third_party/aemu-linux-x64: I_sHBnheTA3cmFAjzkyUAhsmhpWXu82YLidstkjgsvIC..OQ8c-S6dNd0LdVeElhAYBgsHeiiM4xyJ8E6hy3pRIUMC
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/de622ae..3f5d1ca
Rolling v8/third_party/depot_tools: d9391fd..fdd2cd6
Rolling v8/tools/clang: 6849229..b49c12aTBR=machenbach@chromium.org,tmrts@chromium.org,v8-waterfall-sheriff@grotations.appspotmail.com
Change-Id: Ibab2c61210b9142ddd269b48aadc5a39c6996ede
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2275116
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#68624}
Whether or not a store requires a write barrier depends on several
invariants within V8. Some flags can break these invariants. In
particular, it's not possible to use enable_single_generation with
incremental marking because marking barriers are omitted in places where
it is assumed an object will be allocated in the young generation.
This CL introduces a new flag, enable_unconditional_write_barriers,
which allows us to specify that full write barriers should always
happens. The main purpose of this is to support single generation GC
with incremental marking, but it can also aid as a debugging tool to
check for missed write barriers.
Bug: v8:10614
Change-Id: I3ab640436bcefc118c9c5c34765421cb9ea4896f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270546
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jake Hughes <jakehughes@google.com>
Cr-Commit-Position: refs/heads/master@{#68623}
Also should address minor performance regressions for instance types
that should (and used to) use map compare rather than instance_type
comparison.
In the process, convert a bunch of IsXXX methods from the CSA into
exported Torque methods that call through to the Cast<> to ensure
there is only a single implementation of the type checkers. Also clean
up and remove duplicate/redundant code and unused Torque imports.
Bug: v8:7793, chromium:1098481
Change-Id: I3cd5146d913bb75bab4f73415b1b94bc30924725
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270545
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68621}
Prototype f64x2.nearest on ARM for both ARM v7 and ARM v8. ARM v8 has
support for vrintn, and for ARM v7 we fallback to runtime.
Since ARM v8 uses vrintn, which is the same instruction used for
F64RoundTiesEven (scalar), wasm-compiler reuses the Float64RoundTiesEven
check.
Bug: v8:10553
Change-Id: Ia4c4245cac87c132331f54e81dad323fc3fb9f6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2268358
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68619}
e.g. the following is now valid Torque code:
macro TestA(implicit c: Context)() {}
macro TestB(): bool {
return TestA();
}
This is handy for more flexible usage of generics that may or may not
use implicit parameters deep inside their specializations.
Note that this change doesn't change the fundamental rigor (or lack
thereof) around checking the usage of implicit parameters, which
already do not require '_' before their parameter identifier if
unused. It just silences errors in cases where a call site doesn't
implicitly pass a parameter that ultimately doesn't have a use site
and adds meaningful error messages in the case that it does.
Bug: v8:7793
Change-Id: I559d06c0864a7e79fe52bee5a9a7af9941889748
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2274127
Commit-Queue: Daniel Clifford <danno@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68618}
Often at the d8 prompt, you'd like to explore some pointer found
from calls to %DebugPrint(). %DebugPrintPtr() takes a pointer and
attempts to print it as an object.
Change-Id: Ibc3368136a2ed92f400b52dbf2855f3c7d80d887
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2276046
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68617}
This is likely the major change of the series, as Call nodes are the
focus of call reducer (and to a lesser extent other phases like
inlining).
This CL essentially adds the new input to Call nodes, and updates the
rest of the pipeline. As a (fairly large) drive-by, I also introduce
the JSCallNode wrapper class and apply it in call reducer.
This change, although large, will hopefully make future refactorings
*much* easier, since it is now clear where certain assumptions about
Call node layout are made.
Bug: v8:8888
Change-Id: Ia15fe0ba459b6034863a5815a4e4662cee41fc83
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2264353
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68616}