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
|
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
|
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
|
df9f08b877ecfd8ebadea822bb9e066ee7d30433 |
|
19-Jan-2011 |
Carl Shapiro <cshapiro@google.com> |
Implement growth limits to support multiple heap configurations. When a growth limit is in effect, allocations will be limited to number of bytes specified by the growth limit instead of the maximum heap size. Growth limits are specified on the command line with the new parameter -XX:HeapGrowthLimit. A growth limit can be removed at runtime by calling the new clearGrowthLimit method. This is a work around until we can adjust the maximum heap size at runtime. Change-Id: Ic01e32823b5ca8cf29c0948fb6cd2df10967c1fb
|
f44af1c40f4a81aed17765671b100edeeec28dab |
|
19-Oct-2010 |
Carl Shapiro <cshapiro@google.com> |
Fix a typo in the return type of dvmIsValidCard. Change-Id: I518751b338e373d63a975c55320200348fa94b91
|
7a136d89e7a335f46fd85e4f28d1c5d8cb3bc9c7 |
|
19-Oct-2010 |
Carl Shapiro <cshapiro@google.com> |
Export dvmIsValid card. Change-Id: If92998de87db61cad75c7affa1500aed582f9687
|
5ba39376c5b7a5878f234a689a51c74783583b4b |
|
07-Aug-2010 |
Carl Shapiro <cshapiro@google.com> |
Implement card table verification. Card table verification occurs just before scanning the card table during a concurrent GC. Each object in the bitmap is visited and the number of white (unmarked) references are counted. If an object has unmarked objects it is by definition gray and must reside on a dirty card. If the object is not on a dirty card, the verification routine aborts the VM. Because the processing of weak roots and references has yet to occur, reachable reference objects with unmarked referents and weak interned strings may still be gray. These objects are checked during the card table scan and ignored if their card is not dirty. Change-Id: I64d145aa4719fb52eb9e3bb91efaf4dcfacd6e0c
|
332c5948be920783afaa88a39e03244db3de604a |
|
06-Aug-2010 |
Carl Shapiro <cshapiro@google.com> |
Remove stale comments. Change-Id: I7b7d822784ebf3b18ee8af6bd6acee220c285508
|
106c5fd9745a47d663e28217f3dd5ac48f606f81 |
|
28-Jul-2010 |
Carl Shapiro <cshapiro@google.com> |
Use the card marks to find gray objects during a concurrent collection. Presently, the garbage collector scans the mark bits looking for gray objects. As of this change, only objects spanning dirty cards will be reexamined during re-marking. As part of this change, re-marking of roots will push objects onto the mark stack instead of setting their mark bits. The number of gray roots discovered during re-marking is small. If this changes we can dirty the cards instead and let re-scanning push the gray objects. Change-Id: If270812821e070d09af344edb63dfede26d10410
|
9d2902a18fbd12481cdba764566d92b445593728 |
|
14-Jul-2010 |
Barry Hayes <bhayes@google.com> |
Make dvmVerifyCardTable more resiliant, and move invocation to start and end of GC. Also removes the dependence on HeapBitmap from the .h file. Change-Id: I2132d0dedfb8fbd07012563d116e808d444038ab
|
b874ab98306a109c4988bb1cde687a24f4f8201f |
|
14-Jul-2010 |
Barry Hayes <bhayes@google.com> |
Make dvmCardTableStartup be more independant of HeapSource startup. Also added a call to dvmCardTableShutdown. Also removed the dependency on GcHeap from CardTable.h. Change-Id: Icf0293572371cc8a30b55672816fdd75a151e82c
|
8f921a79b7e4f93905d8bb5c1b844d0acc5a8a2d |
|
09-Jul-2010 |
Barry Hayes <bhayes@google.com> |
Some formatting and commenting clean-up. Change-Id: Icc166d98fe9c0fb03a51f9fbfa2e5765b75af8f5
|
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
|