summaryrefslogtreecommitdiffstats
path: root/runtime/gc/collector/semi_space.h
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-02-11 16:20:42 -0800
committerMathieu Chartier <mathieuc@google.com>2014-02-12 17:28:22 -0800
commitad35d904c0b835f7e005c471d2c6b18b84894595 (patch)
tree1a89dea5a31f514cd65015e609512de2c25e589f /runtime/gc/collector/semi_space.h
parent1f26fb175bf3a10b5e1eb495d22778b47400f323 (diff)
downloadart-ad35d904c0b835f7e005c471d2c6b18b84894595.zip
art-ad35d904c0b835f7e005c471d2c6b18b84894595.tar.gz
art-ad35d904c0b835f7e005c471d2c6b18b84894595.tar.bz2
Avoid unnecessarily dirtying pages in SemiSpace collector.
Added a special version of memcpy which has handling to avoid dirty pages for objects which are larger than one page. No non noise GC performance regression measured on ritzperf benchmark. Seems to save 4k to 148k memory per app on AOSP mako. Bug: 10802951 Change-Id: I5976c83643e06beebf5c86a65c584bf7c1ab1e2e
Diffstat (limited to 'runtime/gc/collector/semi_space.h')
-rw-r--r--runtime/gc/collector/semi_space.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/gc/collector/semi_space.h b/runtime/gc/collector/semi_space.h
index f58402f..89e2002 100644
--- a/runtime/gc/collector/semi_space.h
+++ b/runtime/gc/collector/semi_space.h
@@ -295,6 +295,9 @@ class SemiSpace : public GarbageCollector {
// whole_heap_collection_ once per interval.
int whole_heap_collection_interval_counter_;
+ // How many bytes we avoided dirtying.
+ size_t saved_bytes_;
+
// Used for the generational mode. The default interval of the whole
// heap collection. If N, the whole heap collection occurs every N
// collections.