v8/include/cppgc
Michael Lippautz 479bfdb11b cppgc: Optimize GCInfo setup
In Blink's version of Oilpan, GCInfo objects would reside in .bss and
a table would translate between an index and the .bss address. Upon
retrieving a GCInfoIndex, the slow path merely passes a .bss pointer
to a slow path setup method to create the table mapping.

In cppgc, we set up GCInfo entries directly in the table. This is
slightly faster for actually using GCInfo objects as there's no
indirection between table and .bss, and it also saves one pointer (the
indirection) per type that is set up. The downside of this approach is
that individual components of a GCInfo objects, that are all
type-dependent, need to be passed to the conditional setup method.
Since GCInfo indices must be retrieved on each allocation, this
pollutes the fast path with additional instructions.

However, GCInfo components are actually known at compile-time for many
objects. In such cases, we can use a compile-time static dispatch to
encode the known parameters in different functions. This saves around
40KiB of memory on ChromePublic.apk and also creates a more compact
fast path for allocation.

Bug: chromium:1238884, chromium:1056170
Change-Id: Iedd809a8baefcc02f131d2b2c77d341b0abe43bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3094007
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76291}
2021-08-14 11:16:11 +00:00
..
internal cppgc: Optimize GCInfo setup 2021-08-14 11:16:11 +00:00
allocation.h cppgc: Optimize GCInfo setup 2021-08-14 11:16:11 +00:00
common.h cppgc: Random style fixes and comment updates 2021-01-26 22:43:44 +00:00
cross-thread-persistent.h cppgc: Allow CrossThreadPersistent to access poisoned memory from GC 2021-07-21 19:11:01 +00:00
custom-space.h cppgc: Fix CustomSpace trait 2021-01-27 16:48:28 +00:00
default-platform.h cppgc: Fix and merge cppgc samples 2020-11-26 09:12:35 +00:00
DEPS cppgc: Use libplatform as default platform 2020-10-08 18:16:52 +00:00
ephemeron-pair.h cppgc: Check ephemerons for unset key 2021-02-12 16:55:00 +00:00
explicit-management.h cppgc: Adjust explicit management calls 2021-05-05 14:18:37 +00:00
garbage-collected.h cppgc: Add GCInfo folding 2021-03-11 10:53:26 +00:00
heap-consistency.h cppgc: Fix low-level write barriers 2021-02-05 15:22:04 +00:00
heap-state.h cppgc: Add WasConservativeGC to HeapState 2021-02-25 22:54:05 +00:00
heap-statistics.h cppgc: Wire up discarded size 2021-07-12 16:03:50 +00:00
heap.h cppgc: IWYU cleanups 2021-05-20 10:42:29 +00:00
liveness-broker.h cppgc: LivenessBroker: Treat nullptr as live 2021-08-11 11:59:31 +00:00
macros.h cppgc: IWYU cleanups 2021-05-20 10:42:29 +00:00
member.h cppgc: Allow CrossThreadPersistent to access poisoned memory from GC 2021-07-21 19:11:01 +00:00
name-provider.h cppgc: NameProvider:GetName() -> NameProvider::GetHumanReadableName() 2021-06-08 15:56:46 +00:00
object-size-trait.h cppgc: Fix compilation error on older gcc compilers 2021-01-22 23:13:30 +00:00
OWNERS cppgc: Make bikineev and omerkatz owners of include/cppgc 2020-08-28 08:05:30 +00:00
persistent.h cppgc: Allow CrossThreadPersistent to access poisoned memory from GC 2021-07-21 19:11:01 +00:00
platform.h cppgc: Assumption of stack location doesn't hold on Mac 2021-08-10 15:29:50 +00:00
prefinalizer.h cppgc: Fix IsGarabgeCollected trait and friends 2021-01-22 16:20:46 +00:00
process-heap-statistics.h cppgc: Implement process-global state accessors. 2021-02-17 22:37:24 +00:00
README.md cppgc: Hello world 2020-03-23 21:42:56 +00:00
sentinel-pointer.h [cleanup][include] Remove redundant NOLINT annotations 2021-04-30 16:22:19 +00:00
source-location.h cppgc: IWYU cleanups 2021-05-20 10:42:29 +00:00
testing.h cppgc: Implement testing APIs 2021-04-06 13:44:29 +00:00
trace-trait.h cppgc: Fix IsGarabgeCollected trait and friends 2021-01-22 16:20:46 +00:00
type-traits.h Reland "cppgc: Implement basic Member and Persistent checks" 2021-05-10 12:31:05 +00:00
visitor.h cppgc: Allow CrossThreadPersistent to access poisoned memory from GC 2021-07-21 19:11:01 +00:00

C++ Garbage Collection

This directory provides an open-source garbage collection library for C++.

The library is under construction, meaning that all APIs in this directory are incomplete and considered unstable and should not be used.