- 10 Jun, 2015 1 commit
-
-
Man Cao authored
This feature is currently only enabled when DDMS's allocation tracking is enabled. In the future there should be a way to enable this feature before an application starts. Also updates DDMS's recent allocation tracking to use a new backend data structure that is shared with this feature. The following system properties controls customizable parameters: dalvik.vm.allocTrackerMax: max number of objects that have allocation records, default 512K; dalvik.vm.recentAllocMax: max number of records that are sent to DDMS when clicking "Get allocation" button, default 64K-1 (limit of the protocol); dalvik.vm.allocStackDepth: max number of stack frames in an allocation record, default 4. Bug: 20037135 Change-Id: I26ed378a5613678bd3c43e846025f90470a8e059
-
- 30 May, 2015 1 commit
-
-
Mathieu Chartier authored
Optimizing + quick tests are passing, devices boot. TODO: Test and fix bugs in mips64. Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS. Some of the savings are from removal of virtual methods and direct methods object arrays. Bug: 19264997 Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
-
- 26 May, 2015 1 commit
-
-
Vladimir Marko authored
Avoid undefined behavior for arm64 stemming from 1u << 32 in loops with upper bound kNumberOfXRegisters. Create iterators for enumerating bits in an integer either from high to low or from low to high and use them for <arch>Context::FillCalleeSaves() on all architectures. Refactor runtime/utils.{h,cc} by moving all bit-fiddling functions to runtime/base/bit_utils.{h,cc} (together with the new bit iterators) and all time-related functions to runtime/base/time_utils.{h,cc}. Improve test coverage and fix some corner cases for the bit-fiddling functions. Bug: 13925192 Change-Id: I704884dab15b41ecf7a1c47d397ab1c3fc7ee0f7
-
- 03 May, 2015 1 commit
-
-
Mathieu Chartier authored
May help prevent bugs maybe. Change-Id: Ie73d469dfcd078492ecb3aa28682b42707221202
-
- 01 May, 2015 1 commit
-
-
Hiroshi Yamauchi authored
Bug: 20554807 Change-Id: I1cd855507c3f4e191035dbc2c429e1b8b344d81b
-
- 22 Apr, 2015 1 commit
-
-
Mathieu Chartier authored
Also fixed some lines that were too long, and a few other minor details. Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
-
- 11 Mar, 2015 1 commit
-
-
Hiroshi Yamauchi authored
Speedup on N4: MemAllocTest 3044 -> 2396 (~21% reduction) BinaryTrees 4101 -> 2929 (~26% reduction) Bug: 9986565 Change-Id: Ia1d1a37b9e001f903c3c056e8ec68fc8c623a78b
-
- 23 Jan, 2015 1 commit
-
-
Hiroshi Yamauchi authored
Bug: 12687968 Change-Id: I62f70274d47df6d6cab714df95c518b750ce3105
-
- 02 Dec, 2014 1 commit
-
-
Mathieu Chartier authored
If a large object allocation fails, we now try the normal allocators. Bug: 18124612 (cherry picked from commit f1c4d0e3) Change-Id: Ib83ebe53fbdd83aa2d23fd10a8bb10e149f8918f
-
- 01 Dec, 2014 1 commit
-
-
Mathieu Chartier authored
If a large object allocation fails, we now try the normal allocators. Bug: 18504942 Change-Id: I18b9759d6af885556941542c57fec584f18197f1
-
- 30 Sep, 2014 1 commit
-
-
Andreas Gampe authored
Remove extra semicolons. Dollar signs in C++ identifiers are an extension. Named variadic macros are an extension. Binary literals are a C++14 feature. Enum re-declarations are not allowed. Overflow. Change-Id: I7d16b2217b2ef2959ca69de84eaecc754517714a
-
- 13 Sep, 2014 1 commit
-
-
Ian Rogers authored
Avoids recomputation in the hot allocation path when instrumentation is enabled. Change-Id: Ic6e7d7d0744f4756787f75d21fddd3c50280b588
-
- 21 Aug, 2014 2 commits
-
-
Mathieu Chartier authored
Possible previous bug: Allocation fails due to OOM and the collector transitions. This caused us to incorrectly retry the allocation with a pending exception. We now return null if there is a pending exception. Bug: 17164348 (cherry picked from commit 27f5ae83) Change-Id: I8e7ecafbade7f0b955812df3dd7c94fdc696c856
-
Mathieu Chartier authored
Possible previous bug: Allocation fails due to OOM and the collector transitions. This caused us to incorrectly retry the allocation with a pending exception. We now return null if there is a pending exception. Bug: 17164348 Change-Id: I22eab472afb2fdea6e800963ccb35ec0755ba0e6
-
- 14 Jul, 2014 2 commits
-
-
Mathieu Chartier authored
There was a problem where we would call SetStatus when we had an OOM error. This results in attempting to find the ExceptionInInitializer class which if not loaded does more allocations resulting in an infinite loop. Also some cleanup addressing other comments. Bug: 16082350 (cherry picked from commit fd22d5ba) Change-Id: Ie291eb0f52ba9c63f24591fae691dd9f393e6ccb
-
Mathieu Chartier authored
There was a problem where we would call SetStatus when we had an OOM error. This results in attempting to find the ExceptionInInitializer class which if not loaded does more allocations resulting in an infinite loop. Also some cleanup addressing other comments. Bug: 16082350 Change-Id: I5c1e638a03ddf700ab4e9cad9a3077d2b1b26c43
-
- 11 Jul, 2014 1 commit
-
-
Mathieu Chartier authored
New TLAB allocator doesn't increment bytes allocated until we allocate a new TLAB. This increases allocation performance by avoiding a CAS. MemAllocTest: Before GSS TLAB: 3400ms. After GSS TLAB: 2750ms. Bug: 9986565 Change-Id: I1673c27555330ee90d353b98498fa0e67bd57fad
-
- 02 Jun, 2014 1 commit
-
-
Tim Murray authored
Merge ART from AOSP to lmp-preview-dev. Change-Id: I0f578733a4b8756fd780d4a052ad69b746f687a9
-
- 23 May, 2014 1 commit
-
-
Mathieu Chartier authored
This fixes an issue with heap verification which was caused when the allocation stack overflowed. This resulted in heap verification failures since we were storing the newly allocated object in a handle scope without having it be live either in the live bitmap or allocation stack. We now push the object in the reserve area before we do a GC due to allocation stack overflow. Change-Id: I83b42c4b3250d7eaab1b49e53066e21c8656a740
-
- 21 May, 2014 1 commit
-
-
Ian Rogers authored
Change-Id: I4858d9cbed95e5ca560956b9dabd976cebe68333
-
- 13 May, 2014 1 commit
-
-
Mathieu Chartier authored
Delete SirtRef and replaced it with Handle. Handles are value types which wrap around StackReference*. Renamed StackIndirectReferenceTable to HandleScope. Added a scoped handle wrapper which wraps around an Object** and restores it in its destructor. Renamed Handle::get -> Get. Bug: 8473721 Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a
-
- 03 Apr, 2014 1 commit
-
-
Hiroshi Yamauchi authored
Pass in a pre-fence barrier object that sets in the array length instead of setting it after returning from AllocObject(). Fix another potential bug due to the wrong default pre-fence barrier parameter value. Since this appears error-prone, removed the default parameter value and make it an explicit parameter. Fix another potential moving GC bug due to a lack of a SirtRef. Bug: 13097759 Change-Id: I466aa0e50f9e1a5dbf20be5a195edee619c7514e
-
- 01 Apr, 2014 1 commit
-
-
Hiroshi Yamauchi authored
Add an option for Baker in addition to Brooks. Bug: 12687968 Change-Id: I8a31db817ff6686c72951b6534f588228e270b11
-
- 20 Mar, 2014 1 commit
-
-
Hiroshi Yamauchi authored
Bug: 12687968 Change-Id: Ifc9ee86249f7938f51495ea1498cf0f7853a27e8
-
- 15 Mar, 2014 1 commit
-
-
Hiroshi Yamauchi authored
Scan only dirty cards, as opposed to the whole space, to find references from the non-moving spaces to the bump pointer spaces at bump pointer space only collections. With this change, the Ritz MemAllocTest speeds up by 8-10% on host and 2-3% on N4. The Ritz EvaluateFibonacci speeds up by 8% and its average pause time is reduced by 43% on N4. Bug: 11650816 Change-Id: I1eefe75776bc37e24673b301ffa65a25f9bd4cde
-
- 11 Mar, 2014 1 commit
-
-
Hiroshi Yamauchi authored
This change fixes the following problem with the GSS collector: if the post zygote non-moving space happens to be located after the bump pointer spaces, the bump pointer space is treated wrongfully as an immune space. The reasons are 1) the immune space is represented by a simple address range and 2) the GSS collector treats the post zygote non-moving space as an immune space at a bump pointer space only collection. In addition, this change makes it a reality that all the non-moving spaces are adjacent, which we tend to assume in the code (eg. the notion of the immune space represented by a simple address range.) This should help avoid potential confusions in the future. Fix a DCHECK failure where usable_size isn't set properly when -XX:UseTLAB is used. Change-Id: I585920e433744a390f87e9a25bef6114b2a4623f
-
- 07 Mar, 2014 2 commits
-
-
Mathieu Chartier authored
Added verify object calls to SirtRef, IndirectReferenceTable, ReferenceTable. Removed un-needed verify object in ScopedObjectAccess / DecodeJObject since object sources are handled. Bug: 12934910 Change-Id: I55a46a8ea61fed2a77526eda27fd2cce97a9b125
-
Mathieu Chartier authored
RequestConcurrentGC can cause thread suspension, this means that another thread could transition the heap or cause moving GC. Bug: 12934910 Change-Id: I5c07161e2e849d7acbdf939f1c24e1ba361a1d6a
-
- 27 Feb, 2014 3 commits
-
-
Mathieu Chartier authored
Added a dynamic large_object_threshold_ variable which is max int when the large object space is disabled. No longer clear timing logger timings after zygote creation since it is not required and removes the boot semispace timings. Change-Id: I693865f4699cc32381199377239854c6ec42f37e
-
Ian Rogers authored
Address other outstanding review comments. Change-Id: Iaffe04de080772a0d0c5fd973bcac0e23c8c3e25
-
Ian Rogers authored
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
-
- 25 Feb, 2014 1 commit
-
-
Hiroshi Yamauchi authored
This feature is disabled by default. Verified that the Brooks pointers are installed correctly by using the CMS/SS collectors. Change-Id: Ia9be9814ab6e29169ac85edc4792ce8c81d552a9
-
- 21 Feb, 2014 1 commit
-
-
Mathieu Chartier authored
VerifyObject no longer resides in heap. You can now enable VerifyObject for non-debug builds. VerifyStack is still slow, so it is now guarded by its own flag. Fixed the image writer to not use verification at places where verification fails due to invalid reads. Fixed RosAlloc to use SizeOf which doesn't call verify object. Added a flag paremeter to some of the mirror getters / setters to be able to selectively disable VerifyObject on certain calls. Optimized the GC to not verify each object multiple times during object scanning if verify object is enabled. Added 3 verification options: verify reads, verify this, and verify writes so that you can select how much verification you want for mirror getters and setters. Removed some useless DCHECKs which would slow debug builds without providing any benefits. TODO: RosAlloc verification doesn't currently work with verify objects. Bug: 12934910 Bug: 12879358 Change-Id: Ic61033104dfc334543f89b0fc0ad8cd4f4015d69
-
- 13 Feb, 2014 1 commit
-
-
Hiroshi Yamauchi authored
With this change, Ritz MemAllocTest gets ~14% faster on N4. Bug: 9986565 Change-Id: I2fb7d6f7c5daa63dd4fc73ba739e6ae4ed820617
-
- 08 Jan, 2014 1 commit
-
-
Mathieu Chartier authored
When the process state changes to a state which does not perceives jank, we copy from the main free-list backed allocation space to the bump pointer space and enable the semispace allocator. When we transition back to foreground, we copy back to a free-list backed space. Create a seperate non-moving space which only holds non-movable objects. This enables us to quickly wipe the current alloc space (DlMalloc / RosAlloc) when we transition to background. Added multiple alloc space support to the sticky mark sweep GC. Added a -XX:BackgroundGC option which lets you specify which GC to use for background apps. Passing in -XX:BackgroundGC=SS makes the heap compact the heap for apps which do not perceive jank. Results: Simple background foreground test: 0. Reboot phone, unlock. 1. Open browser, click on home. 2. Open calculator, click on home. 3. Open calendar, click on home. 4. Open camera, click on home. 5. Open clock, click on home. 6. adb shell dumpsys meminfo PSS Normal ART: Sample 1: 88468 kB: Dalvik 3188 kB: Dalvik Other Sample 2: 81125 kB: Dalvik 3080 kB: Dalvik Other PSS Dalvik: Total PSS by category: Sample 1: 81033 kB: Dalvik 27787 kB: Dalvik Other Sample 2: 81901 kB: Dalvik 28869 kB: Dalvik Other PSS ART + Background Compaction: Sample 1: 71014 kB: Dalvik 1412 kB: Dalvik Other Sample 2: 73859 kB: Dalvik 1400 kB: Dalvik Other Dalvik other reduction can be explained by less deep allocation stacks / less live bitmaps / less dirty cards. TODO improvements: Recycle mem-maps which are unused in the current state. Not hardcode 64 MB capacity of non movable space (avoid returning linear alloc nightmares). Figure out ways to deal with low virtual address memory problems. Bug: 8981901 Change-Id: Ib235d03f45548ffc08a06b8ae57bf5bada49d6f3
-
- 20 Dec, 2013 1 commit
-
-
Ian Rogers authored
Change-Id: I937ea93e6df1835ecfe2d4bb7d84c24fe7fc097b
-
- 17 Dec, 2013 1 commit
-
-
Mathieu Chartier authored
Added a thread local allocator to the heap, each thread has three pointers which specify the thread local buffer: start, cur, and end. When the remaining space in the thread local buffer isn't large enough for the allocation, the allocator allocates a new thread local buffer using the bump pointer allocator. The bump pointer space had to be modified to accomodate thread local buffers. These buffers are called "blocks", where a block is a buffer which contains a set of adjacent objects. Blocks aren't necessarily full and may have wasted memory towards the end. Blocks have an 8 byte header which specifies their size and is required for traversing bump pointer spaces. Memory usage is in between full bump pointer and ROSAlloc since madvised memory limits wasted ram to an average of 1/2 page per block. Added a runtime option -XX:UseTLAB which specifies whether or not to use the thread local allocator. Its a NOP if the garbage collector is not the semispace collector. TODO: Smarter block accounting to prevent us reading objects until we either hit the end of the block or GetClass() == null which signifies that the block isn't 100% full. This would provide a slight speedup to BumpPointerSpace::Walk. Timings: -XX:HeapMinFree=4m -XX:HeapMaxFree=8m -Xmx48m ritzperf memalloc: Dalvik -Xgc:concurrent: 11678 Dalvik -Xgc:noconcurrent: 6697 -Xgc:MS: 5978 -Xgc:SS: 4271 -Xgc:CMS: 4150 -Xgc:SS -XX:UseTLAB: 3255 Bug: 9986565 Bug: 12042213 Change-Id: Ib7e1d4b199a8199f3b1de94b0a7b6e1730689cad
-
- 11 Dec, 2013 1 commit
-
-
Mathieu Chartier authored
Slight reduction in Zygote size, memory savings are in the noise. Before: Zygote size: 8739224 After: Zygote size: 8733568 Fixed a bug where we didn't set the concurrent start bytes after switching the allocator from bump pointer to ROSAlloc in the zygote. This caused excessive memory usage. Added the method verifiers as roots to fix an issue caused by RegTypes holding a Class*. Added logic to clear card table in the SemiSpace collector, this reduces DalvikOther from ~2400k -> ~1760k when using the SemiSpace collector. Added a missing lock to the timing loggers which caused a rare one time crash in std::set. Bug: 11771255 Bug: 8499494 Bug: 10802951 Change-Id: I99d2b528cd51c1c5ed7012e3220b3aefded680ae
-
- 09 Dec, 2013 1 commit
-
-
Mathieu Chartier authored
Memory usage regressed since we didn't properly update concurrent_start_bytes_ when changing collectors. Bug: 12034247 Change-Id: I1c69e71cd2919e0d3bf75485a4ac0b0aeca59278
-
- 06 Dec, 2013 1 commit
-
-
Hiroshi Yamauchi authored
This had been failing with the error message: object_test F 2360 2360 art/runtime/gc/heap-inl.h:139] Check failed: !running_on_valgrind_ Then, this failing DCHECK was removed in a refactoring in cbb2d20b, I believe. This change adds back a DCHECK that's equivalent to the old one and fixes ObjectTest.CheckAndAllocArrayFromCode by replacing a CheckAndAllocArrayFromCode call with a CheckAndAllocArrayFromCodeInstrumented call. Bug: 11670287 Change-Id: Ica2f707b9a9ff48ef973b9e326a4d9786c1781f8
-