VM "cherry-picks" to fix memory leaks in 1.12:

Cherry-picks and associated conflict resolution for:
664742f0162a13e0d60c65de0a713df8acd7d8e9
d0b03eebbd63261e7beb8413aa9ce9dfa2a862cc
3aa62d03fcbffc2f2a77f05d2c8e975b75a56d76
74e02785b0e534e469668ce2cabced7d26ec55b1
028c9952959be3b1f275c3cfbe805ab80c49f07a

=====

Keep StoreBuffer::global_mutex_ and global_empty_ alive.

At Dart::CleanUp time, there may still be threads around that access their store buffer, so we need to keep these around until @zanderso lands the clean shutdown CL.

We should stop leaking them once we cleanly stop all threads at VM shutdown (see issue 23844).

BUG=https://github.com/dart-lang/sdk/issues/24169
R=iposva@google.com

Review URL: https://codereview.chromium.org//1305123003 .

Conflicts:
	runtime/vm/dart.cc

Fix reuse of free store buffer blocks from the global cache of free blocks.

Add StoreBuffer::ShutDown to delete global cache of free blocks on VM shutdown.

BUG=https://github.com/dart-lang/sdk/issues/24129
R=iposva@google.com

Review URL: https://codereview.chromium.org//1309603003 .

Conflicts:
	runtime/vm/dart.cc

- Prevent interrupting the NULL thread when the isolate is   exiting from within a thread.

BUG=

Review URL: https://codereview.chromium.org//1307833002 .

- Initialize fields used in the profiler interrupts.

BUG=
R=koda@google.com

Review URL: https://codereview.chromium.org//1304043003 .

Completely remove InterruptableThreadState

- InterruptableThreadState is gone.
- Moved InterruptableThreadState fields directly into Thread.
- Iterate over all threads in an isolate when profiling.
- Still only sample the mutator thread.

Fix ThreadRegistry leak

- When deleting a Thread, iterate over all isolates and remove it from the isolate's thread registry.

R=iposva@google.com

Review URL: https://codereview.chromium.org//1293253005 .

Conflicts:
	runtime/vm/isolate.h
	runtime/vm/thread.cc
	runtime/vm/thread.h
	runtime/vm/thread_interrupter.cc
	runtime/vm/thread_interrupter_android.cc
	runtime/vm/thread_interrupter_linux.cc
	runtime/vm/thread_interrupter_macos.cc

- Fix leak in TimelineEventRecorder.
- Fix leak in ThreadRegistry.

patch from issue 1305353003 at patchset 1 (http://crrev.com/1305353003#ps1)
19 files changed
tree: 92a89ac6ad4dcb8aba766fae01284c54b55d9816
  1. client/
  2. docs/
  3. pkg/
  4. runtime/
  5. samples/
  6. samples-dev/
  7. sdk/
  8. site/
  9. tests/
  10. third_party/
  11. tools/
  12. utils/
  13. .gitattributes
  14. .gitignore
  15. .mailmap
  16. AUTHORS
  17. CHANGELOG.md
  18. codereview.settings
  19. create_sdk.gyp
  20. dart.gyp
  21. DEPS
  22. LICENSE
  23. PATENTS
  24. PRESUBMIT.py
  25. README.dart-sdk
  26. README.md
  27. WATCHLISTS
README.md

Dart

Dart is an open-source, scalable programming language, with robust libraries and runtimes, for building web, server, and mobile apps.

Using Dart

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.

Contributing to Dart

The easiest way to contribute to Dart is to file issues.

You can also contribute patches, as described in Contributing.

License

See LICENSE.