v8/src/heap
Michael Lippautz 4569ffae0b Migrate CrossThreadPersistent
Adds a cross-thread reference for strongly and weakly retaining
objects on a thread other than the thread that owns the object.

The intended use of the reference is by setting it up on the
originating thread, holding the object alive from another thread, and
ultimately accessing the object again on the originating thread.

The reference has known caveats:
- It's unsafe to use when the heap may terminate;
- It's unsafe to transitively reach through the graph because of
  compaction;

Change-Id: I84fbdde69a099eb54af5b93c34e2169915b17e64
Bug: chromium:1056170
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2436449
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70428}
2020-10-09 14:33:57 +00:00
..
base Revert "[heap] Convert WeakObjects to heap::base::Worklist" 2020-10-06 14:21:55 +00:00
cppgc Migrate CrossThreadPersistent 2020-10-09 14:33:57 +00:00
cppgc-js cppgc: Concurrent marking 2020-10-06 15:47:21 +00:00
third-party
allocation-observer.cc [heap] Start StressConcurrentAllocatorTask through AllocationObserver 2020-08-18 05:33:24 +00:00
allocation-observer.h [heap] Support removing of observers during Step() 2020-08-17 10:42:32 +00:00
allocation-stats.h [heap] Make AllocationStats methods const 2020-07-07 16:18:06 +00:00
array-buffer-sweeper.cc [heap] Remove ArrayBufferTracker 2020-08-12 09:00:07 +00:00
array-buffer-sweeper.h
barrier.h
base-space.cc [heap] Move BaseSpace into base-space.h 2020-06-19 09:38:24 +00:00
base-space.h [heap] Fix allocated_object_size for RO_SPACE 2020-06-23 16:55:45 +00:00
basic-memory-chunk.cc [heap] Move marking bitmap into the memory chunk header 2020-07-10 10:23:05 +00:00
basic-memory-chunk.h Revert "[heap] Fix tracking of code pages for V8 stack unwinder" 2020-09-18 12:39:05 +00:00
code-object-registry.cc [heap] Lazily sort CodeObjectRegistry pointers 2020-10-01 09:09:52 +00:00
code-object-registry.h [heap] Lazily sort CodeObjectRegistry pointers 2020-10-01 09:09:52 +00:00
code-stats.cc [nci] Replace CompilationTarget with a new Code::Kind value 2020-08-05 12:27:22 +00:00
code-stats.h
combined-heap.cc [heap] Allow enabling --local-heaps by default 2020-06-02 19:03:25 +00:00
combined-heap.h [heap] Allow enabling --local-heaps by default 2020-06-02 19:03:25 +00:00
concurrent-allocator-inl.h [heap] Introduce LocalHeap::AllocateRaw method 2020-08-03 09:12:42 +00:00
concurrent-allocator.cc [heap] Stop allocation in StressConcurrentAllocatorTask on tear down 2020-09-22 09:51:58 +00:00
concurrent-allocator.h [heap] Stop allocation in StressConcurrentAllocatorTask on tear down 2020-09-22 09:51:58 +00:00
concurrent-marking.cc Reland "Reland "[Heap]: Marking use Jobs."" 2020-10-09 02:16:21 +00:00
concurrent-marking.h Reland "Reland "[Heap]: Marking use Jobs."" 2020-10-09 02:16:21 +00:00
conservative-stack-visitor.cc [heap] Add conservative stack scanning 2020-09-01 12:21:29 +00:00
conservative-stack-visitor.h [heap] Add conservative stack scanning 2020-09-01 12:21:29 +00:00
embedder-tracing.cc [sandbox][x64] Access external pointer through a table 2020-09-29 17:13:43 +00:00
embedder-tracing.h heap,cppgc: Update StackState enum values 2020-05-12 12:07:27 +00:00
factory-base-inl.h
factory-base.cc [compiler] Never serialize ScopeInfo 2020-10-08 14:58:41 +00:00
factory-base.h [offthread] Change OffThreadIsolate to LocalIsolate 2020-08-14 10:57:27 +00:00
factory-inl.h [runtime] Move string table off-heap 2020-08-06 12:27:18 +00:00
factory.cc Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
factory.h Reland "[torque] refactor: use -tq only in filenames derived from .tq files" 2020-09-25 15:04:18 +00:00
finalization-registry-cleanup-task.cc
finalization-registry-cleanup-task.h [clang-tidy] Make deleted member functions public 2020-06-11 16:47:41 +00:00
free-list-inl.h [heap] Move FreeList related code into heap/free-list.* files 2020-06-12 13:54:10 +00:00
free-list.cc [heap] Use regular FreeList for MapSpace 2020-10-01 14:20:22 +00:00
free-list.h [heap] Use regular FreeList for MapSpace 2020-10-01 14:20:22 +00:00
gc-idle-time-handler.cc
gc-idle-time-handler.h
gc-tracer.cc heap: Fix metric around corner case of fast marking 2020-10-07 09:57:29 +00:00
gc-tracer.h [perfetto,heap] Fix the order of GC trace event categories 2020-05-12 06:45:54 +00:00
heap-controller.cc
heap-controller.h
heap-inl.h Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
heap-write-barrier-inl.h [heap] Remove the unused Map parameter from the marking barrier 2020-09-24 12:46:27 +00:00
heap-write-barrier.cc [heap] Remove the unused Map parameter from the marking barrier 2020-09-24 12:46:27 +00:00
heap-write-barrier.h [heap] Remove the unused Map parameter from the marking barrier 2020-09-24 12:46:27 +00:00
heap.cc Reland "Reland "[Heap]: Marking use Jobs."" 2020-10-09 02:16:21 +00:00
heap.h [serializer] Introduce HandleScopes for object contents 2020-10-08 18:03:51 +00:00
incremental-marking-inl.h [heap] Split marking worklist into global worklist and local worklists 2020-08-11 13:15:54 +00:00
incremental-marking-job.cc [heap] Fix failing DCHECK with original_top < top 2020-09-11 09:45:40 +00:00
incremental-marking-job.h [heap] Allow background threads to start incremental marking 2020-05-08 10:41:38 +00:00
incremental-marking.cc Revert "[heap] Refactor marking weak object worklists" 2020-10-06 15:41:41 +00:00
incremental-marking.h Revert "[heap] Refactor marking weak object worklists" 2020-10-06 15:41:41 +00:00
index-generator.cc [Heap]: Implement IndexGenerator for Jobs use cases. 2020-09-11 19:25:33 +00:00
index-generator.h [Heap]: Implement IndexGenerator for Jobs use cases. 2020-09-11 19:25:33 +00:00
invalidated-slots-inl.h
invalidated-slots.cc
invalidated-slots.h
item-parallel-job.cc
item-parallel-job.h [cleanup] Consistent comments on namespace ends 2020-08-17 10:09:02 +00:00
large-spaces.cc [offthread] Change OffThreadIsolate to LocalIsolate 2020-08-14 10:57:27 +00:00
large-spaces.h [offthread] Change OffThreadIsolate to LocalIsolate 2020-08-14 10:57:27 +00:00
list.h [heap] Make Heap::Contains const 2020-05-13 13:19:22 +00:00
local-allocator-inl.h [heap] Allow background threads to start incremental marking 2020-05-08 10:41:38 +00:00
local-allocator.h [heap] Fix failing DCHECK with original_top < top 2020-09-11 09:45:40 +00:00
local-factory-inl.h [offthread] Change OffThreadIsolate to LocalIsolate 2020-08-14 10:57:27 +00:00
local-factory.cc [offthread] Change OffThreadIsolate to LocalIsolate 2020-08-14 10:57:27 +00:00
local-factory.h [offthread] Change OffThreadIsolate to LocalIsolate 2020-08-14 10:57:27 +00:00
local-heap-inl.h Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
local-heap.cc [heap] New mechanism for requesting GC from background threads 2020-10-01 08:53:41 +00:00
local-heap.h Add DisallowGarbageCollection and AllowGarbageCollection 2020-09-22 08:07:08 +00:00
mark-compact-inl.h Revert "[heap] Convert WeakObjects to heap::base::Worklist" 2020-10-06 14:21:55 +00:00
mark-compact.cc Reland "Reland "[Heap]: Marking use Jobs."" 2020-10-09 02:16:21 +00:00
mark-compact.h Revert "[heap] Convert WeakObjects to heap::base::Worklist" 2020-10-06 14:21:55 +00:00
marking-barrier-inl.h [heap] Fix regressions in the configuration without concurrent marking 2020-09-22 07:41:43 +00:00
marking-barrier.cc [heap] Remove the unused Map parameter from the marking barrier 2020-09-24 12:46:27 +00:00
marking-barrier.h [heap] Remove the unused Map parameter from the marking barrier 2020-09-24 12:46:27 +00:00
marking-visitor-inl.h Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
marking-visitor.h Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
marking-worklist-inl.h cppgc, heap: Merge worklist implementations 2020-09-09 13:05:55 +00:00
marking-worklist.cc [heap] Split marking worklist into global worklist and local worklists 2020-08-11 13:15:54 +00:00
marking-worklist.h cppgc, heap: Merge worklist implementations 2020-09-09 13:05:55 +00:00
marking.cc
marking.h [heap] Fix regressions in the configuration without concurrent marking 2020-09-22 07:41:43 +00:00
memory-allocator.cc [heap] Share RO_SPACE pages with pointer compression 2020-07-31 13:34:59 +00:00
memory-allocator.h [heap] Share RO_SPACE pages with pointer compression 2020-07-31 13:34:59 +00:00
memory-chunk-inl.h
memory-chunk-layout.cc [heap] Move marking bitmap into the memory chunk header 2020-07-10 10:23:05 +00:00
memory-chunk-layout.h [heap] Add object start bitmap for conservative stack scanning 2020-08-31 07:10:36 +00:00
memory-chunk.cc [heap] Add object start bitmap for conservative stack scanning 2020-08-31 07:10:36 +00:00
memory-chunk.h [heap] Add object start bitmap for conservative stack scanning 2020-08-31 07:10:36 +00:00
memory-measurement-inl.h [heap] Handle partially initialized objects in NativeContextInferrer 2020-10-09 12:43:42 +00:00
memory-measurement.cc [heap] Handle partially initialized objects in NativeContextInferrer 2020-10-09 12:43:42 +00:00
memory-measurement.h [heap] Handle partially initialized objects in NativeContextInferrer 2020-10-09 12:43:42 +00:00
memory-reducer.cc
memory-reducer.h
new-spaces-inl.h [heap] Fix failing DCHECK with original_top < top 2020-09-11 09:45:40 +00:00
new-spaces.cc [heap] Fix DCHECK in NewSpace::Grow 2020-10-08 07:50:57 +00:00
new-spaces.h [heap] Fix failing DCHECK with original_top < top 2020-09-11 09:45:40 +00:00
object-start-bitmap.h [heap] Add conservative stack scanning 2020-09-01 12:21:29 +00:00
object-stats.cc [cleanup] Clean up SYNCHRONIZED_ACCESSORS macro naming and its uses 2020-10-05 11:01:22 +00:00
object-stats.h
objects-visiting-inl.h [heap] Remove ArrayBufferTracker 2020-08-12 09:00:07 +00:00
objects-visiting.cc [cleanup] Clean up SYNCHRONIZED_ACCESSORS macro naming and its uses 2020-10-05 11:01:22 +00:00
objects-visiting.h Reland "[torque] refactor: use -tq only in filenames derived from .tq files" 2020-09-25 15:04:18 +00:00
OWNERS
paged-spaces-inl.h Reland "[heap] Refactor allocation observer in AllocationCounter" 2020-08-04 09:20:02 +00:00
paged-spaces.cc [heap] Access wasted_memory() while holding lock 2020-09-24 19:21:28 +00:00
paged-spaces.h [heap] Use regular FreeList for MapSpace 2020-10-01 14:20:22 +00:00
parallel-work-item.h Reland "Reland "[Heap] ScavengerCollector use Jobs."" 2020-09-30 16:29:54 +00:00
read-only-heap-inl.h [ptr-cmpr] Change const Isolate* to IsolateRoot 2020-10-07 08:03:50 +00:00
read-only-heap.cc Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
read-only-heap.h Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
read-only-spaces.cc Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
read-only-spaces.h Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
remembered-set-inl.h [heap] Create remembered-set-inl.h and move UpdateTypedSlot 2020-06-03 14:42:47 +00:00
remembered-set.h [heap] Create remembered-set-inl.h and move UpdateTypedSlot 2020-06-03 14:42:47 +00:00
safepoint.cc [heap] Remove GlobalSafepoint::Start() and End() methods 2020-09-16 09:20:28 +00:00
safepoint.h [heap] Remove GlobalSafepoint::Start() and End() methods 2020-09-16 09:20:28 +00:00
scavenge-job.cc
scavenge-job.h
scavenger-inl.h [cleanup] Clean up SYNCHRONIZED_ACCESSORS macro naming and its uses 2020-10-05 11:01:22 +00:00
scavenger.cc Reland "Reland "[Heap] ScavengerCollector use Jobs."" 2020-09-30 16:29:54 +00:00
scavenger.h Reland "Reland "[Heap] ScavengerCollector use Jobs."" 2020-09-30 16:29:54 +00:00
setup-heap-internal.cc Reland^4 "[serializer] Allocate during deserialization" 2020-10-07 08:15:50 +00:00
slot-set.cc
slot-set.h
spaces-inl.h [offthread] Change OffThreadIsolate to LocalIsolate 2020-08-14 10:57:27 +00:00
spaces.cc [heap] Fix failing DCHECK with original_top < top 2020-09-11 09:45:40 +00:00
spaces.h [heap] Fix failing DCHECK with original_top < top 2020-09-11 09:45:40 +00:00
stress-marking-observer.cc
stress-marking-observer.h
stress-scavenge-observer.cc
stress-scavenge-observer.h
sweeper.cc [heap] Add object start bitmap for conservative stack scanning 2020-08-31 07:10:36 +00:00
sweeper.h [heap] Finish sweeping without refilling free lists on shutdown 2020-07-14 12:50:04 +00:00
worklist.h