diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-03-20 16:15:37 -0700 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2014-03-21 12:17:56 -0700 |
commit | c93c530efc175954160c3834c93961a1a946a35a (patch) | |
tree | 32a389e2b4cfc3296075aed23f353b8d3042c9a5 /runtime/gc/allocator/rosalloc.h | |
parent | faa93b3ab455492dad1a9d3fb630e3936d389c85 (diff) | |
download | android_art-c93c530efc175954160c3834c93961a1a946a35a.tar.gz android_art-c93c530efc175954160c3834c93961a1a946a35a.tar.bz2 android_art-c93c530efc175954160c3834c93961a1a946a35a.zip |
Revoke rosalloc thread-local buffers at the checkpoint.
In the mark sweep collector, rosalloc thread-local buffers were
revoked during the pause. Now, they are revoked at the thread
checkpoint, as opposed to during the pause, which appears to help
reduce the pause time.
In Ritz MemAllocTest, the average sticky pause time went down ~20%
(925 us -> 724 us).
Bug: 13394464
Bug: 9986565
Change-Id: I104992a11b46d59264c0b9aa2db82b1ccf2826bc
Diffstat (limited to 'runtime/gc/allocator/rosalloc.h')
-rw-r--r-- | runtime/gc/allocator/rosalloc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/gc/allocator/rosalloc.h b/runtime/gc/allocator/rosalloc.h index 738d917f6f..0b4b189712 100644 --- a/runtime/gc/allocator/rosalloc.h +++ b/runtime/gc/allocator/rosalloc.h @@ -549,6 +549,10 @@ class RosAlloc { void RevokeThreadLocalRuns(Thread* thread); // Releases the thread-local runs assigned to all the threads back to the common set of runs. void RevokeAllThreadLocalRuns() LOCKS_EXCLUDED(Locks::thread_list_lock_); + // Assert the thread local runs of a thread are revoked. + void AssertThreadLocalRunsAreRevoked(Thread* thread); + // Assert all the thread local runs are revoked. + void AssertAllThreadLocalRunsAreRevoked() LOCKS_EXCLUDED(Locks::thread_list_lock_); // Dumps the page map for debugging. std::string DumpPageMap() EXCLUSIVE_LOCKS_REQUIRED(lock_); |