summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/gen_common.cc
diff options
context:
space:
mode:
author Hiroshi Yamauchi <yamauchi@google.com> 2013-08-13 15:03:22 -0700
committer Hiroshi Yamauchi <yamauchi@google.com> 2013-08-13 15:50:27 -0700
commitb22a451675c29ac3fc82a8761d2a385a170d6d7f (patch)
tree407e13a32ab732f4092636cfb73d41eefae66932 /compiler/dex/quick/gen_common.cc
parent7b67bee4f6ca4e634f35f63d1e08e1b05f138e01 (diff)
Avoid a long alloc space lock contention during sticky GC sweep.
The lock contention logging systrace support (b/9986464) indicates that under the Ritz allocation benchmark the alloc space lock contends rather long (up to ~10 ms on Nexus 4) in a single lump during each sticky GC sweep. This is because all the dead objects in the allocation stack are freed in one FreeList() call. While the lock contention isn't a GC pause and may only be an issue with a high-allocation application like Ritz, it'd stall any application threads that attempt to allocate during the contention and would be bad for jank. I think it's better to free the objects incrementally in chunks and interleave the GC thread and application threads. This change does not speed up or slow down the Ritz allocation benchmark noticeably. Bug: 9986464 Change-Id: I24ea805456c0009752991f7d3eb031f6f57145fc
Diffstat (limited to 'compiler/dex/quick/gen_common.cc')
0 files changed, 0 insertions, 0 deletions