Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Issue 1625753002: Allocation sampling for paged/lo spaces (Closed)

Created:
4 years, 11 months ago by mattloring
Modified:
4 years, 10 months ago
CC:
v8-reviews_googlegroups.com, Hannes Payer (out of office), ulan
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Allocation sampling for paged/large object spaces This change expands allocation sampling to include old, map, code, and large object spaces. This involved refactoring much of the observation logic out of NewSpace into Space and overriding as needed in sub-classes. Additionally, the sampling heap profiler now maintains a pair of heap observers. One observer is used for observing new space and resetting the inline allocation limit to be periodically notified of allocations. The other observes allocation across the other spaces where there is no additional work required to observe allocations. Tests have been updated to ensure that allocations are observed correctly for Paged and LargeObject spaces. R=ofrobots@google.com, hpayer@chromium.org, ulan@chromium.org BUG= Committed: https://crrev.com/f3cdf8a9f02b58bdbd89e6fee1e0bb561df9f4c9 Cr-Commit-Position: refs/heads/master@{#33959}

Patch Set 1 #

Total comments: 27

Patch Set 2 : WIP: Allocation sampling for paged/lo spaces #

Total comments: 4

Patch Set 3 : Pause all spaces at once with PauseAllocationObserversScope #

Patch Set 4 : Added tests for PagedSpace/LargeObjectSpace observation #

Patch Set 5 : Re-add comments lost during refactoring #

Patch Set 6 : "Rebase" #

Total comments: 25

Patch Set 7 : Use allspaces iterator and fix style issues #

Total comments: 16

Patch Set 8 : Use smart pointers for allocation observers #

Patch Set 9 : Fix initialization of observers and remove unused heap #

Patch Set 10 : USE for DCHECK only variable #

Unified diffs Side-by-side diffs Delta from patch set Stats (+317 lines, -232 lines) Patch
M src/heap/heap.h View 1 2 3 4 5 6 7 8 5 chunks +11 lines, -10 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 8 5 chunks +6 lines, -6 lines 0 comments Download
M src/heap/incremental-marking.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M src/heap/incremental-marking.cc View 1 2 3 4 5 6 7 8 4 chunks +2 lines, -4 lines 0 comments Download
M src/heap/spaces.h View 1 2 3 4 5 6 7 8 9 chunks +48 lines, -32 lines 0 comments Download
M src/heap/spaces.cc View 1 2 3 4 5 6 7 8 8 chunks +41 lines, -26 lines 0 comments Download
M src/heap/spaces-inl.h View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -4 lines 0 comments Download
M src/profiler/sampling-heap-profiler.h View 1 2 3 4 5 6 7 8 9 3 chunks +47 lines, -25 lines 0 comments Download
M src/profiler/sampling-heap-profiler.cc View 1 2 3 4 5 6 7 8 6 chunks +54 lines, -52 lines 0 comments Download
M test/cctest/heap/test-spaces.cc View 1 2 3 4 5 6 7 8 3 chunks +96 lines, -71 lines 0 comments Download

Messages

Total messages: 39 (11 generated)
ofrobots
https://codereview.chromium.org/1625753002/diff/1/src/heap/heap.h File src/heap/heap.h (right): https://codereview.chromium.org/1625753002/diff/1/src/heap/heap.h#newcode2801 src/heap/heap.h:2801: explicit AllocationObserver(Heap* heap, intptr_t step_size) 'explicit' is only needed ...
4 years, 11 months ago (2016-01-23 16:16:31 UTC) #1
mattloring
On 2016/01/23 16:16:31, ofrobots wrote: > https://codereview.chromium.org/1625753002/diff/1/src/heap/heap.h > File src/heap/heap.h (right): > > https://codereview.chromium.org/1625753002/diff/1/src/heap/heap.h#newcode2801 > ...
4 years, 11 months ago (2016-01-25 23:58:38 UTC) #2
ofrobots
https://codereview.chromium.org/1625753002/diff/1/src/heap/spaces-inl.h File src/heap/spaces-inl.h (right): https://codereview.chromium.org/1625753002/diff/1/src/heap/spaces-inl.h#newcode437 src/heap/spaces-inl.h:437: if (obj->IsHeapObject()) { On 2016/01/23 16:16:31, ofrobots wrote: > ...
4 years, 11 months ago (2016-01-26 00:38:25 UTC) #3
ofrobots
https://codereview.chromium.org/1625753002/diff/1/src/heap/spaces.cc File src/heap/spaces.cc (right): https://codereview.chromium.org/1625753002/diff/1/src/heap/spaces.cc#newcode2625 src/heap/spaces.cc:2625: owner_->heap()->incremental_marking()->OldSpaceStep(size_in_bytes - On 2016/01/23 16:16:31, ofrobots wrote: > You ...
4 years, 11 months ago (2016-01-26 00:41:51 UTC) #4
mattloring
https://codereview.chromium.org/1625753002/diff/1/src/heap/heap.h File src/heap/heap.h (right): https://codereview.chromium.org/1625753002/diff/1/src/heap/heap.h#newcode2801 src/heap/heap.h:2801: explicit AllocationObserver(Heap* heap, intptr_t step_size) On 2016/01/23 16:16:30, ofrobots ...
4 years, 11 months ago (2016-01-26 00:42:48 UTC) #5
ofrobots
https://codereview.chromium.org/1625753002/diff/1/src/heap/heap.h File src/heap/heap.h (right): https://codereview.chromium.org/1625753002/diff/1/src/heap/heap.h#newcode2811 src/heap/heap.h:2811: if (heap_->gc_state() != Heap::NOT_IN_GC) return; On 2016/01/26 00:42:48, mattloring ...
4 years, 11 months ago (2016-01-26 15:47:16 UTC) #6
mattloring
https://codereview.chromium.org/1625753002/diff/20001/src/heap/heap.cc File src/heap/heap.cc (right): https://codereview.chromium.org/1625753002/diff/20001/src/heap/heap.cc#newcode1427 src/heap/heap.cc:1427: PauseAllocationObserversScope pause_lo_observers(lo_space()); On 2016/01/26 00:38:25, ofrobots wrote: > This ...
4 years, 10 months ago (2016-01-30 00:38:03 UTC) #7
mattloring
4 years, 10 months ago (2016-01-30 00:38:04 UTC) #8
mattloring
4 years, 10 months ago (2016-02-05 23:51:09 UTC) #12
Hannes Payer (out of office)
https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.cc File src/heap/spaces.cc (right): https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.cc#newcode75 src/heap/spaces.cc:75: heap_->new_space()->PauseAllocationObservers(); Use the AllSpaces iterator. https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.cc#newcode82 src/heap/spaces.cc:82: PauseAllocationObserversScope::~PauseAllocationObserversScope() { ...
4 years, 10 months ago (2016-02-08 10:13:48 UTC) #13
mattloring
https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.cc File src/heap/spaces.cc (right): https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.cc#newcode75 src/heap/spaces.cc:75: heap_->new_space()->PauseAllocationObservers(); On 2016/02/08 10:13:48, Hannes Payer wrote: > Use ...
4 years, 10 months ago (2016-02-09 20:20:05 UTC) #14
ofrobots
https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.h File src/heap/spaces.h (right): https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.h#newcode1038 src/heap/spaces.h:1038: List<AllocationObserver*>* allocation_observers_ = On 2016/02/09 20:20:05, mattloring wrote: > ...
4 years, 10 months ago (2016-02-10 08:15:38 UTC) #15
mattloring
https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.h File src/heap/spaces.h (right): https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.h#newcode1038 src/heap/spaces.h:1038: List<AllocationObserver*>* allocation_observers_ = On 2016/02/10 08:15:38, ofrobots wrote: > ...
4 years, 10 months ago (2016-02-10 13:19:23 UTC) #16
ofrobots
On 2016/02/10 13:19:23, mattloring wrote: > https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.h > File src/heap/spaces.h (right): > > https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.h#newcode1038 > ...
4 years, 10 months ago (2016-02-11 05:51:00 UTC) #17
ofrobots
https://codereview.chromium.org/1625753002/diff/120001/src/heap/incremental-marking.h File src/heap/incremental-marking.h (right): https://codereview.chromium.org/1625753002/diff/120001/src/heap/incremental-marking.h#newcode221 src/heap/incremental-marking.h:221: Observer(IncrementalMarking& incremental_marking, Heap* heap, `heap` parameter not used? https://codereview.chromium.org/1625753002/diff/120001/src/heap/spaces-inl.h ...
4 years, 10 months ago (2016-02-11 05:51:47 UTC) #18
Hannes Payer (out of office)
https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.h File src/heap/spaces.h (right): https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.h#newcode1038 src/heap/spaces.h:1038: List<AllocationObserver*>* allocation_observers_ = On 2016/02/10 13:19:23, mattloring wrote: > ...
4 years, 10 months ago (2016-02-11 11:50:08 UTC) #19
mattloring
https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.h File src/heap/spaces.h (right): https://codereview.chromium.org/1625753002/diff/100001/src/heap/spaces.h#newcode1038 src/heap/spaces.h:1038: List<AllocationObserver*>* allocation_observers_ = On 2016/02/11 11:50:08, Hannes Payer wrote: ...
4 years, 10 months ago (2016-02-11 14:54:14 UTC) #20
mattloring
4 years, 10 months ago (2016-02-11 14:54:17 UTC) #21
ofrobots
On 2016/02/11 14:54:17, mattloring wrote: LGTM
4 years, 10 months ago (2016-02-11 16:21:11 UTC) #22
mattloring
https://codereview.chromium.org/1625753002/diff/120001/src/heap/incremental-marking.h File src/heap/incremental-marking.h (right): https://codereview.chromium.org/1625753002/diff/120001/src/heap/incremental-marking.h#newcode221 src/heap/incremental-marking.h:221: Observer(IncrementalMarking& incremental_marking, Heap* heap, On 2016/02/11 05:51:46, ofrobots wrote: ...
4 years, 10 months ago (2016-02-11 17:30:53 UTC) #23
Hannes Payer (out of office)
lgtm
4 years, 10 months ago (2016-02-12 09:58:28 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1625753002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1625753002/160001
4 years, 10 months ago (2016-02-12 14:58:00 UTC) #26
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_nodcheck_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel/builds/12165)
4 years, 10 months ago (2016-02-12 15:26:03 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1625753002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1625753002/180001
4 years, 10 months ago (2016-02-12 17:55:40 UTC) #30
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-12 18:24:37 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1625753002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1625753002/180001
4 years, 10 months ago (2016-02-12 19:48:55 UTC) #35
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 10 months ago (2016-02-12 19:50:11 UTC) #37
commit-bot: I haz the power
4 years, 10 months ago (2016-02-12 19:50:57 UTC) #39
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/f3cdf8a9f02b58bdbd89e6fee1e0bb561df9f4c9
Cr-Commit-Position: refs/heads/master@{#33959}

Powered by Google App Engine
This is Rietveld 408576698