History log of /dalvik/vm/alloc/Heap.cpp
Revision Date Author Comments
ebaf918e1bacff53c3dc3f0861c5cee851db23e5 10-Jul-2013 Mathieu Chartier <mathieuc@google.com> Add low memory mode option.

Added a low memory mode option which can be enabled by passing the
flag "-XX:LowMemoryMode" to the VM.

Changed dvmHeapSourceAlloc to use mspace_malloc and madvise page
aligned regions of allocations back to the kernel if low
memory mode is enabled. No measurable performance penalty on a
benchmark which does 4 million object allocations. This seems to
reduce the Dalvik total PSS by 10 - 15% on devices with
large bitmaps (such as manta or flo).

Another change is that cards are madvised instead of memset when
cleared if low memory mode is enabled. This saves a minor amount
of memory at the cost of having slightly more page faults.

Change-Id: I0c850bc370ebabf4393bff1c47d3257b2f1518d2
826faa08b13bd0f10d473f789f801edd425fde17 08-May-2013 Jamie Gennis <jgennis@google.com> Add systrace tracing for GC and thread suspension.

Bug: 8856374
Change-Id: I58420a14fb52eab6295381a4d8f2d59eacfe0473
808a7c0e7e39b7ca3c7db1366e6e4089166052bb 29-Aug-2012 Ian Rogers <irogers@google.com> Revert "Revert "Upgrade to dlmalloc 2.8.5.""

This reverts commit 729eebbb4e4ec5b826b7230b4c02267da341b70b.
33c8ae5bb1bb8052680108d999c608df8c72a613 22-Aug-2012 Mathieu Chartier <mathieuc@google.com> Fix for 6994917 GC is slower since JOO33B per FrameworkPerf test

Fixes the GC aspect of the regression in FrameworkTest for Gc.
Large bitmap test seems to be unaffected.

Changes are:
We now have minimum sleep of 1ms instead of 10ms in dvmSuspendAll.
Some heuristics to avoid doing extra GCs if an allocation waited for a concurrent Gc.

Change-Id: I3797c7dc813e26bd1f7bb0a9dbe55eb70dd1c9c9
497b25e87a51b4afd206ba7734971614d00301fb 22-Aug-2012 Brian Carlstrom <bdc@google.com> Revert "Upgrade to dlmalloc 2.8.5."

This reverts commit bba37bd191843ef29ef9c7a8839e98b73debfffa.
729eebbb4e4ec5b826b7230b4c02267da341b70b 22-Aug-2012 Brian Carlstrom <bdc@google.com> Revert "Upgrade to dlmalloc 2.8.5."

This reverts commit bba37bd191843ef29ef9c7a8839e98b73debfffa.
bba37bd191843ef29ef9c7a8839e98b73debfffa 18-Aug-2012 Ian Rogers <irogers@google.com> Upgrade to dlmalloc 2.8.5.

Switch to using dlmalloc 2.8.5. Define mspace functionality directly
using dlmalloc rather than taking from libcutils.
Remove growth limit check in tryMalloc that only checks initial growth
limit.
Implement trimming at the end of the mspace.

Depends upon: https://android-review.googlesource.com/41717

Change-Id: Ia2c6b50bdb0b0d5aae4b18deefbd1bf50dfa49d5
daec4f6ae56e2149cecea8cd052b232bcf03f568 16-Jul-2012 Elliott Hughes <enh@google.com> Don't log "WAIT_FOR_CONCURRENT_GC blocked 0ms".

Stupid to spend more time logging than we spent waiting. (Highly visible
in the zygote's preloading phase.)

Change-Id: If2d6b6093b3bebae0887aa385745b7ed9225216b
89cf125cd95a7df3a713cb3d3d39a033304e474c 31-May-2012 Jeff Brown <jeffbrown@google.com> Report GC pause times more accurately.

Include the time that it actually took to pause or suspend
threads in the reported time.

Also report the amount of time that other threads spend blocked
waiting for a concurrent GC to complete.

Change-Id: I80af351c2dc3171fc7db48dbbb361f3d92bbca80
e8e1ddccd616e8226b7cc1e4e9fdb327429249e8 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: Ia5d301248024df26c2a29dabdfe738e39ec87c82
062bf509a77fce9dfcb7e7b2e401cf2a124d83d5 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: Ic663376d1ad6a6cb14bf81405ad9afd247cf2f60
955c3a08362d6e3d2e6e80c493f19c915bc7ece2 08-Nov-2011 Andy McFadden <fadden@android.com> Fix reporting of initial pause time

The "rootEnd" time was being captured before dvmClearCardTable()
was called.

Bug 5567332

Change-Id: I5499f1648c3e41296c18fa5d95d834c2d2853e8f
af6cf54652d1b27885b99e216bee29b955052630 04-Nov-2011 Andy McFadden <fadden@android.com> Reduce Dalvik card table overhead

The VM has a "growth limit" (e.g. 48MB) that is used to cap normal
apps, and a "max heap" (e.g. 128MB) that is used for apps with unusual
high-memory requirements. The Dalvik GC uses a 128:1 "card table"
that spans the entire managed heap, out to the "max heap" limit.

The table is erased during every concurrent GC. The first time
we do that post-zygote, the copy-on-write behavior causes physical
pages to be allocated. We're currently clearing out to the heap max,
not the growth limit, which means we have a bunch of physical memory
allocated for pages that will never be used.

This changes it so we only clear out to the growth limit. If the
growth limit is removed by the app, we clear out to the heap max.
On devices with a 128MB max heap, this reduces the private/dirty
usage for most apps by 640KB.

Bug 5567332

Change-Id: Iac633017c128d63b284d48016e47d40cc46df1de
b2714082bad44fde247920b9280c1b40c4979c3a 10-Oct-2011 Ben Cheng <bccheng@android.com> Revert "Use the card table to scan the immune region of the heap."

This reverts commit 6c355e53332502314c3d82a7afcf898d66118f27.

Conflicts are resolved in:

vm/alloc/CardTable.cpp
vm/alloc/HeapBitmap.cpp
vm/alloc/HeapInternal.h
vm/alloc/HeapSource.cpp
vm/alloc/MarkSweep.cpp

Tested with overnight monkey runs + Delaunay.

Bug: 5037417
Change-Id: I400eff8542d0bddd865ce570a479f7750c1ba484
7aa9563279627b2ff5413bc895381fc170df9f12 07-Jul-2011 Doug Kwan <dougkwan@google.com> Remove dead code/unused variables to avoid gcc-4.6 warnings.

Change-Id: I291fd42e91085c51772f560d424334874bef8add
e6c0ef210ee6c62cf4c63d50c04f451d5fa505f5 15-Jun-2011 Elliott Hughes <enh@google.com> Break a dependency on frameworks/base when building a host VM.

These aren't necessarily good abstractions, but they're no worse than what
we had, and having them factored out is a step in the right direction.

Change-Id: I5b839608317d2ca1ca54d8a38624fb686f2c37de
6f3c21fb026d9489e5046416bcd5a84fa8e4615b 26-May-2011 Dan Bornstein <danfuzz@android.com> More LOG newline cleanup.

This changes all the places I could find where the log string was on the
line after its LOG call.

Change-Id: Iac6a9fcc64f46631fb093824ab60237dce1a5241
60fc806b679a3655c228b4093058c59941a49cfe 26-May-2011 Dan Bornstein <danfuzz@android.com> Further conservation of newlines.

Friends don't let friends end LOG() strings with newlines.

Change-Id: I5a18c766c90c4ab5f03caa6acd601d34d91beb00
1e1433e78f560a01744e870c19c162ab88df9dc1 21-Apr-2011 Carl Shapiro <cshapiro@google.com> Remove unneeded void argument list declarations.

Change-Id: Ica749f6defa890363ec531b29e25bc415dc2cbb9
2384bdf512d0609c747af03256654fde03093844 19-Apr-2011 Carl Shapiro <cshapiro@google.com> Improve the impossible allocation log message.

Change-Id: Icf4c9b22c0f11159efb7cb43ab1158cc4f10c82f
ae188c676c681e47a93ade7fdf0144099b470e03 08-Apr-2011 Carl Shapiro <cshapiro@google.com> Compile the garbage collector and heap profiler as C++.

Change-Id: I25d8fa821987a3dd6d7109d07fd42dbf2fe0e589