bfc2b98a3cf7a9d580f2477e54aabded5004fd26 |
|
11-Sep-2014 |
Brian Carlstrom <bdc@google.com> |
Use WellKnownClasses in ThrowStackOverflowError to reduce changes of further stack overflow Bug: 17463118 Change-Id: Ic05b07803d2d3112e0b67064f380cd46ba9e293f
|
6b28a456b075fe53dfb7e924a44dbf35d0d41eb3 |
|
03-Sep-2014 |
Jeff Hao <jeffhao@google.com> |
Fix stack overflow and duplicate methods while tracing. Bug: 16386215 Change-Id: I0d0ae0113a3a00013ce84a1f5a110e2c52f19b86
|
03c9785a8a6d712775cf406c4371d0227c44148f |
|
14-Aug-2014 |
Dave Allison <dallison@google.com> |
Revert "Revert "Reduce stack usage for overflow checks"" Fixes stack protection issue. Fixes mac build issue. This reverts commit 83b1940e6482b9d8feba5c492507735686650ea5. Change-Id: I7ba17252882b23a740bcda2ea94aacf398255406
|
ab9a0dbf3b63d517da5278b8298e6cd316e09f68 |
|
14-Aug-2014 |
Dave Allison <dallison@google.com> |
Revert "Reduce stack usage for overflow checks" This reverts commit 63c051a540e6dfc806f656b88ac3a63e99395429. Change-Id: I282a048994fcd130fe73842b16c21680053c592f
|
63c051a540e6dfc806f656b88ac3a63e99395429 |
|
26-Jul-2014 |
Dave Allison <dallison@google.com> |
Reduce stack usage for overflow checks This reduces the stack space reserved for overflow checks to 12K, split into an 8K gap and a 4K protected region. GC needs over 8K when running in a stack overflow situation. Also prevents signal runaway by detecting a signal inside code that resulted from a signal handler invokation. And adds a max signal count to the SignalTest to prevent it running forever. Also reduces the number of iterations for the InterfaceTest as this was taking (almost) forever with the --trace option on run-test. Bug: 15435566 Change-Id: Id4fd46f22d52d42a9eb431ca07948673e8fda694 Conflicts: compiler/optimizing/code_generator_x86_64.cc runtime/arch/x86/fault_handler_x86.cc runtime/arch/x86_64/quick_entrypoints_x86_64.S
|
83b1940e6482b9d8feba5c492507735686650ea5 |
|
14-Aug-2014 |
Dave Allison <dallison@google.com> |
Revert "Reduce stack usage for overflow checks" This reverts commit 63c051a540e6dfc806f656b88ac3a63e99395429. Change-Id: I282a048994fcd130fe73842b16c21680053c592f
|
4ef12f5b0e26c6016c87866f6a33da5ed8e98d74 |
|
01-Aug-2014 |
Andreas Gampe <agampe@google.com> |
ART: Add guards to the dex cache and its shortcuts Do not return fields, methods or classes if the (declaring) class is erroneous. Bug: 16692788 (cherry picked from commit 58a5af8568d224ca7eccf2483396ff9862f8d1ee) Change-Id: I7d3e4cb8113e2e764ed7433eed25e1031e6a0f14
|
0f45f22eb3c52f0ece4c56989180e79c6680d825 |
|
15-Jul-2014 |
Andreas Gampe <agampe@google.com> |
ART: Throw StackOverflowError in native code Initialize stack-overflow errors in native code to be able to reduce the preserved area size of the stack. Includes a refactoring away from constexpr in instruction_set.h to allow for easy changing of the values. Bug: 16256184 (cherry picked from commit 7ea6f79bbddd69d5db86a8656a31aaaf64ae2582) Change-Id: I117cc8485f43da5f0a470f0f5e5b3dc3b5a06246
|
7ea6f79bbddd69d5db86a8656a31aaaf64ae2582 |
|
15-Jul-2014 |
Andreas Gampe <agampe@google.com> |
ART: Throw StackOverflowError in native code Initialize stack-overflow errors in native code to be able to reduce the preserved area size of the stack. Includes a refactoring away from constexpr in instruction_set.h to allow for easy changing of the values. Change-Id: I117cc8485f43da5f0a470f0f5e5b3dc3b5a06246
|
e5877a12c30afe10a5c6a1afaff7a47ef44a2a5f |
|
16-Jul-2014 |
Ian Rogers <irogers@google.com> |
Fix x86 build. Also fix attributes/annotalysis on entrypoint_utils functions now we have clang that is smarter wrt warnings than GCC. Change-Id: I69257b4ad9a27d07acbc973d21a1cfa4260a8ed6
|
22d5e735f403c57525fe868304c7123f0ce66399 |
|
16-Jul-2014 |
Ian Rogers <irogers@google.com> |
Remove object_utils.h. Break into object_lock, field_helper and method_helper. Clean up header files following this. Also tidy some of the Handle code in response to compiler errors when resolving the changes in this CL. Change-Id: I73e63015a0f02a754d0866bfaf58208aebcaa295
|
98d1cc8033251c93786e2fa8c59a2e555a9493be |
|
16-May-2014 |
Mingyao Yang <mingyao@google.com> |
Improve performance of invokevirtual/invokeinterface with embedded imt/vtable Add an embedded version of imt/vtable into class object. Both tables start at fixed offset within class object so method/entry point can be loaded directly from class object for invokeinterface/invokevirtual. Bug: 8142917 Change-Id: I4240d58cfbe9250107c95c0708c036854c455968
|
bfd9a4378eacaf2dc2bbe05ad48c5164fc93c9fe |
|
22-May-2014 |
Mathieu Chartier <mathieuc@google.com> |
Change MethodHelper to use a Handle. Added ConstHandle to help prevent errors where you modify the value stored in the handle of the caller. Also fixed compaction bugs related to not knowing MethodHelper::GetReturnType can resolve types. This bug was present in interpreter RETURN_OBJECT. Bug: 13077697 Change-Id: I71f964d4d810ab4debda1a09bc968af8f3c874a3
|
f00571c4e1ae202b3b4acb6b47cbe23a65178f7f |
|
30-May-2014 |
Jeff Hao <jeffhao@google.com> |
Added workaround passing empty arg array for proxy invocation. This recreates old Dalvik behavior for older target sdk versions, but will still pass null for newer ones. Bug: 13247236 (cherry picked from commit 01d5a146e20660bd06f026c16f19ec080f8fdd7b) Change-Id: I911889cf559ad8d9f37ea9be3929387c86446851
|
01d5a146e20660bd06f026c16f19ec080f8fdd7b |
|
30-May-2014 |
Jeff Hao <jeffhao@google.com> |
Added workaround passing empty arg array for proxy invocation. This recreates old Dalvik behavior for older target sdk versions, but will still pass null for newer ones. Bug: 13247236 Change-Id: I663c44f729dd173b47da692a753b986daa0463e9
|
2b7c4d196c8abe32f4ca633534917da9de53c359 |
|
19-May-2014 |
Mathieu Chartier <mathieuc@google.com> |
Don't get and restore thread state for ScopedFastNativeObjectAccess. Before we would ensure that we were runnable for fast native object access. However, these are done when you are already runnable. Change-Id: Ia4c6e4c83d146fe2a988b37b3133ca46b0f0fa42
|
f943914730db8ad2ff03d49a2cacd31885d08fd7 |
|
27-Mar-2014 |
Dave Allison <dallison@google.com> |
Implement implicit stack overflow checks This also fixes some failing run tests due to missing null pointer markers. The implementation of the implicit stack overflow checks introduces the ability to have a gap in the stack that is skipped during stack walk backs. This gap is protected against read/write and is used to trigger a SIGSEGV at function entry if the stack will overflow. Change-Id: I0c3e214c8b87dc250cf886472c6d327b5d58653e
|
84956ff6c0ff150d86a08157216ded79217d860a |
|
27-Mar-2014 |
Ian Rogers <irogers@google.com> |
Reflection tidying. Move out arguments to the right and make pointer not reference types. Remove unused unbox for argument routine. Simplify convert primitive routine for the case of identical types. Change-Id: I6456331b0f3f3e5f0b2c361a9f50b4ed1c9462a3
|
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
|
d2fe10a3a34af171bf1631219cd2d6ff6b7778b5 |
|
15-Jan-2014 |
Sebastien Hertz <shertz@google.com> |
Remove blacklist Removes the class initialization blacklist and use transaction to detect and revert class initialization attempting to invoke native method. This only concerns class initialization happening at compilation time when generating an image (like boot.art for the system). In transactional mode, we log every object's field assignment and array update. Therefore we're able to abort a transaction to restore values of fields and array as they were before the transaction starts. We also log changes to the intern string table so we can restore its state prior to transaction start. Since transactional mode only happens at compilation time, we don't need to log all these changes at runtime. In order to reduce the overhead of testing if transactional mode is on/off, we templatize interfaces of mirror::Object and mirror::Array, respectively responsible for setting a field and setting an array element. For various reasons, we skip some specific fields from transaction: - Object's class and array's length must remain unchanged so garbage collector can compute object's size. - Immutable fields only set during class loading: list of fields, method, dex caches, vtables, ... as all classes have been loaded and verified before a transaction occurs. - Object's monitor for performance reason. Before generating the image, we browse the heap to collect objects that need to be written into it. Since the heap may still holds references to unreachable objects due to aborted transactions, we trigger one collection at the end of the class preinitialization phase. Since the transaction is held by the runtime and all compilation threads share the same runtime, we need to ensure only one compilation thread has exclusive access to the runtime. To workaround this issue, we force class initialization phase to run with only one thread. Note this is only done when generating image so application compilation is not impacted. This issue will be addressed in a separate CL. Bug: 9676614 Change-Id: I221910a9183a5ba6c2b99a277f5a5a68bc69b5f9
|
e6da9af8dfe0a3e3fbc2be700554f6478380e7b9 |
|
16-Dec-2013 |
Mathieu Chartier <mathieuc@google.com> |
Background compaction support. 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
|
4fa0bcd2142793e1f105b24b658de3635652b957 |
|
10-Dec-2013 |
Brian Carlstrom <bdc@google.com> |
Remove unneeded quoting Change-Id: I87f452e338bd4ff0587e3fc7b0bec3f08a1e7fe6
|
cbb2d20bea2861f244da2e2318d8c088300a3710 |
|
15-Nov-2013 |
Mathieu Chartier <mathieuc@google.com> |
Refactor allocation entrypoints. Adds support for switching entrypoints during runtime. Enables addition of new allocators with out requiring significant copy paste. Slight speedup on ritzperf probably due to more inlining. TODO: Ensuring that the entire allocation path is inlined so that the switch statement in the allocation code is optimized out. Rosalloc measurements: 4583 4453 4439 4434 4751 After change: 4184 4287 4131 4335 4097 Change-Id: I1352a3cbcdf6dae93921582726324d91312df5c9
|
590fee9e8972f872301c2d16a575d579ee564bee |
|
13-Sep-2013 |
Mathieu Chartier <mathieuc@google.com> |
Compacting collector. The compacting collector is currently similar to semispace. It works by copying objects back and forth between two bump pointer spaces. There are types of objects which are "non-movable" due to current runtime limitations. These are Classes, Methods, and Fields. Bump pointer spaces are a new type of continuous alloc space which have no lock in the allocation code path. When you allocate from these it uses atomic operations to increase an index. Traversing the objects in the bump pointer space relies on Object::SizeOf matching the allocated size exactly. Runtime changes: JNI::GetArrayElements returns copies objects if you attempt to get the backing data of a movable array. For GetArrayElementsCritical, we return direct backing storage for any types of arrays, but temporarily disable the GC until the critical region is completed. Added a new runtime call called VisitObjects, this is used in place of the old pattern which was flushing the allocation stack and walking the bitmaps. Changed image writer to be compaction safe and use object monitor word for forwarding addresses. Added a bunch of added SIRTs to ClassLinker, MethodLinker, etc.. TODO: Enable switching allocators, compacting on background, etc.. Bug: 8981901 Change-Id: I3c886fd322a6eef2b99388d19a765042ec26ab99
|
d4beb6bc2b42b176c6d04fdd91d6c758e542c7c2 |
|
02-Oct-2013 |
Sebastien Hertz <shertz@google.com> |
Inline field and method resolution. According to profiling results, field and method resolutions are hot points during interpreter execution. This CL attempts to speed up these resolutions. Forces aggressive inlining of FindFieldFromCode and FindMethodFromCode. This allows to reduce the overhead of access check code when the interpreter runs without these checks. Templatize these functions to optimize inlining and their callers. Also spread the use of C++11 "nullptr" in place of "NULL" in field access and invoke helpers. Change-Id: Ic1a69834d8975b2cddcddaae32f08a7de146a951
|
3b4c18933c24b8a33f38573c2ebcdb9aa16efeb5 |
|
13-Sep-2013 |
Hiroshi Yamauchi <yamauchi@google.com> |
Split the allocation path into 'instrumented' and 'uninstrumented' ones. The instrumented path is equivalent to the existing allocation path that checks for three instrumentation mechanisms (the debugger allocation tracking, the runtime allocation stats collection, and valgrind) for every allocation. The uinstrumented path does not perform these checks. We use the uninstrumented path by default and enable the instrumented path only when any of the three mechanisms is enabled. The uninstrumented version of Heap::AllocObject() is inlined. This change improves the Ritz MemAllocTest by ~4% on Nexus 4 and ~3% on Host/x86. Bug: 9986565 Change-Id: I3e68dfff6789d77bbdcea98457b694e1b5fcef5f
|
bd136a29f08486525d6abc7d0a0006ce5b4011c1 |
|
14-Aug-2013 |
Dragos Sbirlea <dragoss@google.com> |
Get PORTABLE + SMALL on x86. Implemented the portable resolution trampoline and the portable to interpreter bridge. Also work on integrating SEA_IR in the PORTABLE+SMALL framework. Refactor some naming and correct indenting. Change-Id: Ibd97da5e5b6f5148274c9bff368e3654b661ef51
|
414af10d719603fb4d8d972f5a022c17957b44e1 |
|
13-Aug-2013 |
Brian Carlstrom <bdc@google.com> |
Add flock(2)ing on dex-cache files to prevent races Bug: 9071417 Change-Id: I1ee9ff281867f90fba7a8ed8bbf06b33ac29d511
|
7571e8b761ebc2c923525e12ea9fcf07e62cb33e |
|
13-Aug-2013 |
Brian Carlstrom <bdc@google.com> |
Add flock(2)ing on dex-cache files to prevent races Bug: 9071417 Change-Id: I1ee9ff281867f90fba7a8ed8bbf06b33ac29d511
|
ea46f950e7a51585db293cd7f047de190a482414 |
|
30-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Refactor java.lang.reflect implementation Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1. Move to ArtMethod/Field instead of AbstractMethod/Field and have java.lang.reflect APIs delegate to ArtMethod/ArtField. Bug: 10014286. Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
|
834b394ee759ed31c5371d8093d7cd8cd90014a8 |
|
31-Jul-2013 |
Brian Carlstrom <bdc@google.com> |
Merge remote-tracking branch 'goog/dalvik-dev' into merge-art-to-dalvik-dev Change-Id: I323e9e8c29c3e39d50d9aba93121b26266c52a46
|
7655f29fabc0a12765de828914a18314382e5a35 |
|
29-Jul-2013 |
Ian Rogers <irogers@google.com> |
Portable refactorings. Separate quick from portable entrypoints. Move architectural dependencies into arch. Change-Id: I9adbc0a9782e2959fdc3308215f01e3107632b7c
|