summaryrefslogtreecommitdiffstats
path: root/runtime/instrumentation.cc
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-05-20 16:40:37 -0700
committerIan Rogers <irogers@google.com>2014-05-20 21:17:03 -0700
commit3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e (patch)
tree52a737323ebd505cf37ca0e4b2dcee6524fba07f /runtime/instrumentation.cc
parent27a2b70f612af9afc0fb5392fb10059f6a0a3569 (diff)
downloadart-3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e.tar.gz
art-3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e.tar.bz2
art-3e5cf305db800b2989ad57b7cde8fb3cc9fa1b9e.zip
Begin migration of art::Atomic to std::atomic.
Change-Id: I4858d9cbed95e5ca560956b9dabd976cebe68333
Diffstat (limited to 'runtime/instrumentation.cc')
-rw-r--r--runtime/instrumentation.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/instrumentation.cc b/runtime/instrumentation.cc
index 075d225bf4..2dbcc8058d 100644
--- a/runtime/instrumentation.cc
+++ b/runtime/instrumentation.cc
@@ -522,9 +522,9 @@ void Instrumentation::SetEntrypointsInstrumented(bool instrumented) {
void Instrumentation::InstrumentQuickAllocEntryPoints() {
// TODO: the read of quick_alloc_entry_points_instrumentation_counter_ is racey and this code
// should be guarded by a lock.
- DCHECK_GE(quick_alloc_entry_points_instrumentation_counter_.Load(), 0);
+ DCHECK_GE(quick_alloc_entry_points_instrumentation_counter_.LoadSequentiallyConsistent(), 0);
const bool enable_instrumentation =
- quick_alloc_entry_points_instrumentation_counter_.FetchAndAdd(1) == 0;
+ quick_alloc_entry_points_instrumentation_counter_.FetchAndAddSequentiallyConsistent(1) == 0;
if (enable_instrumentation) {
SetEntrypointsInstrumented(true);
}
@@ -533,9 +533,9 @@ void Instrumentation::InstrumentQuickAllocEntryPoints() {
void Instrumentation::UninstrumentQuickAllocEntryPoints() {
// TODO: the read of quick_alloc_entry_points_instrumentation_counter_ is racey and this code
// should be guarded by a lock.
- DCHECK_GT(quick_alloc_entry_points_instrumentation_counter_.Load(), 0);
+ DCHECK_GT(quick_alloc_entry_points_instrumentation_counter_.LoadSequentiallyConsistent(), 0);
const bool disable_instrumentation =
- quick_alloc_entry_points_instrumentation_counter_.FetchAndSub(1) == 1;
+ quick_alloc_entry_points_instrumentation_counter_.FetchAndSubSequentiallyConsistent(1) == 1;
if (disable_instrumentation) {
SetEntrypointsInstrumented(false);
}