90443477f9a0061581c420775ce3b7eeae7468bc |
|
17-Jul-2015 |
Mathieu Chartier <mathieuc@google.com> |
Move to newer clang annotations Also enable -Wthread-safety-negative. Changes: Switch to capabilities and negative capabilities. Future work: Use capabilities to implement uninterruptible annotations to work with AssertNoThreadSuspension. Bug: 20072211 Change-Id: I42fcbe0300d98a831c89d1eff3ecd5a7e99ebf33
|
1e13374baf7dfaf442ffbf9809c37c131d681eaf |
|
20-May-2015 |
Evgenii Stepanov <eugenis@google.com> |
Generalize Valgrind annotations in ART to support ASan. Also add redzones around non-fixed mem_map(s). Also extend -Wframe-larger-than limit to enable arm64 ASan build. Change-Id: Ie572481a25fead59fc8978d2c317a33ac418516c
|
3cf225386e8129dcbe32b289279ecb87ec255318 |
|
10-Jul-2015 |
Mathieu Chartier <mathieuc@google.com> |
Clean up some includes Change-Id: Ia03a3b54b235df38d5cfe096fef1aebe2b80eb29
|
2cebb24bfc3247d3e9be138a3350106737455918 |
|
22-Apr-2015 |
Mathieu Chartier <mathieuc@google.com> |
Replace NULL with nullptr Also fixed some lines that were too long, and a few other minor details. Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
|
4460a84be92b5a94ecfb5c650aef4945ab849c93 |
|
09-Mar-2015 |
Hiroshi Yamauchi <yamauchi@google.com> |
Rosalloc thread local allocation path without a cas. Speedup on N4: MemAllocTest 3044 -> 2396 (~21% reduction) BinaryTrees 4101 -> 2929 (~26% reduction) Bug: 9986565 Change-Id: Ia1d1a37b9e001f903c3c056e8ec68fc8c623a78b
|
68d1bfc0bb5a7be79354f6551dae6cd600c20e76 |
|
08-Jan-2015 |
Mathieu Chartier <mathieuc@google.com> |
Add clamp growth limit Clamp growth limit shrinks the space memmaps to the current growth limit. This reduces virtual memory usage for apps with small heaps. Bug: 18387825 Bug: 17131630 (cherry picked from commit 379d09fe3c3feb7c2a2fb5a3623689b5ace7e79b) Change-Id: I4f8e507fde1c8e10373615254aa0f1bf1b48a7ea
|
379d09fe3c3feb7c2a2fb5a3623689b5ace7e79b |
|
08-Jan-2015 |
Mathieu Chartier <mathieuc@google.com> |
Add clamp growth limit Clamp growth limit shrinks the space memmaps to the current growth limit. This reduces virtual memory usage for apps with small heaps. Bug: 18387825 Bug: 17131630 Change-Id: I4a8fdc335d2c40492e991708adabcc46299efb7d
|
d7576328811e5103e99d31f834a857522cc1463f |
|
25-Oct-2014 |
Andreas Gampe <agampe@google.com> |
ART: Fix valgrind Allow ValgrindMallocSpace wrapper for RosAlloc.Requires refactoring, as ValgrindMallocSpace was bound to the signature of DlMallocSpace. Also turn of native stack dumping when running under Valgrind to work around b/18119146. Ritzperf before and after Mean 3190.725 3082.475 Standard Error 11.68407 10.37911 Mode 3069 2980 Median 3182.5 3051.5 Variance 16382.117 12927.125 Standard Deviation 127.99264 113.69751 Kurtosis 1.1065632 0.3657799 Skewness 0.9013805 0.9117792 Range 644 528 Minimum 2991 2928 Maximum 3635 3456 Count 120 120 Bug: 18119146 Change-Id: I25558ea7cb578406011dede9d3d0bdbfee4ff4d5
|
cf7f19135f0e273f7b0136315633c2abfc715343 |
|
23-Oct-2014 |
Ian Rogers <irogers@google.com> |
C++11 related clean-up of DISALLOW_.. Move DISALLOW_COPY_AND_ASSIGN to delete functions. By no having declarations with no definitions this prompts better warning messages so deal with these by correcting the code. Add a DISALLOW_ALLOCATION and use for ValueObject and mirror::Object. Make X86 assembly operand types ValueObjects to fix compilation errors. Tidy the use of iostream and ostream. Avoid making cutils a dependency via mutex-inl.h for tests that link against libart. Push tracing dependencies into appropriate files and mutex.cc. x86 32-bit host symbols size is increased for libarttest, avoid copying this in run-test 115 by using symlinks and remove this test's higher than normal ulimit. Fix the RunningOnValgrind test in RosAllocSpace to not use GetHeap as it returns NULL when the heap is under construction by Runtime. Change-Id: Ia246f7ac0c11f73072b30d70566a196e9b78472b
|
13735955f39b3b304c37d2b2840663c131262c18 |
|
08-Oct-2014 |
Ian Rogers <irogers@google.com> |
stdint types all the way! Change-Id: I4e4ef3a2002fc59ebd9097087f150eaf3f2a7e08
|
6a7824dc81aaab3cb09ced16affca72d1b1da649 |
|
22-Aug-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add fallback for non moving space being full. When the non moving space becomes full, we disable moving GC and make the main space the new non moving space. Also added a runtime option for changing the non moving space size: -XX:NonMovingSpaceCapacity. Bug: 17189964 (cherry picked from commit 4c5a469683e433f126c9863cd393747d2e7c4a29) Change-Id: If82e3c6f8a0f389e37e14a0b1e6d5126d571fd7a
|
4c5a469683e433f126c9863cd393747d2e7c4a29 |
|
22-Aug-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add fallback for non moving space being full. When the non moving space becomes full, we disable moving GC and make the main space the new non moving space. Also added a runtime option for changing the non moving space size: -XX:NonMovingSpaceCapacity. Bug: 17189964 Change-Id: I04d00d0f457f6c1f5724bf32932b6b6ce4d341b1
|
38c488bcd41ba632a646d7a1d790ec71a2fcf6fa |
|
16-Jul-2014 |
Mathieu Chartier <mathieuc@google.com> |
Recycle mem-maps for collector transitions. We now create spaces when we need them for collector transitions or homogeneous compaction by recycling mem maps. Change the bump pointer space size to be as large as the heap capacity instead of 1/2 heap capacity like it used to be. For GSS, bump pointer spaces are set to 32MB currently. Changed GSS to have main space == non moving space since we don't need to copy from the main space. Fixes GC stress tests 074, 096. Fixed test 080 oom throw with -Xmx2m for GC stress test, this was broken since it was allocating a 4 MB array before starting the OOM process. Bug: 14059466 Bug: 16406852 (cherry picked from commit b363f666883860d40823d5528df3c98c897f74f4) Change-Id: I62877cfa24ec944a6f34ffac30334f454a8002fd
|
b363f666883860d40823d5528df3c98c897f74f4 |
|
16-Jul-2014 |
Mathieu Chartier <mathieuc@google.com> |
Recycle mem-maps for collector transitions. We now create spaces when we need them for collector transitions or homogeneous compaction by recycling mem maps. Change the bump pointer space size to be as large as the heap capacity instead of 1/2 heap capacity like it used to be. For GSS, bump pointer spaces are set to 32MB currently. Changed GSS to have main space == non moving space since we don't need to copy from the main space. Fixes GC stress tests 074, 096. Fixed test 080 oom throw with -Xmx2m for GC stress test, this was broken since it was allocating a 4 MB array before starting the OOM process. Bug: 14059466 Bug: 16406852 Change-Id: I62877cfa24ec944a6f34ffac30334f454a8002fd
|
654dd48e2230e16bfaa225decce72b52642e2f78 |
|
09-Jul-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Improve the OOME fragmentation message. Change-Id: I390d3622f8d572ec7e34ea6dff9e1e0936e81ac1
|
a8e8f9c0a8e259a807d7b99a148d14104c24209d |
|
09-Apr-2014 |
Mathieu Chartier <mathieuc@google.com> |
Refactor space bitmap to support different alignments. Required for: Using space bitmaps instead of std::set in mod union table + remembered set. Using a bitmap instead of set for large object marking. Bug: 13571028 Change-Id: Id024e9563d4ca4278f79607cdb2f81895121b113
|
31f441464c0c8f840aba37e236ad133f30308d70 |
|
08-Apr-2014 |
Mathieu Chartier <mathieuc@google.com> |
Clean-up heap spaces. We now use the CMS collector instead of the semispace collector when the phone is booting. We still perform compaction during the zygote space creation. This reduces time spent in GC by ~2s during boot and doesn't affect zygote space size. Changed the space creation logic to create the temp space when a background transition occurs. Added a flag to each space which is true if you are allowed to move objects that are within this space. Removed SwapSemiSpaces call from the semi space collector, it is now the job of the caller to do this with threads suspended. This simplifies the logic in the zygote compaction / heap transition code since these do not copy from one semispace to another. Added Space::Clear to RosAllocSpace and DlMallocSpace. This greatly simplifies the code used for collector transitions. Time spent in GC creating zygote space: Before: 3.4s, After: 1.28s No change in zygote space size. Bug: 13878055 Change-Id: I700348ab7d5bf3aa537c0cd70c0fed09aa4b0623
|
661974a5561e5ccdfbac8cb5d8df8b7e6f3483b8 |
|
09-Jan-2014 |
Mathieu Chartier <mathieuc@google.com> |
Fix valgrind gtests and memory leaks. All tests pass other than image_test which passes if some bad reads are disabled (buzbee working on this). Change-Id: Ifd6b6e3aed0bc867703b6e818353a9f296609422
|
26d69ffc0ebc98fbc5f316d8cd3ee6ba5b2001ac |
|
27-Feb-2014 |
Hiroshi Yamauchi <yamauchi@google.com> |
Decrease lock uses in RosAlloc::BulkFree(). Read rosalloc page map entries without a lock. Disabled for now. This change speeds up Ritz MemAllocTest by ~25% on host and reduces the GC sweep time, but somehow slows it down by ~5% on N4, which is why it's disabled for now. TODO: look into the slowdown on N4 more. Bug: 8262791 Bug: 11790317 Change-Id: I936bbee9cfbd389e70d6343503bf0923865d2a2c
|
6fac447555dc94a935b78198479cce645c837b89 |
|
26-Feb-2014 |
Ian Rogers <irogers@google.com> |
Make allocations report usable size. Work-in-progress to allow arrays to fill usable size. Bug: 13028925. Use C++11's override keyword on GCC >= 2.7 to ensure that we override GC and allocator methods. Move initial mirror::Class set up into a Functor so that all allocated objects have non-zero sizes. Use this property to assert that all objects are never larger than their usable size. Other bits of GC related clean-up, missing initialization, missing use of const, hot methods in .cc files, "unimplemented" functions that fail at runtime in header files, reducing header file includes, move valgrind's space into its own files, reduce number of array allocation routines. Change-Id: Id5760041a2d7f94dcaf17ec760f6095ec75dadaa
|
ef7d42fca18c16fbaf103822ad16f23246e2905d |
|
06-Jan-2014 |
Ian Rogers <irogers@google.com> |
Object model changes to support 64bit. Modify mirror objects so that references between them use an ObjectReference value type rather than an Object* so that functionality to compress larger references can be captured in the ObjectRefererence implementation. ObjectReferences are 32bit and all other aspects of object layout remain as they are currently. Expand fields in objects holding pointers so they can hold 64bit pointers. Its expected the size of these will come down by improving where we hold compiler meta-data. Stub out x86_64 architecture specific runtime implementation. Modify OutputStream so that reads and writes are of unsigned quantities. Make the use of portable or quick code more explicit. Templatize AtomicInteger to support more than just int32_t as a type. Add missing, and fix issues relating to, missing annotalysis information on the mutator lock. Refactor and share implementations for array copy between System and uses elsewhere in the runtime. Fix numerous 64bit build issues. Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
|
1f3b5358b28a83f0929bdd8ce738f06908677fb7 |
|
03-Feb-2014 |
Mathieu Chartier <mathieuc@google.com> |
Move SwapBitmaps to ContinuousMemMapAllocSpace. Moved the SwapBitmaps function to ContinuousMemMapAllocSpace since the zygote space uses this function during full GC. Fixed a place where we were casting a ZygoteSpace to a MallocSpace, somehow this didn't cause any issues in non-debug builds. Moved the CollectGarbage in PreZygoteFork before the lock to prevent an occasional lock level violation caused by attempting to enqueue java lang references with the a lock. Bug: 12876255 Change-Id: I77439e46d5b26b37724bdcee3a0948410f1b0eb4
|
a1602f28c0e3127ad511712d4b08db89737ae901 |
|
14-Jan-2014 |
Mathieu Chartier <mathieuc@google.com> |
Add zygote space as its own space type. Helps prevent errors caused from doing invalid operations on the old alloc space. Removed some duplicated code in mark_sweep.cc and semi_space.cc. Change-Id: I67a772cab30d698744c918aad581053f282a4a99
|
ec05007f8619f8b0cc868d06731e07f84bb74c5b |
|
08-Jan-2014 |
Mathieu Chartier <mathieuc@google.com> |
Refactor sweeping logic into malloc space. Removes duplicated code in MarkSweep/SemiSpace. Deleted VerifyImageRoots since it had race conditions and is tested by pre/post GC heap verification. Change-Id: I9636359ff6adb3e93d56ce77a3e15299ed23dfd5
|
e48780b8278240dec2d3164512f7d3317a5495c1 |
|
18-Dec-2013 |
Hiroshi Yamauchi <yamauchi@google.com> |
Remove some unnecessary code from dlmalloc_space/rosalloc_space. Removed GetTotalBytesAllocated(), GetTotalObjectsAllocated(), and InternalAllocationSize(). No performance improvement observed. Change-Id: Ie20433a0fd328fc7f61d4afd54d18fbdc4aa4a17
|
573f7d2d68e1838a0485e6b40d90c967526e00c2 |
|
17-Dec-2013 |
Hiroshi Yamauchi <yamauchi@google.com> |
Fix an array copy benchmark regression. Add different page release modes to rosalloc. Bug: 12064551 Change-Id: Ib837bbd1a2757741a4e2743e0a1272bf46a30252
|
7cb7bbcfffb2716ef8d68ecb747954ec42c4bdc5 |
|
19-Nov-2013 |
Hiroshi Yamauchi <yamauchi@google.com> |
Add Valgrind rosalloc support. Bug: 9986565 Change-Id: Ibd2ba5e8b4fb7f2ed6c133a4b556a6dbb15a2f5e
|
e5eedcb4a634246d1f912992853441f715d705cc |
|
18-Nov-2013 |
Hiroshi Yamauchi <yamauchi@google.com> |
Fix cpplint errors. Change-Id: I21f7423ebe69a77d456b0d318de73448489d2df4
|
cf58d4adf461eb9b8e84baa8019054c88cd8acc6 |
|
26-Sep-2013 |
Hiroshi Yamauchi <yamauchi@google.com> |
A custom 'runs-of-slots' memory allocator. Bug: 9986565 Change-Id: I0eb73b9458752113f519483616536d219d5f798b
|