summaryrefslogtreecommitdiffstats
path: root/runtime/globals.h
Commit message (Collapse)AuthorAgeFilesLines
* Add mark compact collector.Mathieu Chartier2014-06-191-1/+4
| | | | | | | | | | | | | | | | | | | | | | The mark compact collector is a 4 phase collection, doing a normal full mark_sweep, calculating forwarding addresses of objects in the from space, updating references of objects in the from space, and moving the objects in the from space. Support is diabled by default since it needs to have non movable classes and field arrays. Performance numbers is around 50% as fast. The main advantage that this has over semispace is that the worst case memory usage is 50% since we only need one space isntead of two. TODO: Make field arrays and classes movable. This causes complication since Object::VisitReferences relies on these, so if we update the fields of an object but another future object uses this object to figure out what fields are reference fields it doesn't work. Bug: 14059466 Change-Id: I661ed3b71ad4dde124ef80312c95696b4a5665a1
* ART: Generalize code to find PC for artInvokeInterfaceTrampolineAlexei Zavjalov2014-06-101-21/+0
| | | | | | | | | | | | | | | | This allows to determine target method when the interface method has no dex index, now also for X86-64 and ARM64. Add constexpr functions to callee_save_frame.h to have compile-time sizes of callee-save frames. Add a test that ensures they agree with computations by the corresponding ArtMethod methods. Move some instruction-set functions into the header file to allow inlining them. Move arch-specific pointer sizes and alignment sizes out of globals.h to instruction_set.h to reduce dependencies. Change-Id: I2997592c7dd1f4dd2bd497522c64bd235ae615a6 Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
* AArch64: Change arm64 backend to produce A64 code.Matteo Franchin2014-05-071-3/+2
| | | | | | | | | | | | | | The arm backend clone is changed to produce A64 code. At the moment this backend can only compile simple methods (both leaf and non-leaf). Most of the work on the assembler (assembler_arm64.cc) has been done. Some work on the LIR generation layer (functions such as OpRegRegImm & friends) is still necessary. The register allocator still needs to be adapted to the A64 instruction set (it is mostly unchanged from the arm backend). Offsets for helpers in gen_invoke.cc still need to be changed to work on 64-bit. Change-Id: I388f99eeb832857981c7d9d5cb5b71af64a4b921
* Replace the bool kDoReadBarrier template parameter with an enum.Hiroshi Yamauchi2014-05-011-0/+1
| | | | | | | | | Fix one kDoReadBarrier/kIsVolatile mixup in an Object::GetFieldObject call. Bug: 12687968 Change-Id: I896b1137b21a20c0504abd2bf3fe6f83805f3300
* Refactor space bitmap to support different alignments.Mathieu Chartier2014-04-141-3/+4
| | | | | | | | | | | 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
* Merge "Insert an empty read barrier call."Hiroshi Yamauchi2014-04-041-1/+1
|\
| * Insert an empty read barrier call.Hiroshi Yamauchi2014-04-031-1/+1
| | | | | | | | | | Bug: 12687968 Change-Id: Ie1d28658e16e09f6a983cb5c1f0d5b375b7ae069
* | Make frame size dependent on arch-specific constants.Andreas Gampe2014-04-031-0/+8
|/ | | | | | Necessary for proper cross-compiling. Change-Id: I852901ee6ca5121e480b83a8e318bdc9c7d615e8
* Make the support code for read barriers a bit more general.Hiroshi Yamauchi2014-03-311-4/+12
| | | | | | | Add an option for Baker in addition to Brooks. Bug: 12687968 Change-Id: I8a31db817ff6686c72951b6534f588228e270b11
* AArch64: Add arm64 runtime support.Stuart Monteith2014-03-191-0/+4
| | | | | | | | | Adds support for arm64 to ART. Assembler stubs are sufficient for down calls into interpreter. JNI compiler and generics are not finished. Basic Generic JNI functionality. Change-Id: I4a07c79d1e037b9f5746673480e32cf456867b82
* Make heap reference poisoning work with the interpreter.Hiroshi Yamauchi2014-03-051-0/+3
| | | | | | | It is disabled by default. Bug: 12687968 Change-Id: Iee0cad647f341a7b566f4cf74c2770d1c19312c9
* (Experimental) Add Brooks pointers.Hiroshi Yamauchi2014-02-251-0/+7
| | | | | | | | | This feature is disabled by default. Verified that the Brooks pointers are installed correctly by using the CMS/SS collectors. Change-Id: Ia9be9814ab6e29169ac85edc4792ce8c81d552a9
* Object model changes to support 64bit.Ian Rogers2014-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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
* Use direct class pointers at allocation sites in the compiled code.Hiroshi Yamauchi2014-01-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | - Rather than looking up a class from its type ID (and checking if it's resolved/initialized, resolving/initializing if not), use direct class pointers, if possible (boot-code-to-boot-class pointers and app-code-to-boot-class pointers.) - This results in a 1-2% speedup in Ritz MemAllocTest on Nexus 4. - Embedding the object size (along with class pointers) caused a 1-2% slowdown in MemAllocTest and isn't implemented in this change. - TODO: do the same for array allocations. - TODO: when/if an application gets its own image, implement app-code-to-app-class pointers. - Fix a -XX:gc bug. cf. https://android-review.googlesource.com/79460/ - Add /tmp/android-data/dalvik-cache to the list of locations to remove oat files in clean-oat-host. cf. https://android-review.googlesource.com/79550 - Add back a dropped UNLIKELY in FindMethodFromCode(). cf. https://android-review.googlesource.com/74205 Bug: 9986565 Change-Id: I590b96bd21f7a7472f88e36752e675547559a5b1
* Enable moving classes.Mathieu Chartier2013-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Compact zygote.Mathieu Chartier2013-11-221-22/+22
| | | | | | | | | | | | | | | | | | | | | We now start out using the bump pointer allocator and switch to the free list collector (ROSAlloc) after the zygote forks. Before compaction: Zygote size: 9060352 After compaction Zygote size: 8425864 The main reason the size doesn't reduce more is that most of the zygote space is non-movable objects allocated by VMRuntime.newNonMovableObject. The objects which are non-movable but could be movable include around 10000 classes and some number of fields and methods. Bug: 8981901 Change-Id: Iea21b70fb7af27cb7e92d72070d278a5cd4026ac
* Fix portable + mips build.Mathieu Chartier2013-11-121-1/+7
| | | | Change-Id: Ia200e582b04c84973281e12331777351feb8a401
* Compacting collector.Mathieu Chartier2013-11-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Omit OatMethodOffsets for classes without compiled codeBrian Carlstrom2013-10-281-10/+10
| | | | Change-Id: If0d290f4aebc778ff12d8fed017c270ad2ac3220
* Fix multiple inclusion guards to match new pathnamesBrian Carlstrom2013-07-171-3/+3
| | | | Change-Id: Id7735be1d75bc315733b1773fba45c1deb8ace43
* Create separate Android.mk for main build targetsBrian Carlstrom2013-07-121-0/+78
The runtime, compiler, dex2oat, and oatdump now are in seperate trees to prevent dependency creep. They can now be individually built without rebuilding the rest of the art projects. dalvikvm and jdwpspy were already this way. Builds in the art directory should behave as before, building everything including tests. Change-Id: Ic6b1151e5ed0f823c3dd301afd2b13eb2d8feb81