summaryrefslogtreecommitdiffstats
path: root/runtime
Commit message (Collapse)AuthorAgeFilesLines
* Fix histogram test.Mathieu Chartier2013-11-201-5/+5
| | | | | | | The test compares outputted strings for some reason. Forgot to run it earlier. Change-Id: I9eed08350d0122614cb2e18ca7195e5dc0832da6
* Merge "Fix memory leak caused by not adding lage objects to allocation ↵Mathieu Chartier2013-11-201-2/+2
|\ | | | | | | stack." into dalvik-dev
| * Fix memory leak caused by not adding lage objects to allocation stack.Mathieu Chartier2013-11-201-2/+2
| | | | | | | | | | | | | | Large objects weren't being added to allocation stack. This was causing them to never be marked as live and therefore never freed. Change-Id: Ie84e3cd7a417a89870752cb21bd7d562c3427284
* | Improve histogram and timing logger dumping.Mathieu Chartier2013-11-204-24/+52
|/ | | | | | | | | | | We now dump the sum (total time) of each histogram as well as previous stats. This is useful for the GC since the same split can occur multiple times per GC iteration. Also did a few memory optimizations by changing the map in the cumulative loggers to be a set. Bug: 11789200 Change-Id: I67bcc5384200924c8dc5d9eebcff077ce72b7e57
* Set array length before fence in allocation code path.Mathieu Chartier2013-11-203-21/+31
| | | | | | | | | Could not delete SetLength since it is required by space_test. Bug: 11747779 Change-Id: Icf1ead216b6ff1b519240ab0d0ca30d68429d5b6
* Merge "Add Valgrind rosalloc support." into dalvik-devHiroshi Yamauchi2013-11-203-78/+82
|\
| * Add Valgrind rosalloc support.Hiroshi Yamauchi2013-11-203-78/+82
| | | | | | | | | | Bug: 9986565 Change-Id: Ibd2ba5e8b4fb7f2ed6c133a4b556a6dbb15a2f5e
* | Merge "Refactor allocation entrypoints." into dalvik-devMathieu Chartier2013-11-2037-1063/+651
|\ \
| * | Refactor allocation entrypoints.Mathieu Chartier2013-11-2037-1063/+651
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Move single-step control into thread." into dalvik-devSebastien Hertz2013-11-204-128/+154
|\ \ \ | |_|/ |/| |
| * | Move single-step control into thread.Sebastien Hertz2013-11-194-128/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL moves single-step control into the Thread structure. This is stored in Thread::single_step_control_ member. This allows to support single-stepping of multiple threads at the same time. Since each thread holds its single-step information, we no longer need to use the breakpoint lock to support single-stepping. It helps reduce lock contention on this lock while debugging. All JDWP tests passed on the host and on the target with this CL. Bug: 11667502 Change-Id: I886d5c8c625ca5a072803e296c32eec5f7e9e82d
* | | Merge "Add support for JDWP METHOD_EXIT_WITH_RETURN_VALUE events." into ↵Jeff Hao2013-11-194-30/+62
|\ \ \ | |_|/ |/| | | | | dalvik-dev
| * | Add support for JDWP METHOD_EXIT_WITH_RETURN_VALUE events.Jeff Hao2013-11-194-30/+62
| | | | | | | | | | | | | | | Bug: 11569539 Change-Id: Ibc7a80df83470ffd726d73695a05f4938248f292
* | | Enable rosalloc by default.Hiroshi Yamauchi2013-11-191-1/+1
| | | | | | | | | | | | | | | Bug: 9986565 Change-Id: I485341d30a21704ddbc45d8f531ef5593a358bb5
* | | Merge "Fix a per-process dumpsys meminfo crash." into dalvik-devHiroshi Yamauchi2013-11-196-39/+33
|\ \ \
| * | | Fix a per-process dumpsys meminfo crash.Hiroshi Yamauchi2013-11-186-39/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the InvalidateAllocator() function, DlMallocSpace and RosAllocSpace both null out the underlying allocator pointer at the zygote fork time so that new allocations won't accidentally happen in the zygote space after a zygote fork. However, nulling out the only allocator pointer would cause crashes in non-allocation uses such as GetFootprint() in this particular crash. Fix this by creating a second pointer just for the allocation purpose that gets nulled upon a InvalidateAllocator() call while the original pointer keeps pointing to the allocator. Change-Id: Ie751d9380db39baace9e25712a3824eec9a9969a
* | | | Merge "Propagate 'this_object' for method unwind event." into dalvik-devSebastien Hertz2013-11-195-8/+12
|\ \ \ \
| * | | | Propagate 'this_object' for method unwind event.Sebastien Hertz2013-11-195-8/+12
| | |_|/ | |/| | | | | | | | | | | | | | | | | | Propagates the 'this_object' to InstrumentationListener::MethodUnwind callback. Change-Id: I12561f1a611b8399b94e669f9b8a6eaaf1a58631
* | | | Avoid unnecessary copy of dex_gc_map.Vladimir Marko2013-11-192-35/+23
| | | | | | | | | | | | | | | | Change-Id: I8a7209d92aeee853f6a4e9e9bb0e094c5acd5e05
* | | | Remove a LOG(INFO) that's probably forgot to be removed.Hiroshi Yamauchi2013-11-181-1/+0
| |/ / |/| | | | | | | | | | | | | | | | | I see lots of log lines "Parsing features " in tests. I assume this isn't intended to be left there. Change-Id: Icfcb5421ed72e86160c24230b1418de19e230376
* | | Fix cpplint errors.Hiroshi Yamauchi2013-11-183-8/+8
| | | | | | | | | | | | Change-Id: I21f7423ebe69a77d456b0d318de73448489d2df4
* | | Merge "A custom 'runs-of-slots' memory allocator." into dalvik-devHiroshi Yamauchi2013-11-1829-391/+3377
|\ \ \ | |_|/ |/| |
| * | A custom 'runs-of-slots' memory allocator.Hiroshi Yamauchi2013-11-1629-391/+3377
| | | | | | | | | | | | | | | Bug: 9986565 Change-Id: I0eb73b9458752113f519483616536d219d5f798b
* | | Merge "Rewrite intrinsics detection." into dalvik-devVladimir Marko2013-11-182-4/+9
|\ \ \
| * | | Rewrite intrinsics detection.Vladimir Marko2013-11-182-4/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Intrinsic methods should be treated as a special case of inline methods. They should be detected early and used to guide other optimizations. This CL rewrites the intrinsics detection so that it can be moved to any compilation phase. Change-Id: I4424a6a869bd98b9c478953c9e3bcaf1c6de2b33
* | | Merge "Fix missing class initialization during instrumentation." into dalvik-devSebastien Hertz2013-11-182-8/+19
|\ \ \ | |/ / |/| |
| * | Fix missing class initialization during instrumentation.Sebastien Hertz2013-11-152-8/+19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Static methods (except the <clinit>) all point to the resolution trampoline to handle class initialization. When we enable instrumentation, we update the entry point to the instrumentation stub. But doing so makes us miss the call into the trampoline. This CL fixes this issue by leaving the resolution trampoline. Once a method's class is initialized, we update all its static methods' entry point. When instrumentation is enabled, this entry point becomes the instrumentation entry stub. This also allows to post method enter events in the right order during static invokes. First, we get into the trampoline which call the method's class <clinit> method and post the corresponding "method enter" event. Then we get into the instrumentation entry stub of the static method being called and post the corresponding "method enter" event before getting into its code. Bug: 11686442 Change-Id: I202db921225c8be0b2191074d09b0ba40f9248b2
* | Merge "Temporary fix for target tests." into dalvik-devMathieu Chartier2013-11-151-0/+2
|\ \
| * | Temporary fix for target tests.Mathieu Chartier2013-11-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Avoid a race in pthread_join which causes us to free the memmap stack before it is done being used. Bug: 11693195 Change-Id: Ic453359cebc7395e10e83319aa25528b8d1f3882
* | | Refactor reference queues.Mathieu Chartier2013-11-159-516/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored the reference queue processing to reside in the heap code. This removes significant code duplication in the semispace and marksweep garbage collectors. Changed the soft reference behaviour to preserve all soft references unless the GC requires them to be cleared to avoid an out of memory error. It may be worth investigating a better heuristic in the future to preserve soft references by LRU order. Change-Id: I1f3ff5bd4b3c5149271f4bb4fc94ba199e2f9bc2
* | | LEB128 tests and performance measurements.Ian Rogers2013-11-144-22/+22
| | | | | | | | | | | | Change-Id: I1850a2ff9225cfab8f896619c212b1b55f03ae94
* | | Merge "Put arguments first in debugger variable table and fix name bug." ↵Jeff Hao2013-11-142-33/+32
|\ \ \ | | | | | | | | | | | | into dalvik-dev
| * | | Put arguments first in debugger variable table and fix name bug.Jeff Hao2013-11-142-33/+32
| |/ / | | | | | | | | | | | | | | | Bug: 11569468 Change-Id: I63d45427ded0937c3ab2456fe5cec22da5558e53
* | | Merge "Fix memory leaks relating to timing logger." into dalvik-devIan Rogers2013-11-149-92/+83
|\ \ \
| * | | Fix memory leaks relating to timing logger.Ian Rogers2013-11-149-92/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 11670287. We use pointers to uninitialized values for control-flow in the timing logger code, add TODO comments to clean this up later. Remove base namespace and other bits of tidying. Change-Id: I1e6600a1e92f974c8f58f3a405a4e4abb4d9f80f
* | | | Make exceptions use of LEB decoder valgrind clean.Ian Rogers2013-11-141-16/+18
|/ / / | | | | | | | | | | | | Bug: 11670287 Change-Id: I0c11c710d03e08559e0032bf602cf7cf13c92da9
* | | Fix memory leak of verifier small precise constants.Ian Rogers2013-11-141-2/+2
| |/ |/| | | | | Change-Id: Icaabb2061916daeaba66f1f012b6e79f7f3318e6
* | Merge "Add missing field initialization in mark sweep." into dalvik-devIan Rogers2013-11-141-0/+1
|\ \
| * | Add missing field initialization in mark sweep.Ian Rogers2013-11-131-0/+1
| | | | | | | | | | | | Change-Id: Ied7deb35c1f1d975ef44c7b425128e0349ee44b0
* | | Avoid reading off the end of empty mapping tables.Ian Rogers2013-11-131-4/+8
|/ / | | | | | | | | | | | | Caught by valgrind. Bug: 11670287 Change-Id: Ia5feacd6780e8e32c7ed600b5908c0b7d7ed7343
* | Merge "Use a UniquePtr to clean up global logging std::string*s." into ↵Ian Rogers2013-11-141-11/+14
|\ \ | | | | | | | | | dalvik-dev
| * | Use a UniquePtr to clean up global logging std::string*s.Ian Rogers2013-11-131-11/+14
| | | | | | | | | | | | | | | | | | | | | This makes valgrind happier. Bug: 11670287 Change-Id: I957b94cdc177665e66b069e4d2b2b8d0a4b589c8
* | | Merge "Fix libart.do boot check failure (b/11679102)." into dalvik-devHiroshi Yamauchi2013-11-141-0/+1
|\ \ \ | |_|/ |/| |
| * | Fix libart.do boot check failure (b/11679102).Hiroshi Yamauchi2013-11-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The zygote space's limit should be updated as ContinuousSpace::HasAddress() uses the limit, instead of the end, as the range end of the space https://googleplex-android-review.git.corp.google.com/365173. Bug: 11679102 Change-Id: Ie02a6b858145847e7ede76b6801ce0af5c71297d
* | | Manually manage thread pool stacks.Mathieu Chartier2013-11-135-18/+25
|/ / | | | | | | | | | | | | | | | | | | | | | | We now allocate the thread pool worker stack using a MemMap. This enables us to name the maps so that we get more descriptive output for debugging leaks. Appears to fix the mips build 5/5 successful clean-oat and builds. This is probably since glibc caches up to 40 MB of thread stacks before releasing them. Change-Id: I1df2de50cb95838aa0d272a09807021404ba410c
* | Add more logging when mmap fails.Mathieu Chartier2013-11-131-3/+4
|/ | | | | | We now print the reason that the mmap failed. Change-Id: Ie515e4bba117c9ea1f4297abb826d32172bea962
* Fix remaining mips build issues.Mathieu Chartier2013-11-121-3/+3
| | | | | | Missed a few things in mutex.cc. Change-Id: I1c3acfc5faa2511490170199c03ab74c1f23022a
* Fix portable + mips build.Mathieu Chartier2013-11-124-7/+14
| | | | Change-Id: Ia200e582b04c84973281e12331777351feb8a401
* Merge "Compacting collector." into dalvik-devMathieu Chartier2013-11-1399-1700/+3601
|\
| * Compacting collector.Mathieu Chartier2013-11-1199-1700/+3601
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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