commit | 7547d58b9c635cf501645580254fe41558bdc98a | [log] [tgz] |
---|---|---|
author | Vyacheslav Egorov <vegorov@google.com> | Thu Jun 09 18:50:23 2016 +0200 |
committer | William Hesse <whesse@google.com> | Fri Jun 10 12:48:10 2016 +0200 |
tree | e0d124025c39aa75a6b646c1bda0328552345ef2 | |
parent | 2ca335448421d385d711d595f2fa0da3782f72ae [diff] |
VM: Fix WeakProperty processing during parallel marking. Previously if one marker marked the weak property and another marker marked its key then the first marker might stop marking before it sees that the key was marked. Here is a possible concurrent execution, assuming P is a WeakProperty and K is P.key: (Marker A) (Marker B) | | [ mark property P ] | | | [ drain marking stack ] | [ no more work to do ] | | [ mark K ] | [ draing marking stack ] | [ no more work to do ] | | | | ... ... | | [Finalize] [Finalize] | [Clear P] In this execution we end up clearing P even though P.key is marked. To fix this issue without reintroducing central WeakProperty processing we change the marking phase loop in such a way that markers consider the marking done only if all of them agree that they have no more weak properties with marked keys. Essentially the marking loop now has a separate phase where all markers check their pending weak properties. The decision to proceed to the next marking phase (weak handles processing) is done in lock step using barrier - either all threads advance to the next stage or one of the threads finds a weak property with marked key and unmarked value and all threads resume marking. BUG= R=asiva@google.com Review URL: https://codereview.chromium.org/2041413005 .
Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.
Visit the dartlang.org to learn more about the language, tools, getting started, and more.
Browse pub.dartlang.org for more packages and libraries contributed by the community and the Dart team.
Learn how to get the source and prepare your machine to build the SDK.
There are more documents on our wiki.
The easiest way to contribute to Dart is to file issues.
You can also contribute patches, as described in Contributing.
See LICENSE.