Ryan Macnak
6c933a4488
[vm] Fix some TSAN failures. Migrate remaining uses of AtomicOperations to std::atomic.
...
Change-Id: I195232311a146248c601ef84640758db59083d12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121200
Reviewed-by: Siva Annamalai <asiva@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2019-10-21 16:26:39 +00:00
Ryan Macnak
8da46d35f5
[vm] Move heap-related code to its own subdirectory (cf. compiler).
...
Remove some dead includes.
Change-Id: I31f3e739e5ee46dcbba5d6a2f091491b46402943
Reviewed-on: https://dart-review.googlesource.com/60146
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Ryan Macnak <rmacnak@google.com >
2018-06-20 00:39:49 +00:00
Ryan Macnak
9ce48e63b2
Remove background finalization.
...
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2809863002 .
2017-04-11 09:54:25 -07:00
Ben Konyi
1e0bf05aaf
Added tracking of memory usage within ApiNativeScopes. Usage to be displayed within Observatory.
...
BUG=
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2650583014 .
2017-01-26 15:24:03 -08:00
Zachary Anderson
a1bcf051d8
clang-format runtime/vm
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Florian Schneider
9f00ce2b6e
VM: Fix for deadlock with background tasks.
...
We have to do NotifyAll whenever a task finishes.
Also, remove thread notifications when a task is created, since we only ever wait for tasks to finish.
BUG=#27365
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2349853002 .
2016-09-16 15:03:36 -07:00
Ryan Macnak
e46b3cd994
Treat background finalization as another GC task so it won't run in parallel with the marker.
...
Prevents a race between the marker and finalizer when the handle is freed (fixes #27029 ).
Disallow creating weak handles for immediate objects. We don't distinguish these from free handles, so their callbacks are never run.
Don't report freed handles over the vm service.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2281193002 .
2016-08-29 16:47:56 -07:00
Ryan Macnak
c340d0f24b
Add flag to control background finalization.
...
It seems destructing some blink strings, TypedViewPeer, etc is not thread-safe.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/2091023002 .
2016-06-23 11:09:40 -07:00
Ryan Macnak
a871dbc57c
Don't bypass safepoint check when background finalizer task enters the isolate.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org/2089393002 .
2016-06-22 18:22:33 -07:00
Ryan Macnak
103e316f6a
Reapply "Background finalization."
...
- Fix double-finalization by marking handles that are in a finalization queue.
- Remember external size in words instead of bytes.
- Add SlowFinalizer test.
R=asiva@google.com
Review URL: https://codereview.chromium.org/2084193003 .
2016-06-22 16:26:49 -07:00
Ryan Macnak
ae94be3f4d
Revert "Background finalization."
...
This reverts commit d265a3db53 .
Review URL: https://codereview.chromium.org/2088923002 .
2016-06-21 13:15:12 -07:00
Ryan Macnak
d265a3db53
Reapply "Background finalization."
...
This reverts commit 7d9e75e0b6 .
R=asiva@google.com
Review URL: https://codereview.chromium.org/2080353002 .
2016-06-21 09:27:23 -07:00
Ryan Macnak
7d9e75e0b6
Revert "Background finalization."
...
This reverts commit 082829a00b .
Review URL: https://codereview.chromium.org/2041373004 .
2016-06-07 17:21:06 -07:00
Ryan Macnak
082829a00b
Background finalization.
...
Flutter gallery app on Nexus 4:
max weak handle processing (main thread): 17.7ms -> 1.1ms
max scavenge (main thread): 21.0ms -> 17.1ms
BUG=flutter/flutter#3804
R=asiva@google.com
Review URL: https://codereview.chromium.org/2012973002 .
2016-06-07 14:38:37 -07:00
cshapiro@google.com
917bbbfc39
Provide API support for weak handles and post-mortem finalization.
...
In addition, this change separates the storage of weak persistent
handles from ordinary persistent handles. An ordinary persistent
handle now stores no other data than the raw pointer value.
Review URL: http://codereview.chromium.org//9148051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3273 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-13 01:23:42 +00:00
cshapiro@google.com
32f55ce37b
Implement weak persistent handles in the Dart API.
...
Review URL: http://codereview.chromium.org//8984006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2607 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-20 01:44:53 +00:00
turnidge@google.com
9a118fbb49
Add Dart_Null, Dart_True, and Dart_False.
...
Fix Dart_NewPersistentHandle so it won't break if passed one of these
persistent handles.
Reviewer: Should I document that these new functions return a
persistent handle?
Review URL: http://codereview.chromium.org//8446009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1230 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-05 00:09:36 +00:00