History log of /dalvik/vm/alloc/HeapBitmap.h
Revision Date Author Comments
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
375fb116bcb817b37509ab579dbd55cdbb765cbf 15-Jun-2011 Carl Shapiro <cshapiro@google.com> Normalize the include guard style.

An leading underscore followed by a capital letter is a reserved
name space in C and C++.

This change also moves any #include directives within the include
guard in some of the compiler/codegen/arm header files.

Change-Id: I9715e2c5301699d31886e61d0fe6e29483555a2a
0d92a4072c00434e95a03642a4944acf81a81cc3 08-Jun-2011 Carl Shapiro <cshapiro@google.com> Favor Object* over void* for the heap bitmap interfaces.

Change-Id: I615dbff3e81a1128dc3ba43d6d426c370ae3abcf
50e5fd5984c9b0a6f0927ed5ddf13bde40e338c7 27-Apr-2011 Carl Shapiro <cshapiro@google.com> Use C++ linkage in GC headers and remove unneeded typedefs.

Some interfaces in Alloc.h had to be left with C linkage as they are
referenced by the interpreter assembler code. That dependency will be
addressed in a future commit.

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

Change-Id: I25d8fa821987a3dd6d7109d07fd42dbf2fe0e589
6c355e53332502314c3d82a7afcf898d66118f27 03-Mar-2011 Carl Shapiro <cshapiro@google.com> Use the card table to scan the immune region of the heap.

Using the card table results in a dramatic cost reduction in scanning
time. During a reboot, scanning each object in the zygote for
pointers to the application heap costs an average of 20ms of thread
time on a stingray with 8 megabyte zygote. In comparison, scanning
dirty cards in the zygote costs 300us on average.

Change-Id: I1dba35646d509e6b1b4535e291a1eb6f66d7b218
c38b7ed4392327cafa127086f4a5aef1bd0efdee 09-Feb-2011 Carl Shapiro <cshapiro@google.com> Relocate the always in-lined functions from HeapBitmap.h.

The three essential bitmap access methods have been moved to the new
HeapBitmapInlines.h header file. All other bitmap methods have been
moved into HeapBitmap.c. As an added bonus, source indexing and cross
reference tools should correctly locate all heap bitmap definitions.

Change-Id: I35703403f4f79d121c9c3f411b7d7110d92739d0
212607156602876fe3af6aebce8798628d4a8410 10-Dec-2010 Carl Shapiro <cshapiro@google.com> Kill dvmHeapSourceGetObjectBitmaps and aliasBitmaps.

In the beginning separate mark bitmaps and live bitmaps were kept for
each of the three heaps. Later, all heaps were allocated adjacent to
one another from a single contiguous tract of virtual memory. As
such, summary data structures such as the card table, mark bitmap, and
live bitmap, were similarly allocated from individual blocks of memory
instead of sparsely for each heap.

While the summary structures were changed, the sweeping routine was
left to assume separate bitmaps. In fact, the aliasBitmap hack was
added to continue the fiction of small bitmaps for each of the heaps.
It would have been preferable to change the sweeping routine, but that
routine was greatly entangled with generalities. Fortunately, those
entanglements have since been eliminated.

This change updates the sweeping routine to operate on memory address
ranges instead of whole bitmaps, obsoleting aliasBitmaps and its sole
caller. The bitmap sweep routine now receives a range of addresses
for sweeping. This range may span the entire bitmap or any contiguous
range within the span of the bitmap.

Change-Id: Iae206032738d6cad77e0625d27ae7b7d6551890d
879011d83ed0ac9b15bddd2dac5536addcc1b1ce 03-Dec-2010 Carl Shapiro <cshapiro@google.com> Get rid of the ugly macros inside the bitmap sweep routine.

Thanks to recent simplifications the implementation macrology can be
expanded out. While we are here, fix the comments about the treatment
of max. This edit should have happened in the previous change to the
sweeper.

Change-Id: Ia18ee580f5955dca8c27b96f7badbfb067a0a1cb
38d710b524f2d9888e89b4ea0209f0b57025dab4 01-Sep-2010 Carl Shapiro <cshapiro@google.com> Move the finger computation out of the bitmap scanning callback.

The finger computation depends on bitmap internals. This knowledge
should not be part of the bitmap interface, just its implementation.
This change adds a new walker that computes and passes a finger
argument to a callback. As part of this change, code to recompute the
end address during a walk has been removed from the ordinary bitmap
walker code. That check is needed by the scanning walk as its
callback may advance the max address when setting mark bits for
objects beyond the finger.
a634c852e985dcacf621c428c0597674bc5bfd77 30-Aug-2010 Carl Shapiro <cshapiro@google.com> Reduce the frequency of bitmap walk loop-bound computations.
57ee270b755271166b2349321e5b8b5457731dd7 27-Aug-2010 Carl Shapiro <cshapiro@google.com> Simplify the bitmap walker subroutines.

This change...

* Separates walking from sweeping. Walking had been implemented by a
sweeping with an empty mark bitmap argument.

* Localizes the finger machinations to scanBitmapCallback. There is
one use of the finger but all callbacks received the argument.

* Inlines a simplified bitmap walking routine operating a pointer at a
time. Only sweeping benefits from batching decoded addresses.
7511ae1ed686ccdf6cfefeabeede0cedb0c36b77 20-Aug-2010 Carl Shapiro <cshapiro@google.com> Combine a typedef with a struct declaration.
eff16fb843ec191508d2e8306b6dfd8209ede501 19-Aug-2010 Carl Shapiro <cshapiro@google.com> Use symbolic constants when computing bits-per-word.
05174731dc3277019faa898c580f14d81423ebbd 01-Sep-2010 Carl Shapiro <cshapiro@google.com> Move the finger computation out of the bitmap scanning callback.

The finger computation depends on bitmap internals. This knowledge
should not be part of the bitmap interface, just its implementation.
This change adds a new walker that computes and passes a finger
argument to a callback. As part of this change, code to recompute the
end address during a walk has been removed from the ordinary bitmap
walker code. That check is needed by the scanning walk as its
callback may advance the max address when setting mark bits for
objects beyond the finger.

Change-Id: Id6aa2e4fb3af383f125965d4fe27c5ab6b36c5b5
46c26139945c98b97336ca83058831ffc8791ae1 30-Aug-2010 Carl Shapiro <cshapiro@google.com> Reduce the frequency of bitmap walk loop-bound computations.

Change-Id: I899b5ffe06a71f5c0b5de671edd6e8386a2688da
fc22220244fca64f075925ce379d79b034f70c40 27-Aug-2010 Carl Shapiro <cshapiro@google.com> Simplify the bitmap walker subroutines.

This change...

* Separates walking from sweeping. Walking had been implemented by a
sweeping with an empty mark bitmap argument.

* Localizes the finger machinations to scanBitmapCallback. There is
one use of the finger but all callbacks received the argument.

* Inlines a simplified bitmap walking routine operating a pointer at a
time. Only sweeping benefits from batching decoded addresses.

Change-Id: I87485ac58d3ecf07916f142534fe96f77e7ff227
66bb3c001b376de701733a44c3df2df810653d54 20-Aug-2010 Carl Shapiro <cshapiro@google.com> Combine a typedef with a struct declaration.

Change-Id: I5bc2415bc6a5da542435c4e96c4eaf2d375e2503
49e748a74fe1cfa8ad6c3f246220c25c7e33703b 19-Aug-2010 Carl Shapiro <cshapiro@google.com> Use symbolic constants when computing bits-per-word.

Change-Id: Ia8e4f1681222f5f0982c4aa19a245c1fc87e6df4
1c206f66a31215f0b5ce3897d607ae82281b1765 21-Jul-2010 Barry Hayes <bhayes@google.com> Change dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk.

Concurrent sweeping will require the callback to process objects which
are live and not marked, while the client code continues to allocate
and set bits. Since dvmHeapBitmapXorWalk was only used to sweep, it
seemed easiest to make it learn its true purpose.
acdea993a168b26892f172015c7c8df696d25bad 21-Jul-2010 Barry Hayes <bhayes@google.com> Change dvmHeapBitmapXorWalk to dvmHeapBitmapSweepWalk.

Concurrent sweeping will require the callback to process objects which
are live and not marked, while the client code continues to allocate
and set bits. Since dvmHeapBitmapXorWalk was only used to sweep, it
seemed easiest to make it learn its true purpose.

Change-Id: I44edd15e5a7447d029a7ae60c6cd9b101cb1e9d9
006346e8f138b4e4b16c7a94b049c1646b009b52 30-Jul-2010 Carl Shapiro <cshapiro@google.com> Change the bitmap callback signature to have a void return value.

Previously, a bitmap callback could abort the bitmap traversal by
returning false. All of the bitmap callbacks used in the garbage
collector are hardwired to return true. This change eliminates the
early termination facility and its attendant complexity.

Change-Id: I5490dd74b56b9700ec1b7e657637fae5eb4cc339
aca6ec801765bfb49765bf4848ee4b97ab231572 13-Jul-2010 Carl Shapiro <cshapiro@google.com> Remove redundant "#ifndef NDEBUG" guarding asserts.

Change-Id: Iaa4687cbaaa1eac59cf0b80afb57b3ba708ece09
9cbece20cacb36193a14e9eb449d7ded091d264b 13-Jul-2010 Carl Shapiro <cshapiro@google.com> Use "long" instead of the more verbose but equivalent "long int".

Change-Id: I06f87c0f8314baeccac6e96e47ad749ff18a065c
6e5cf6021b2f3e00e18ab402f23ab93b27c6061b 22-Jun-2010 Barry Hayes <bhayes@google.com> Quicker partial collection by using card marking.

Add calls to the card marking from the write barrier routines, so that
a write to an Object marks the appropriate card. Add code in the GC to
use and rebuild the cards at a partial GC, clearing cards in the
Zygote heap which do not in fact contain references to the application
heap.

Change-Id: Ie6f29fd096e029f48085715b282b6db8a7122555
fbdcfb9ea9e2a78f295834424c3f24986ea45dac 29-May-2010 Brian Carlstrom <bdc@google.com> Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master

Change-Id: I0c0edb3ebf0d5e040d6bbbf60269fab0deb70ef9
e168ebd5a7cfc57936c16ff7d7f7063e967bdb9d 07-May-2010 Barry Hayes <bhayes@google.com> Remove the HeapBitmap List routines.

Change-Id: Ic518798ba8574534746ada9e8757948ae2e1bab9
d25566d9278e6424e521f4b7148ac31480e60c5c 12-Mar-2010 Carl Shapiro <cshapiro@google.com> Add the ability to treat the zygote heap as a root collect just the
forked application heap.

Change-Id: I8807897ae426f8274018d950fec44a2182a90525
8ecee7b81c70a8f61d984b6fb2e37fa3ecbd79f9 12-Mar-2010 Carl Shapiro <cshapiro@google.com> Eliminate unused heap bitmap functions. This is mostly the "list"
code which is no longer needed.

Change-Id: I3636a4a6a36e55d2ad080571cdb6c23a16f98aaf
8d72480298d3bab7ca6087482ca62af66974a2a1 15-Feb-2010 Carl Shapiro <cshapiro@google.com> Densely allocate mspaces. New heaps are started on the page following
the break of the previously allocated heap. In addition, we shrink
the reported size of the previous object bitmap so it covers only the
committed range of the heap. We now separately track the size of the
bitmap virtual memory reservation so we may unmap it all at shutdown
time.
8eab1c515ef7f6bdb0252d49e6ea1c8ca7d8cfed 12-Feb-2010 Carl Shapiro <cshapiro@google.com> Do not include assert.h in places where it may shadow the definition
provided by Common.h if WITH_DALVIK_ASSERTS is defined. The include
from HeapBitmap.h was notable as it redefined the Dalvik friendly
assert macro with the useless libc macro across all of the GC sources.
f6c387128427e121477c1b32ad35cdcaa5101ba3 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
f72d5de56a522ac3be03873bdde26f23a5eeeb3c 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
89c1feb0a69a7707b271086e749975b3f7acacf7 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
2ad60cfc28e14ee8f0bb038720836a4696c478ad 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution