v8/src
Corentin Pescheloche e155881f24 Reland "[profiler] Surface VM & Embedder State"
This is a reland of 2d087f237e

The changes are :
* Fix redundant reinterpret_cast in test file for MSVC failure
https://crbug.com/v8/12476
* Fix flaky test
https://crbug.com/v8/12475
If a sample is captured during a GC, no embedder context is obtained
defaulting to EMPTY. This is the expected behavior, made it in clear
in implementation and in test.
* Synchronized the embedder context filter behavior with existing
native context filter.

Original change's description:

> Add APIs to surface VMState and new EmbedderState to CpuProfile samples.
>
> EmbedderState:
> * An EmbedderState is defined as a value uint8_t and a v8::context used
> for filtering.
> * EmbedderStates are stack allocated by the embedder, construction and
> destruction set/unset the state to the isolate thread local top.
> * A v8::context is used to filter states that are added to a CpuProfile,
> if the CpuProfile do not have a ContextFilter set or if contexts do not
> match, state defaults to Empty.
>
> * v8:StateTag is already propagated all the way to a Sample, simply add
> an API to surface it.
>
> VMState:
> Change-Id: I7eed08907360b99b0ad20ddcff59c95c7076c85e
> Bug: chromium:1263871
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3188072
> Auto-Submit: Corentin Pescheloche <cpescheloche@fb.com>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78250}

Bug: chromium:1263871
Change-Id: Ief891b05da99c695e9fb70f94ed7ebdecc6c3b7b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3320037
Auto-Submit: Corentin Pescheloche <cpescheloche@fb.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78281}
2021-12-07 19:00:07 +00:00
..
api Reland "[profiler] Surface VM & Embedder State" 2021-12-07 19:00:07 +00:00
asmjs [ext-code-space] Avoid Code <-> CodeT conversions in runtime, pt.1 2021-11-08 14:08:24 +00:00
ast [compiler-dispatcher] Enqueue tasks for non-eager inner funcs 2021-12-01 13:14:09 +00:00
base [counters] Make all counters thread-safe 2021-12-07 17:12:19 +00:00
baseline s390x: [baseline] implement Jump pt.2 2021-12-03 16:49:08 +00:00
bigint Skip the readability/check rule on bigint directory 2021-11-09 14:57:49 +00:00
builtins [builtins] catch and rethrow the message together with the exception 2021-12-06 22:14:56 +00:00
codegen [counters] Make all counters thread-safe 2021-12-07 17:12:19 +00:00
common Reland "[top-level-await] Remove --harmony-top-level-await" 2021-12-06 23:02:33 +00:00
compiler [wasm-gc] Introduce minimum supertype length 2021-12-07 17:40:48 +00:00
compiler-dispatcher [compiler] Create ParseInfo on BG thread 2021-12-03 15:01:11 +00:00
d8 [d8] Make counters fully atomic 2021-12-07 17:27:37 +00:00
date [builtins][date] Fix -Wshadow warnings 2021-11-15 19:46:43 +00:00
debug [debugger] Remove separate didPause for instrumentation breakpoints 2021-12-07 10:42:27 +00:00
deoptimizer [ext-code-space] Rename InstructionStream to OffHeapInstructionStream 2021-12-02 11:05:32 +00:00
diagnostics [string] Make String::MakeThin threadsafe for shared strings 2021-12-06 20:27:06 +00:00
execution Reland "[profiler] Surface VM & Embedder State" 2021-12-07 19:00:07 +00:00
extensions [interpreter] Port GetDispatchCountersObject to internal 2021-08-25 09:50:51 +00:00
flags [heap] Fix marking state regression 2021-12-07 09:30:17 +00:00
handles [handles] Branch hints and force-inline in HandleScope 2021-11-11 07:56:47 +00:00
heap Reland "[profiler] Surface VM & Embedder State" 2021-12-07 19:00:07 +00:00
ic [baseline] Improve BitwiseBinaryOp with Smi rhs 2021-12-02 12:09:33 +00:00
init Reland "[top-level-await] Remove --harmony-top-level-await" 2021-12-06 23:02:33 +00:00
inspector [debugger] Remove separate didPause for instrumentation breakpoints 2021-12-07 10:42:27 +00:00
interpreter [builtins] catch and rethrow the message together with the exception 2021-12-06 22:14:56 +00:00
json platform: Provide hooks for disabling allocation quarantining 2021-12-01 10:37:49 +00:00
libplatform Introduce v8_enable_virtual_memory_cage 2021-08-11 16:13:42 +00:00
libsampler [cleanup] Fix a bunch of -Wshadow 2021-11-22 17:27:38 +00:00
logging [counters] Make all counters thread-safe 2021-12-07 17:12:19 +00:00
numbers [flags] Remove unused FLAG_randomize_hashes 2021-11-30 14:36:29 +00:00
objects [string] Remove unused String::SlowCopy 2021-12-07 09:40:17 +00:00
parsing Reland "[top-level-await] Remove --harmony-top-level-await" 2021-12-06 23:02:33 +00:00
profiler Reland "[profiler] Surface VM & Embedder State" 2021-12-07 19:00:07 +00:00
protobuf Remove petermarshall from OWNERS 2021-03-31 11:00:22 +00:00
regexp [regexp] Fix CharacterRange limits again again again 2021-12-01 15:13:09 +00:00
roots [string] Make String::MakeThin threadsafe for shared strings 2021-12-06 20:27:06 +00:00
runtime [builtins] catch and rethrow the message together with the exception 2021-12-06 22:14:56 +00:00
sanitizer Reland "[elements] Avoid racy data reads/writes" 2021-05-06 10:46:52 +00:00
security Introduce VirtualAddressSpace interface 2021-12-04 21:42:04 +00:00
snapshot [string] Make String::MakeThin threadsafe for shared strings 2021-12-06 20:27:06 +00:00
strings [objects] Make PropertyKind an enum class to fix -Wshadow 2021-11-15 19:05:14 +00:00
tasks Remove rmcilroy from OWNERS. 2021-08-19 16:30:27 +00:00
temporal [temporal] Sync parser change in PR1957 2021-12-07 04:03:17 +00:00
third_party Reland "[include] Split out v8.h" 2021-08-24 13:08:55 +00:00
torque [builtins] catch and rethrow the message together with the exception 2021-12-06 22:14:56 +00:00
tracing [base] Move utils/vector.h to base/vector.h 2021-06-18 13:33:13 +00:00
trap-handler [trap-handler] Fix -Wshadow warnings 2021-10-15 23:09:46 +00:00
utils Add LsanVirtualAddressSpace implementation 2021-12-06 16:01:54 +00:00
wasm [wasm-gc] Introduce minimum supertype length 2021-12-07 17:40:48 +00:00
web-snapshot [web snapshots] Support function prototype 2021-12-07 11:34:07 +00:00
zone [regexp] Release regexp zone memory during JS parsing 2021-11-02 11:56:11 +00:00
DEPS cppgc: Prohibit Oilpan usage from within V8 2021-08-25 08:24:33 +00:00
DIR_METADATA Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00
OWNERS Add DIR_METADATA files to v8. 2020-10-20 22:12:28 +00:00