v8/src
Maya Lekova 3ea957a65a Revert "[stack-traces] Don't hold on to code objects from StackFrameInfos."
This reverts commit 6b1fb003e1.

Reason for revert: breaks gc stress bots - https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20gc%20stress/36626/overview

Original change's description:
> [stack-traces] Don't hold on to code objects from StackFrameInfos.
>
> Previously every `StackFrameInfo` instance would maintain a reference to
> an AbstractCode object, which was used to resolve the `code_offset` on
> that stack frame. However, it turns out that nowadays this is not
> necessary anymore, since all `code_offset`s reported for JavaScript
> frames are already bytecode offsets and thus can be resolved by just
> looking at the functions' bytecode.
>
> For WebAssembly frames we will also eagerly resolve the `code_offset`
> (which is different depending on whether we're looking at Liftoff or
> TurboFan code) to the byte offset (relative to the function start) and
> stash that away in the `StackFrameInfo`.
>
> For builtin exit frames, the `abstract_code` on the function always
> refers to the builtin code object and thus, there's no point in keeping
> an extra pointer to it around on the `StackFrameInfo`.
>
> This way the `StackFrameInfo` representation is somewhat uniform, and
> more importantly, the `StackFrameInfo` instances will no longer need to
> hold to concrete code objects.
>
> Drive-by-fix: Use `FixedArray::SetAndGrow()` when adding to the elements
> in the `StackTraceBuilder`.
>
> Also-By: szuend@chromium.org, jarin@chromium.org
> Bug: chromium:1258599, chromium:1077657, v8:8742, chromium:1069425
> Change-Id: I650e400e0e1acd920281669bdc7b5e1199683ae8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3323073
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#78320}

Bug: chromium:1258599, chromium:1077657, v8:8742, chromium:1069425
Change-Id: I20643ad8f0c383b754841fc52f9b3447b004c9d0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3327141
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Owners-Override: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#78323}
2021-12-09 13:00:21 +00:00
..
api [api] Add LongTaskStats::v8_execute_us 2021-12-09 11:38:04 +00:00
asmjs [ext-code-space] Avoid Code <-> CodeT conversions in runtime, pt.1 2021-11-08 14:08:24 +00:00
ast Revert "[class] implement reparsing of class instance member initializers" 2021-12-09 08:59:12 +00:00
base [object] Add Object::Relaxed_ReadField 2021-12-08 23:22:26 +00:00
baseline s390x: [baseline] implement Jump pt.2 2021-12-03 16:49:08 +00:00
bigint [BigInt] Port BigInt left and right shift from src/objects/bigint.cc 2021-12-08 11:30:58 +00:00
builtins [rab / gsab] Add RAB / GSAB support to TA.p.indexOf & lastIndexOf 2021-12-09 10:47:01 +00:00
codegen Revert "[loong64][mips64][fastcall] Enable float support on loong64 2021-12-09 12:59:17 +00:00
common Reland "[top-level-await] Remove --harmony-top-level-await" 2021-12-06 23:02:33 +00:00
compiler Revert "[loong64][mips64][fastcall] Enable float support on loong64 2021-12-09 12:59:17 +00:00
compiler-dispatcher [compiler-dispatcher] Delete Jobs as BG work 2021-12-08 16:25:15 +00:00
d8 Revert "[loong64][mips64][fastcall] Enable float support on loong64 2021-12-09 12:59:17 +00:00
date [builtins][date] Fix -Wshadow warnings 2021-11-15 19:46:43 +00:00
debug [compiler] Introduce ReusableUnoptimizedCompileState 2021-12-08 11:14:27 +00:00
deoptimizer [ext-code-space] Rename InstructionStream to OffHeapInstructionStream 2021-12-02 11:05:32 +00:00
diagnostics [riscv64]Implement webassembly simd swizzle/TruncSat/extadd/S128LOAD 2021-12-08 10:43:49 +00:00
execution Revert "[stack-traces] Don't hold on to code objects from StackFrameInfos." 2021-12-09 13:00:21 +00:00
extensions
flags Revert "[wasm] Add --wasm-dynamic-tiering to --future" 2021-12-08 23:21:24 +00:00
handles [handles] DCHECK that thread isn't parked when creating handles 2021-12-09 10:14:21 +00:00
heap Revert "[stack-traces] Don't hold on to code objects from StackFrameInfos." 2021-12-09 13:00:21 +00:00
ic [baseline] Improve BitwiseBinaryOp with Smi rhs 2021-12-02 12:09:33 +00:00
init Revert "[class] implement reparsing of class instance member initializers" 2021-12-09 08:59:12 +00:00
inspector [inspector] Consistent frame function name in V8 Inspector and API. 2021-12-08 06:58:19 +00:00
interpreter Revert "[class] implement reparsing of class instance member initializers" 2021-12-09 08:59:12 +00:00
json Reland [json] Set options to share on JSON.parse error script 2021-12-09 12:00:41 +00:00
libplatform
libsampler [cleanup] Fix a bunch of -Wshadow 2021-11-22 17:27:38 +00:00
logging [api] Add LongTaskStats::v8_execute_us 2021-12-09 11:38:04 +00:00
numbers [compiler] Introduce ReusableUnoptimizedCompileState 2021-12-08 11:14:27 +00:00
objects Revert "[stack-traces] Don't hold on to code objects from StackFrameInfos." 2021-12-09 13:00:21 +00:00
parsing Revert "[class] implement reparsing of class instance member initializers" 2021-12-09 08:59:12 +00:00
profiler Reland "[profiler] Surface VM & Embedder State" 2021-12-07 19:00:07 +00:00
protobuf
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 [wasm] Mark roots for stack switching 2021-12-08 11:36:27 +00:00
sanitizer
security Introduce VirtualAddressSpace interface 2021-12-04 21:42:04 +00:00
snapshot [compiler-dispatcher] Move Job pointer to SFI 2021-12-08 16:03:35 +00:00
strings [objects] Make PropertyKind an enum class to fix -Wshadow 2021-11-15 19:05:14 +00:00
tasks
temporal [temporal] Sync parser change in PR1957 2021-12-07 04:03:17 +00:00
third_party
torque [builtins] catch and rethrow the message together with the exception 2021-12-06 22:14:56 +00:00
tracing
trap-handler
utils Add LsanVirtualAddressSpace implementation 2021-12-06 16:01:54 +00:00
wasm PPC [liftoff]: Use scratch instead of ip 2021-12-08 16:04:41 +00:00
web-snapshot [web snapshots] Add two-byte string support 2021-12-08 12:36:55 +00:00
zone [regexp] Release regexp zone memory during JS parsing 2021-11-02 11:56:11 +00:00
DEPS
DIR_METADATA
OWNERS