• Dan Elphick's avatar
    Reland "Reland "[heap] Move initial objects into RO_SPACE"" · 9ab6621a
    Dan Elphick authored
    This is a reland of 6c68efac
    
    Updated Heap::CommittedMemory and related functions to iterate over all
    spaces rather than including them manually which can lead to a space
    being overlooked. Also adds a test to ensure this the case.
    
    Original change's description:
    > Revert "Reland "[heap] Move initial objects into RO_SPACE""
    >
    > This reverts commit 6c68efac.
    >
    > Reason for revert: https://bugs.chromium.org/p/v8/issues/detail?id=7668
    >
    > Original change's description:
    > > Reland "[heap] Move initial objects into RO_SPACE"
    > >
    > > This is a reland of f8ae62fe
    > >
    > > Original change's description:
    > > > [heap] Move initial objects into RO_SPACE
    > > >
    > > > This moves:
    > > > * the main oddballs (null, undefined, hole, true, false) as well as
    > > > their supporting maps (also adds hole as an internalized string to make
    > > > this work).
    > > > * most of the internalized strings
    > > > * the struct maps
    > > > * empty array
    > > > * empty enum cache
    > > > * the contents of the initial string table
    > > > * the weak_cell_cache for any map in RO_SPACE (and eagerly creates the
    > > > value avoid writing to it during run-time)
    > > >
    > > > The StartupSerializer stats change as follows:
    > > >
    > > >      RO_SPACE  NEW_SPACE  OLD_SPACE  CODE_SPACE  MAP_SPACE  LO_SPACE
    > > > old         0          0     270264       32608      12144         0
    > > > new     21776          0     253168       32608       8184         0
    > > > Overall memory usage has increased by 720 bytes due to the eager
    > > > initialization of the Map weak cell caches.
    > > >
    > > > Also extends --serialization-statistics to print out separate instance
    > > > type stats for objects in RO_SPACE as shown here:
    > > >
    > > >   Read Only Instance types (count and bytes):
    > > >        404      16736  ONE_BYTE_INTERNALIZED_STRING_TYPE
    > > >          2         32  HEAP_NUMBER_TYPE
    > > >          5        240  ODDBALL_TYPE
    > > >         45       3960  MAP_TYPE
    > > >          1         16  BYTE_ARRAY_TYPE
    > > >          1         24  TUPLE2_TYPE
    > > >          1         16  FIXED_ARRAY_TYPE
    > > >          1         32  DESCRIPTOR_ARRAY_TYPE
    > > >         45        720  WEAK_CELL_TYPE
    > > >
    > > > Bug: v8:7464
    > > > Change-Id: I12981c39c82a7057f68bbbe03f89fb57b0b4c6a6
    > > > Reviewed-on: https://chromium-review.googlesource.com/973722
    > > > Commit-Queue: Dan Elphick <delphick@chromium.org>
    > > > Reviewed-by: Hannes Payer <hpayer@chromium.org>
    > > > Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
    > > > Reviewed-by: Yang Guo <yangguo@chromium.org>
    > > > Cr-Commit-Position: refs/heads/master@{#52435}
    > >
    > > Bug: v8:7464
    > > Change-Id: I50427edfeb53ca80ec4cf46566368fb2213ccf7b
    > > Reviewed-on: https://chromium-review.googlesource.com/999654
    > > Commit-Queue: Dan Elphick <delphick@chromium.org>
    > > Reviewed-by: Yang Guo <yangguo@chromium.org>
    > > Reviewed-by: Hannes Payer <hpayer@chromium.org>
    > > Cr-Commit-Position: refs/heads/master@{#52638}
    >
    > TBR=rmcilroy@chromium.org,yangguo@chromium.org,hpayer@chromium.org,mlippautz@chromium.org,delphick@chromium.org
    >
    > # Not skipping CQ checks because original CL landed > 1 day ago.
    >
    > Bug: v8:7464,v8:7668
    > Change-Id: I10aa03623b51e997f95a3715ea9f0bf5d29d2cdb
    > Reviewed-on: https://chromium-review.googlesource.com/1016600
    > Commit-Queue: Peter Marshall <petermarshall@chromium.org>
    > Reviewed-by: Peter Marshall <petermarshall@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#52667}
    
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
    Change-Id: If4b7490c8c4d31612de8ec132de334955a319b11
    Bug: v8:7464, v8:7668
    Reviewed-on: https://chromium-review.googlesource.com/1019020Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Commit-Queue: Dan Elphick <delphick@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#52689}
    9ab6621a
Name
Last commit
Last update
..
OWNERS Loading commit data...
array-buffer-collector.cc Loading commit data...
array-buffer-collector.h Loading commit data...
array-buffer-tracker-inl.h Loading commit data...
array-buffer-tracker.cc Loading commit data...
array-buffer-tracker.h Loading commit data...
barrier.h Loading commit data...
code-stats.cc Loading commit data...
code-stats.h Loading commit data...
concurrent-marking.cc Loading commit data...
concurrent-marking.h Loading commit data...
embedder-tracing.cc Loading commit data...
embedder-tracing.h Loading commit data...
factory-inl.h Loading commit data...
factory.cc Loading commit data...
factory.h Loading commit data...
gc-idle-time-handler.cc Loading commit data...
gc-idle-time-handler.h Loading commit data...
gc-tracer.cc Loading commit data...
gc-tracer.h Loading commit data...
heap-inl.h Loading commit data...
heap.cc Loading commit data...
heap.h Loading commit data...
incremental-marking-inl.h Loading commit data...
incremental-marking-job.cc Loading commit data...
incremental-marking-job.h Loading commit data...
incremental-marking.cc Loading commit data...
incremental-marking.h Loading commit data...
invalidated-slots-inl.h Loading commit data...
invalidated-slots.cc Loading commit data...
invalidated-slots.h Loading commit data...
item-parallel-job.cc Loading commit data...
item-parallel-job.h Loading commit data...
local-allocator.h Loading commit data...
mark-compact-inl.h Loading commit data...
mark-compact.cc Loading commit data...
mark-compact.h Loading commit data...
marking.cc Loading commit data...
marking.h Loading commit data...
memory-reducer.cc Loading commit data...
memory-reducer.h Loading commit data...
object-stats.cc Loading commit data...
object-stats.h Loading commit data...
objects-visiting-inl.h Loading commit data...
objects-visiting.cc Loading commit data...
objects-visiting.h Loading commit data...
remembered-set.h Loading commit data...
scavenge-job.cc Loading commit data...
scavenge-job.h Loading commit data...
scavenger-inl.h Loading commit data...
scavenger.cc Loading commit data...
scavenger.h Loading commit data...
setup-heap-internal.cc Loading commit data...
slot-set.h Loading commit data...
spaces-inl.h Loading commit data...
spaces.cc Loading commit data...
spaces.h Loading commit data...
store-buffer.cc Loading commit data...
store-buffer.h Loading commit data...
stress-marking-observer.cc Loading commit data...
stress-marking-observer.h Loading commit data...
stress-scavenge-observer.cc Loading commit data...
stress-scavenge-observer.h Loading commit data...
sweeper.cc Loading commit data...
sweeper.h Loading commit data...
worklist.h Loading commit data...