summaryrefslogtreecommitdiffstats
path: root/runtime/gc/collector/garbage_collector.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-03-31 16:36:35 -0700
committerMathieu Chartier <mathieuc@google.com>2014-04-07 13:44:36 -0700
commit440e4ceb310349ee8eb569495bc04d3d7fbe71cb (patch)
treedb278d463f0c2440e9c8e8cb80e53d2b2effe196 /runtime/gc/collector/garbage_collector.cc
parent4d3dc8a04da8a80251b381cdb482190363171dc1 (diff)
downloadart-440e4ceb310349ee8eb569495bc04d3d7fbe71cb.zip
art-440e4ceb310349ee8eb569495bc04d3d7fbe71cb.tar.gz
art-440e4ceb310349ee8eb569495bc04d3d7fbe71cb.tar.bz2
Add monitor deflation.
We now deflate the monitors when we perform a heap trim. This causes a pause but it shouldn't matter since we should be in a state where we don't care about pauses. Memory savings are hard to measure. Fixed integer overflow bug in GetEstimatedLastIterationThroughput. Bug: 13733906 Change-Id: I4e0e68add02e7f43370b3a5ea763d6fe8a5b212c
Diffstat (limited to 'runtime/gc/collector/garbage_collector.cc')
-rw-r--r--runtime/gc/collector/garbage_collector.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/gc/collector/garbage_collector.cc b/runtime/gc/collector/garbage_collector.cc
index 07951e0..82340f5 100644
--- a/runtime/gc/collector/garbage_collector.cc
+++ b/runtime/gc/collector/garbage_collector.cc
@@ -201,7 +201,7 @@ uint64_t GarbageCollector::GetEstimatedMeanThroughput() const {
uint64_t GarbageCollector::GetEstimatedLastIterationThroughput() const {
// Add 1ms to prevent possible division by 0.
- return (freed_bytes_ * 1000) / (NsToMs(GetDurationNs()) + 1);
+ return (static_cast<uint64_t>(freed_bytes_) * 1000) / (NsToMs(GetDurationNs()) + 1);
}
} // namespace collector