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

Issue 1136143003: Remove fake isolate from concurrent sweeper and extend lifetime of VM threads. (Closed)

Created:
5 years, 7 months ago by koda
Modified:
5 years, 7 months ago
Reviewers:
siva, Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Remove fake isolate from concurrent sweeper and extend lifetime of VM threads. * Use real isolate in concurrent sweeper rather than shallow copy. The only part of the isolate, other than the page being swept, used by the sweeper is the class table (via RawObject::Size), which is now safe to read concurrently (copy-on-write). * Do not eagerly destroy a VM thread whenever it exits an isolate. This extends the lifetime of a VM thread across entering/exiting multiple isolates. This is necessary in case an embedder callback executes during compilation and switches/spawns isolates. For embedder threads, since there is no API to signal "I'm done using the VM in this thread", this means we leak the (small) Thread structure. For our own ThreadPool threads, we explicitly clean up. BUG=23153 R=iposva@google.com Committed: https://code.google.com/p/dart/source/detail?r=45810

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -85 lines) Patch
M runtime/vm/gc_sweeper.cc View 1 2 3 chunks +3 lines, -4 lines 0 comments Download
M runtime/vm/isolate.h View 1 2 2 chunks +0 lines, -3 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 2 chunks +0 lines, -70 lines 0 comments Download
M runtime/vm/thread.h View 1 2 2 chunks +14 lines, -2 lines 0 comments Download
M runtime/vm/thread.cc View 1 2 3 chunks +21 lines, -6 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
koda
5 years, 7 months ago (2015-05-13 00:03:53 UTC) #1
Ivan Posva
Please avoid the repeated creation/deletion of the Thread object. Can be done in a different ...
5 years, 7 months ago (2015-05-15 00:33:43 UTC) #2
koda
Committed patchset #3 (id:40001) manually as r45810 (presubmit successful).
5 years, 7 months ago (2015-05-15 12:48:58 UTC) #3
koda
5 years, 7 months ago (2015-05-15 12:50:08 UTC) #4
Message was sent while issue was closed.
Will follow up with CL with thread destructors.

https://codereview.chromium.org/1136143003/diff/20001/runtime/vm/gc_sweeper.cc
File runtime/vm/gc_sweeper.cc (right):

https://codereview.chromium.org/1136143003/diff/20001/runtime/vm/gc_sweeper.c...
runtime/vm/gc_sweeper.cc:147: Thread::CleanUp();
On 2015/05/15 00:33:43, Ivan Posva wrote:
> Why do we need to cleanup here? The pool thread should release the thread
> structure when it is done.

Done.

Powered by Google App Engine
This is Rietveld 408576698