summaryrefslogtreecommitdiffstats
path: root/runtime/gc
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix valgrind heap_test.Hiroshi Yamauchi2015-03-131-7/+9
| | | | | | | | | | | | | | Copy the exact object size rather than the aligned size to avoid valgrind errors in the zygote compact collector. Change-Id: I260b8901f96fb4c0937a1a5237120b56f6858b7a
* | Exercise Heap::PreZygoteFork() in a test.Hiroshi Yamauchi2015-03-131-0/+12
|/ | | | Change-Id: If41c931ffdbb0310536799b4515557770f2cd4b9
* Merge "ART: correct native bytes allocated in RegisterNativeAllocation"Mathieu Chartier2015-03-121-0/+2
|\
| * ART: correct native bytes allocated in RegisterNativeAllocationLin Zang2015-03-121-0/+2
| | | | | | | | | | | | | | | | Fix the issue that in RegisterNativeAllocation the new_native_bytes_allocated was not updated after Runfinalization, which may cause unnecessary GC. Change-Id: Icbbc0d1cbcd7b1b8e42576104de69c8ff3afa745 Signed-off-by: Lin Zang <lin.zang@intel.com>
* | Fix CC collector boot.Hiroshi Yamauchi2015-03-111-2/+2
|/ | | | | | | Avoid a DCHECK failure that the semi space collector isn't initialized at the pre-zygote fork time when the CC collector is used. Change-Id: If35707b241be05a341abb11ba51fbd0bc222d219
* Rosalloc thread local allocation path without a cas.Hiroshi Yamauchi2015-03-1134-279/+726
| | | | | | | | | Speedup on N4: MemAllocTest 3044 -> 2396 (~21% reduction) BinaryTrees 4101 -> 2929 (~26% reduction) Bug: 9986565 Change-Id: Ia1d1a37b9e001f903c3c056e8ec68fc8c623a78b
* Only allocate collectors if we may use themMathieu Chartier2015-03-062-12/+30
| | | | | | | | | | | | | | | | | | I believe most of the savings come from not allocating the concurrent copying 8MB MarkQueue. Before AOSP hh native PSS: 72653 kB: Native 72998 kB: Native 72882 kB: Native After AOSP hh native PSS: 64823 kB: Native 65986 kB: Native 64219 kB: Native Bug: 17643507 Change-Id: Ic5a8e753beca36142c1bf36be6311051f7c78e47
* Fix some incorrect IsCompiler instead of IsAotCompilerMathieu Chartier2015-03-051-1/+1
| | | | | | | Fixes jdwp related issues (DDMS) when JIT is enabled. Bug: 19623297 Change-Id: I36139c70a97b529135febcf01b227e7ab9affacc
* Reserve bits in the lock word for read barriers.Hiroshi Yamauchi2015-03-033-12/+2
| | | | | | | | | This prepares for the CC collector to use the standard object header model by storing the read barrier state in the lock word. Bug: 19355854 Bug: 12687968 Change-Id: Ia7585662dd2cebf0479a3e74f734afe5059fb70f
* Add support for .bss section in oat files.Vladimir Marko2015-03-0212-20/+27
| | | | Change-Id: I779b80b8139d9afdc28373f8c68edff5df7726ce
* Merge "Change card cache mod-union table to use bitmaps"Mathieu Chartier2015-02-268-79/+838
|\
| * Change card cache mod-union table to use bitmapsMathieu Chartier2015-02-268-79/+838
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously used card sets, using bitmaps saves memory and slightly increases performance. Added mod union table test. Performance EvaluateAndApplyChanges (minimal changes): Before (card cache image mu table): UpdateAndMarkImageModUnionTable: Avg: 524.320us ImageModUnionClearCards: Avg: 54.580us Native PSS: ~67500kB After (card cache image mu table): UpdateAndMarkImageModUnionTable: Avg: 515.600us ImageModUnionClearCards: Avg: 53.780us Native PSS: ~66014kB Native PSS was higher before since the mod_union_table->SetCards() which happens pre zygote fork was allocating a large amount of std::nodes. Bug: 11859910 Change-Id: I956b7e51d5572feec1393ffa618b7b7d8c147b28
* | Add standard gc log for transition collections.Hiroshi Yamauchi2015-02-262-16/+28
|/ | | | | | | | | Factor out the gc log logic into a function. Note we still don't log in background as before but do for things like OOME compactions in foreground. Change-Id: Ifd35a796cf26aba2fba83bf07e72902357d91f8b
* Revert "Revert "Add JIT""Mathieu Chartier2015-02-242-2/+2
| | | | | | | | Added missing EntryPointToCodePointer. This reverts commit a5ca888d715cd0c6c421313211caa1928be3e399. Change-Id: Ia74df0ef3a7babbdcb0466fd24da28e304e3f5af
* Revert "Add JIT"Nicolas Geoffray2015-02-242-2/+2
| | | | | | | | | | | | | | | Sorry, run-test crashes on target: 0-05 12:15:51.633 I/DEBUG (27995): Abort message: 'art/runtime/mirror/art_method.cc:349] Check failed: PcIsWithinQuickCode(reinterpret_cast<uintptr_t>(code), pc) java.lang.Throwable java.lang.Throwable.fillInStackTrace() pc=71e3366b code=0x71e3362d size=ad000000' 10-05 12:15:51.633 I/DEBUG (27995): r0 00000000 r1 0000542b r2 00000006 r3 00000000 10-05 12:15:51.633 I/DEBUG (27995): r4 00000006 r5 b6f9addc r6 00000002 r7 0000010c 10-05 12:15:51.633 I/DEBUG (27995): r8 b63fe1e8 r9 be8e1418 sl b6427400 fp b63fcce0 10-05 12:15:51.633 I/DEBUG (27995): ip 0000542b sp be8e1358 lr b6e9a27b pc b6e9c280 cpsr 40070010 10-05 12:15:51.633 I/DEBUG (27995): Bug: 17950037 This reverts commit 2535abe7d1fcdd0e6aca782b1f1932a703ed50a4. Change-Id: I6f88849bc6f2befed0c0aaa0b7b2a08c967a83c3
* Add JITMathieu Chartier2015-02-232-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently disabled by default unless -Xjit is passed in. The proposed JIT is a method JIT which works by utilizing interpreter instrumentation to request compilation of hot methods async during runtime. JIT options: -Xjit / -Xnojit -Xjitcodecachesize:N -Xjitthreshold:integervalue The JIT has a shared copy of a compiler driver which is accessed by worker threads to compile individual methods. Added JIT code cache and data cache, currently sized at 2 MB capacity by default. Most apps will only fill a small fraction of this cache however. Added support to the compiler for compiling interpreter quickened byte codes. Added test target ART_TEST_JIT=TRUE and --jit for run-test. TODO: Clean up code cache. Delete compiled methods after they are added to code cache. Add more optimizations related to runtime checks e.g. direct pointers for invokes. Add method recompilation. Move instrumentation to DexFile to improve performance and reduce memory usage. Bug: 17950037 Change-Id: Ifa5b2684a2d5059ec5a5210733900aafa3c51bca
* Implement a simple count based boot marker.Narayan Kamath2015-02-211-9/+39
| | | | | | | | | | | | | We write the number of failed boots to the marker and only prune the dalvik cache if the number of consecutive failed boots is higher than a predefined threshold. Note that the code is forgiving of errors related to boot markers; we continue the boot process even if we're unable to create / write or flush the boot marker. bug: 19360096 Change-Id: Ia17c3b783318ddf43c9199d0f7f09c54a4176667
* Merge "ART: Fix RosAlloc Valgrind code"Andreas Gampe2015-02-201-5/+6
|\
| * ART: Fix RosAlloc Valgrind codeAndreas Gampe2015-02-201-5/+6
| | | | | | | | | | | | | | Large object verification needs to take the redzones into account when checking the page size. Change-Id: I0529e21d085e82f2c8a6d8552de1e7c1df3956bc
* | Merge "Revert "Do GC for alloc for unstarted runtimes""Mathieu Chartier2015-02-201-6/+2
|\ \ | |/ |/|
| * Revert "Do GC for alloc for unstarted runtimes"Mathieu Chartier2015-02-201-6/+2
| | | | | | | | | | | | | | | | Bug: 19451379 This reverts commit c0a7e2bb1609da40ec67cb7e00c918637c610897. Change-Id: Ib079e5ce1647fd44239f7f2f658b2c50d619fece
* | Merge "Do GC for alloc for unstarted runtimes"Mathieu Chartier2015-02-191-2/+6
|\|
| * Do GC for alloc for unstarted runtimesMathieu Chartier2015-02-191-2/+6
| | | | | | | | | | | | | | | | Currently, concurrent GC requests are ignored for unstarted runtimes. The new logic is to do a GC for alloc in RequestConcurrentGC if the runtime is not started. This reduces the java heap size in dex2oat. Change-Id: I8d4364a4e3537013b27390bb22a6f64aab58c924
* | ART: Check image size when openingAndreas Gampe2015-02-191-0/+14
|/ | | | | | | | The image file might have been truncated. In that case, reject loading the image space. Bug: 19398702 Change-Id: I8e46340fe1e05629704d6e3bae84caf8b0435125
* Merge "Clear thread local freed bits in RosAlloc::Run::InspectAllSlots"Mathieu Chartier2015-02-051-1/+8
|\
| * Clear thread local freed bits in RosAlloc::Run::InspectAllSlotsMathieu Chartier2015-02-041-1/+8
| | | | | | | | | | | | | | | | | | Previously we didn't take these bits into consideration. This could cause RosAlloc::Run::InspectAllSlots to inspect recently freed allocations as allocated. Bug: 19193521 Change-Id: I56b3c089e2a36098423261cda623fc834069f832
* | art: Try to fix parsed_options_test on the build serverIgor Murashkin2015-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | (It works fine locally because environment variables are defined differently) Also some minor cleanup elsewhere pointed out in the previous code review. Change-Id: I80650d2be6ce467b838db85eb130a0020d7c1480
* | Fix broken volantis buildIgor Murashkin2015-02-041-6/+5
| | | | | | | | Change-Id: Iedc1a94fd1ec4224b605b984c11cfcc8c1c510e3
* | Merge "art: Refactor RuntimeOptions/ParsedOptions"Igor Murashkin2015-02-044-7/+20
|\ \ | |/ |/|
| * art: Refactor RuntimeOptions/ParsedOptionsIgor Murashkin2015-02-044-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the RuntimeOptions to be a type-safe map (VariantMap, see runtime_options.h) and the ParsedOptions to delegate the parsing to CmdlineParser (see cmdline/cmdline_parser.h). This is the start of a command line parsing refactor, and may include more in the future (dex2oat, patchoat, etc). For more details of the command line parsing generator usage see cmdline/README.md Change-Id: Ic67c6bca5e1f33bf2ec60e2e3ff8c366bab91563
* | Merge "ART: checkpoint mechanism optimization"Hiroshi Yamauchi2015-02-033-5/+28
|\ \
| * | ART: checkpoint mechanism optimizationLei Li2015-02-033-5/+28
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GC thread and trim thread are both using checkpoint mechanism. GC thread will request java threads to mark their thread roots by themselves. Trim thread will request java threads to trim their jni local reference tables by themselves. The checkpint mechanism semantics is that the runnable java threads will run checkpoint function itself at safepoint, and finally the java threads and gc thread or trim thread is synchronized via barrier. If the java threads are not runnable, gc thread or trim thread will suspend them and then run their checkpoint functions one by one on behalf of them. If all the java threads are not runnable, then gc thread or trim thread will do all the work itself. In this case, there is no need synchronization. This will save unnecessary synchronization and thread state transitions. Change-Id: If55940946cb3f8b1af42c7237c334f09c8ec7a9f
* / Clean up enums in RegionSpace.Hiroshi Yamauchi2015-01-304-134/+128
|/ | | | | | | | | | | | | | Split enum RegionState into two enums, RegionState and RegionType. Merge the latter with SubSpaceType. Use RefToRegionUnlocked in RegionSpace::AddLiveBytes. Turn some CHECKs into DCHECKs. Improve the Ritz EAAC run time and the GC time by ~20%. Bug: 12687968 Change-Id: Icdb8ab3e9ec2a1eefc8c9a2e4bb19befcf2562a6
* Merge "ART: reduce UpdateModUnionTable time for partial GC"Hiroshi Yamauchi2015-01-271-6/+12
|\
| * ART: reduce UpdateModUnionTable time for partial GCLei Li2015-01-231-6/+12
| | | | | | | | | | | | | | | | | | | | UpdateModUnionTable is to scan objects with dirty cards in the immune region. The immune region of partial GC are image space and zygote space. As image space is always immuned for any kind of GC, there is no need to scan dirty cards of zygote space pointing to image space for partial GC. Change-Id: I2e1f61c2b361985c211076a441418797abf324c2
* | Merge "ART: clear dirty cards of alloc space for MS/CMS partial and full GCs"Hiroshi Yamauchi2015-01-277-17/+47
|\ \
| * | ART: clear dirty cards of alloc space for MS/CMS partial and full GCsLei Li2015-01-267-17/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | For MS/CMS partial and full GCs, we could clear the dirty cards of alloc space when we process cards as we care about the dirty cards after GC starts. Change-Id: I1f9b32b20d75979387bc5d26b0cf9a256dcf20b6 Signed-off-by: Lei Li <lei.l.li@intel.com>
* | | Merge "Change AtomicStack to use StackReference"Mathieu Chartier2015-01-2611-97/+127
|\ \ \ | |/ / |/| |
| * | Change AtomicStack to use StackReferenceMathieu Chartier2015-01-2511-97/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously used Object*, using StackReference saves memory on 64 bit devices. Bug: 12935052 Bug: 17643507 Change-Id: I035878690054eeeb24d655a900b8f26c837703ff
* | | ART: Fix new[] / delete mismatchAndreas Gampe2015-01-231-1/+1
|/ / | | | | | | | | | | | | The type of the unique_ptr in MarkQueue should be an array type, as it is holding an array, actually. Change-Id: If1d05a1d52cd58a373f240f7156fc69b70324298
* | More of the concurrent copying collector.Hiroshi Yamauchi2015-01-2318-43/+3524
| | | | | | | | | | Bug: 12687968 Change-Id: I62f70274d47df6d6cab714df95c518b750ce3105
* | Merge "ART: clear dirty cards of alloc space in pause phase"Mathieu Chartier2015-01-234-10/+33
|\ \
| * | ART: clear dirty cards of alloc space in pause phaseLei Li2015-01-224-10/+33
| |/ | | | | | | | | | | | | | | | | Clear the dirty cards of alloc spaces when scanning them in pause phase, the dirty cards of image or zygote space will not be cleared in order to track the references to the other spaces. Change-Id: I519f071d954a589aa33dbce0cdba405f2d2cef71 Signed-off-by: Lei Li <lei.l.li@intel.com>
* / Clean up the locks around Heap::VisitObjects().Hiroshi Yamauchi2015-01-202-21/+44
|/ | | | | | | | This is so that we could support suspending all threads when visiting objects in the presence of a concurrent, moving collector. Bug: 12687968 Change-Id: Icc8e60630465afde948ebc6ea91d4ebaff5d7837
* Print more info in MarkSweep::VerifyRootMathieu Chartier2015-01-157-45/+30
| | | | | | | | | | | | | | | | | | | | | | | Refactored old root callback to use a new class called RootInfo. RootInfo contains all the relevant info related to the root associated with the callback. The MarkSweep::VerifyRoot function now uses this info to print the StackVisitor's described location if the GC root is of the type kRootJavaFrame. Some other cleanup. Example output: E/art (12167): Tried to mark 0x123 not contained by any spaces E/art (12167): Attempting see if it's a bad root E/art (12167): Found invalid root: 0x123 with type RootJavaFrame E/art (12167): Location=Visiting method 'void java.lang.Runtime.gc()' at dex PC 0xffffffff (native PC 0x0) vreg=0 (cherry picked from commit 12f7423a2bb4bfab76700d84eb6d4338d211983a) Bug: 18588862 Change-Id: Ic5a2781f704e931265ffb3621c2eab4b2e25f60f
* ART: Allow scoped adjustments to log verbosityAndreas Gampe2015-01-151-0/+3
| | | | | | | | | Add ScopedLogSeverity to adjust the logging level. Suppress warnings by default in gtests. Suppress errors in instances where errors are expected. Change-Id: If3ef865813e9505ab60bc90baed63ff11d90afbb
* Follow up on CL 122665.Hiroshi Yamauchi2015-01-131-7/+13
| | | | | | | | | | | | | | | | | | We now do the two-step memory protection strategy (first protect the from space with PROT_READ and later protect it with PROT_NONE) only if the from space is a rosalloc space (excluding the more common bump pointer space case). This strengthens the GC verification for the bump pointer space case as we avoid the case where mutators run while the from space is PROT_READ rather than PROT_NONE. Add a command line flag to override the minimum interval for the hspace compaction for OOM and set it to zero in the gcstress/gcverify run-tests to run the hspace compaction more frequently in tests. Fix some comments. Bug: 18960494 Change-Id: I518b011e026f578e53c4ec269cfb82865b0fae68
* Merge "[WIP] Fix a rosalloc verification crash."Hiroshi Yamauchi2015-01-102-5/+10
|\
| * [WIP] Fix a rosalloc verification crash.Hiroshi Yamauchi2015-01-092-5/+10
| | | | | | | | | | Bug: 18960494 Change-Id: Ia7a11f06b3fc8207f6304ae881539251d6b1de24
* | Add clamp growth limitMathieu Chartier2015-01-085-1/+39
|/ | | | | | | | | | 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