Save profile information in a separate thread.
Previously we would save the profiling information only when the app
was sent to background. This missed on an important number of updates
on the jit code cache and it didn't work for background processes.
Bug: 26080105
Change-Id: I84075629870e69b3ed372f00f4806af1e9391e0f
diff --git a/runtime/atomic.h b/runtime/atomic.h
index 87de506..0faa3c6 100644
--- a/runtime/atomic.h
+++ b/runtime/atomic.h
@@ -199,6 +199,11 @@
return this->load(std::memory_order_relaxed);
}
+ // Load from memory with acquire ordering.
+ T LoadAcquire() const {
+ return this->load(std::memory_order_acquire);
+ }
+
// Word tearing allowed, but may race.
// TODO: Optimize?
// There has been some discussion of eventually disallowing word