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

Issue 2992753002: Prepares allocation for proper sync with mutator and bg threads. (Closed)

Created:
3 years, 4 months ago by danunez
Modified:
3 years, 4 months ago
Reviewers:
rmacnak, siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Prepares allocation for proper sync with mutator and bg threads. When top_ is required, we now search through all active threads and pull the top_ furthest in the space. When searching the space, we fills every thread's TLAB with a FreeListElement. Note that future allocations can safely overwrite them. We do NOT abandon the TLAB (i.e. set top_,end_ to 0) in these cases. Added notes to determing where to lock/unlock for threads R=asiva@google.com, rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/78745901799347a9184689b01c92a039fbd76698

Patch Set 1 #

Total comments: 10

Patch Set 2 : Splits FindTopOfSpace to two functions #

Total comments: 4

Patch Set 3 : Adds thread locking to functions that iterate over threads #

Total comments: 1

Patch Set 4 : Respond to comments and merge with master. #

Patch Set 5 : Calculates new space's usage w.r.t multiple threads' TLABs #

Patch Set 6 : Adds locking when creating new TLABs #

Total comments: 12

Patch Set 7 : Removes comments and checks for unscheduled mutator #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -23 lines) Patch
M runtime/vm/heap.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/heap.cc View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/scavenger.h View 1 2 3 4 5 6 5 chunks +8 lines, -1 line 0 comments Download
M runtime/vm/scavenger.cc View 1 2 3 4 5 6 5 chunks +52 lines, -18 lines 0 comments Download
M runtime/vm/thread_registry.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (1 generated)
danunez
3 years, 4 months ago (2017-07-31 18:13:26 UTC) #1
rmacnak
I like the trick about allowing further allocation on top of the FreeListElement. https://codereview.chromium.org/2992753002/diff/1/runtime/vm/heap.cc File ...
3 years, 4 months ago (2017-08-01 21:51:25 UTC) #2
danunez
https://codereview.chromium.org/2992753002/diff/1/runtime/vm/heap.cc File runtime/vm/heap.cc (right): https://codereview.chromium.org/2992753002/diff/1/runtime/vm/heap.cc#newcode90 runtime/vm/heap.cc:90: ASSERT(Thread::Current()->IsMutatorThread()); On 2017/08/01 21:51:25, rmacnak wrote: > Isn't this ...
3 years, 4 months ago (2017-08-01 23:25:35 UTC) #3
rmacnak
https://codereview.chromium.org/2992753002/diff/20001/runtime/vm/scavenger.cc File runtime/vm/scavenger.cc (right): https://codereview.chromium.org/2992753002/diff/20001/runtime/vm/scavenger.cc#newcode817 runtime/vm/scavenger.cc:817: // TODO(danunez): Abandon all threads' TLABs. Every thread should ...
3 years, 4 months ago (2017-08-02 19:20:48 UTC) #4
danunez
https://codereview.chromium.org/2992753002/diff/20001/runtime/vm/scavenger.cc File runtime/vm/scavenger.cc (right): https://codereview.chromium.org/2992753002/diff/20001/runtime/vm/scavenger.cc#newcode817 runtime/vm/scavenger.cc:817: // TODO(danunez): Abandon all threads' TLABs. Every thread should ...
3 years, 4 months ago (2017-08-02 19:36:08 UTC) #5
danunez
3 years, 4 months ago (2017-08-02 19:52:21 UTC) #6
rmacnak
lgtm https://codereview.chromium.org/2992753002/diff/40001/runtime/vm/scavenger.cc File runtime/vm/scavenger.cc (right): https://codereview.chromium.org/2992753002/diff/40001/runtime/vm/scavenger.cc#newcode720 runtime/vm/scavenger.cc:720: void Scavenger::MakeALLTLABsIterable(Isolate* isolate) const { All (lowercase Ls)
3 years, 4 months ago (2017-08-02 20:50:59 UTC) #7
danunez
New patchset which needs review.
3 years, 4 months ago (2017-08-08 17:50:11 UTC) #8
danunez
New patchset which adds locking and integrates the changes made from previous TLAB fixes.
3 years, 4 months ago (2017-08-10 17:15:17 UTC) #9
rmacnak
https://codereview.chromium.org/2992753002/diff/100001/runtime/vm/heap.cc File runtime/vm/heap.cc (right): https://codereview.chromium.org/2992753002/diff/100001/runtime/vm/heap.cc#newcode635 runtime/vm/heap.cc:635: // TODO(danunez): Need to lock and unlock for new ...
3 years, 4 months ago (2017-08-10 18:37:07 UTC) #10
danunez
https://codereview.chromium.org/2992753002/diff/100001/runtime/vm/heap.cc File runtime/vm/heap.cc (right): https://codereview.chromium.org/2992753002/diff/100001/runtime/vm/heap.cc#newcode635 runtime/vm/heap.cc:635: // TODO(danunez): Need to lock and unlock for new ...
3 years, 4 months ago (2017-08-10 20:36:46 UTC) #11
rmacnak
lgtm
3 years, 4 months ago (2017-08-10 21:16:39 UTC) #12
danunez
3 years, 4 months ago (2017-08-10 22:13:28 UTC) #14
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as
78745901799347a9184689b01c92a039fbd76698 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698