Commit Graph

15 Commits

Author SHA1 Message Date
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 f4f0831c69 [vm] Fix TSAN failures related to object headers and GC task phases.
Change-Id: I15078e845712e8e712e2cb0a044fc7550127ea36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120629
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-10-09 21:48:20 +00:00
Ryan Macnak 83a4d98554 [vm] Weaken CAS to RMW when accessing the remembered and mark bits.
Tighten some sequences in the write barrier stub.

Change-Id: Ib3657b9b582082137d17e86135200444172f428a
Reviewed-on: https://dart-review.googlesource.com/60820
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2018-06-20 21:53:12 +00:00
Ryan Macnak d9c3190e44 [vm] Remove some bin -> vm includes.
Change-Id: Id304de9618a299a201b946a901a54352772f56fb
Reviewed-on: https://dart-review.googlesource.com/48704
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-03-28 23:16:09 +00:00
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Ben Konyi f2fd150ea0 Added new type of unit test, RAW_UNIT_TEST_CASE, which is used for tests that can be flaky if run while the VM is alive. Tests created using the RAW_UNIT_TEST_CASE macro will run after the VM has shutdown to avoid having any worker threads contaminating the test results.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2666133002 .
2017-01-31 15:16:38 -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
John McCutchan d113638891 Make NoReloadScope thread safe
Fixes #27366

BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2344193002 .
2016-09-16 11:18:36 -07:00
Siva Annamalai bf5d8f6efc Change signature of atomic increment/decrement functions to return void.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1658983004 .
2016-02-03 09:15:35 -08:00
Siva Annamalai 7e05c6c1f0 Use atomic operations to increment/decrement memory usage counts as multiple threads could be allocating at the same time.
Review URL: https://codereview.chromium.org/1580813003 .
2016-01-29 12:46:22 -08:00
Siva Annamalai e31db435f2 Fix build break for the simulator versions.
Review URL: https://codereview.chromium.org/1561423002 .
2016-01-06 21:56:30 -08:00
Siva Annamalai a7ebeb00fb Add a CompareAndSwapUint32 variant to AtomicOperations so that it is possible to a CAS of a 32 bit value.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1562253002 .
2016-01-06 17:08:31 -08:00
Daniel Andersson e7fb1c8516 Compatible atomics: volatile for LoadRelaxed, replace FetchAndAdd with FetchAndDecrement.
Using volatile on a word size location will generate a single move instruction without order guarantees and is supported on all compilers.

Replace FetchAndAdd with FetchAndDecrement, since the latter is sufficient and eaiser to implement portably (in particular on some Windows setups).

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

Review URL: https://codereview.chromium.org//1287853005 .
2015-08-13 09:21:38 -07:00
Daniel Andersson 6d65b386d1 Fix all builds by explicitly casting integers in comparison.
Fix Mac build further by using more compatible intrinsic name.

BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1283963003 .
2015-08-11 13:23:00 -07:00
Daniel Andersson 086329fd9c Safe and efficient stack-limit based interrupt checking in C++.
Remove potentially dangerous (but currently unused) Isolate::stack_limit() accessor.
Add method to test whether interrupts are scheduled, using relaxed memory ordering.
Document and test correct usage by adding a new unit test.

This will be used to periodically check for safepoints in C++ (which will then be equivalent to our generated code).

BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org//1277473004 .
2015-08-11 12:37:57 -07:00