summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dalvik/vm: Dalvik startup with a low memory footprintcm-10.1.3cm-10.1Vijay Dandiga2013-08-132-15/+44
| | | | | | | | | | | Initialize concurrentStartBytes and createMspace using HEAP_MIN_FREE. This helps save Android framework memory after boot. This is for low memory targets only(~512MB RAM & hdpi resolution) Also, set TARGET_ARCH_LOWMEM in the BoardConfig.mk file of a device for this patch to take effect. Change-Id: Ib164c5eaf3236fe2de2697e84de4ee85f8997e94
* JIT: Combine add with shift and offset for array load & store.cm-10.1.3-RC2cm-10.1.3-RC1Anders O Nilsson2013-07-234-143/+294
| | | | | | | | | | | | | | | | Optimize long and double array load / store for ARM JIT. Array load / store performs a logical shift left and add, replace it with add capable of performing shift in the same instruction. Array load / store performs an add instead of using offset for vldr/vstr. Replace the add and vldr/vstr with a vldr/vstr that is capable of handling offset. This improves performance for usecases involving long and double array code execution in Dalvik. E.g WindowOrientation. Change-Id: I90220c349ab936cdba1987139ccdf4dc31d7bbb0 Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Combine add with shift.Anders O Nilsson2013-07-232-0/+134
| | | | | | | | | | | | | Optimize logical shift for ARM JIT. Whenever logical shift is followed by an add, try to replace it with an add capable of performing the shift in the same instruction. This improves performance for usecases involving code executing in Dalvik. Change-Id: I3cb807b6d6ef4b053a19e2703676a93a930eb963 Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Hoist loop load operations above loop.Henrik Smiding2013-07-233-1/+211
| | | | | | | | | | Hoists Dalvik frame load operations outside of loops, when possible. This improves performance in most loops, and is noticable in many applications. Change-Id: Ibe42b509b50a13f19758fd923f31d703e33a51c6 Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com> Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Use rsb and shift in easy multiply.Anders O Nilsson2013-07-235-4/+23
| | | | | | | | | | | For easy multiplication using reverse subtract (when lit is 2^n-1) use the barrel shifter for rsb. This improves arithmetic performance for code executing in Dalvik. E.g String.hashCode. Change-Id: Ifb086dcec344b30fd3e392ac21d508b43e820cdc Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Combine shift & sub for monitor unlock.Anders O Nilsson2013-07-231-2/+1
| | | | | | | | | | | | | Optimize monitor unlock for ARM Thumb2 JIT. Monitor unlock performs a logical shift left and sub, replace it with a sub capable of performing the shift in the same instruction. This improves performance for usecases involving code executing in Dalvik. Change-Id: Iaf062d750c3bc941926f3c3b8a64dc9c7984a477 Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Allow use of cbz/cbnz for conditional branch gen.Anders O Nilsson2013-07-231-4/+2
| | | | | | | | | | | | Optimize conditional branch generation when comparing with zero for ARM JIT. When possible use cbz/cbnz instead of cmp+beq/cmp+bne. This improves performance for usecases involving code execution in Dalvik. Change-Id: Iffd455d9cbb3ef0b1f87caafdae1b72ba3f0d2fc Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* debug: allow ability to hide GC freed lines in logcatTanguy Pruvot2013-07-201-1/+13
| | | | | | use setprop dalvik.vm.debug.alloc 0 to disable these noisy logs... Change-Id: I8692b941901b43d33ea9ee30c288a47b6a3be3b1
* dvm: Bring back the ANDROID_DATA overrideRicardo Cerqueira2013-06-051-1/+1
| | | | | | | This got broken by the split-cache patch, and it's impacting the CTS vm unit. Fixit. Change-Id: I602824afef19c92a4d2c1702d10c8f0315277227
* Revert all STE Dalvik performance patchesSteve Kondik2013-06-0111-732/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * At least one of these patches is problematic, and causing math errors for many users. * Let's revert for now, and continue to assist with debugging. Revert "JIT: Use vmla.f64 instead of vmuld + vaddd." This reverts commit 35267d8ed32dfd6572ee1e31cde0ca7c98ed31c7. Revert "JIT: Combine add with shift and offset for array load & store." This reverts commit 5c9e6726c29366b85dc4329809b2c48fe21f8ace. Revert "JIT: Combine shift & sub for monitor unlock." This reverts commit 38c38d95a58c590d753b56d059d71517af561fd1. Revert "JIT: Use rsb and shift in easy multiply." This reverts commit 76ed9c95be6e75ede85fc170cbd260ed97702f99. Revert "JIT: Combine add with shift." This reverts commit 102ab06911d86edcfb81c0343c20332313e4308b. Revert "JIT: Allow use of cbz/cbnz for conditional branch gen." This reverts commit d46b37eac79319da2c8bbdad1b6915aaba3e9cf5. Revert "JIT: Suppress loop suspend checks." This reverts commit 0723288f790e18669621b4f75803bbc4ff8e6bd5. Revert "JIT: Hoist loop load operations above loop." This reverts commit 8ef34ac433180181a9da57ac666a5ae171f0c682. Change-Id: Ifae34549ada90d6238a5839538eda8cb4a51ec33
* JIT: Use vmla.f64 instead of vmuld + vaddd.cm-10.1.0-RC4cm-10.1.0-RC3Anders O Nilsson2013-05-264-0/+74
| | | | | | | | | | | | Optimize Java double floating-point performance for ARM JIT. Whenever a double mul is followed with a double add, replace it with a combined mul and add instruction. This improves double arithmetic performance for code executing in Dalvik. Change-Id: Ia4fccf4fa53aa9fb4a76cbf388f5ea16dcef32b7 Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Combine add with shift and offset for array load & store.Anders O Nilsson2013-05-264-143/+294
| | | | | | | | | | | | | | | | | | | | Optimize long and double array load / store for ARM JIT. Array load / store performs a logical shift left and add, replace it with add capable of performing shift in the same instruction. Array load / store performs an add instead of using offset for vldr/vstr. Replace the add and vldr/vstr with a vldr/vstr that is capable of handling offset. This improves performance for usecases involving long and double array code execution in Dalvik. E.g WindowOrientation. Conflicts: vm/compiler/codegen/arm/Thumb/Gen.cpp vm/compiler/codegen/arm/Thumb2/Gen.cpp Change-Id: I90220c349ab936cdba1987139ccdf4dc31d7bbb0 Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Combine shift & sub for monitor unlock.Anders O Nilsson2013-05-261-2/+1
| | | | | | | | | | | | | Optimize monitor unlock for ARM Thumb2 JIT. Monitor unlock performs a logical shift left and sub, replace it with a sub capable of performing the shift in the same instruction. This improves performance for usecases involving code executing in Dalvik. Change-Id: Iaf062d750c3bc941926f3c3b8a64dc9c7984a477 Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Use rsb and shift in easy multiply.Anders O Nilsson2013-05-265-4/+23
| | | | | | | | | | | For easy multiplication using reverse subtract (when lit is 2^n-1) use the barrel shifter for rsb. This improves arithmetic performance for code executing in Dalvik. E.g String.hashCode. Change-Id: Ifb086dcec344b30fd3e392ac21d508b43e820cdc Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Combine add with shift.Anders O Nilsson2013-05-262-0/+110
| | | | | | | | | | | | | Optimize logical shift for ARM JIT. Whenever logical shift is followed by an add, replace it with an add capable of performing the shift in the same instruction. This improves performance for usecases involving code executing in Dalvik. Change-Id: I3cb807b6d6ef4b053a19e2703676a93a930eb963 Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Allow use of cbz/cbnz for conditional branch gen.Anders O Nilsson2013-05-261-4/+2
| | | | | | | | | | | | Optimize conditional branch generation when comparing with zero for ARM JIT. When possible use cbz/cbnz instead of cmp+beq/cmp+bne. This improves performance for usecases involving code execution in Dalvik. Change-Id: I8f7c44c87eb73d4da00a48fd86220a62cb0515f5 Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Suppress loop suspend checks.Henrik Smiding2013-05-263-6/+17
| | | | | | | | | | | | Suppresses the suspend checks generated by the JIT compiler, for small loops. This improves performance and code size of loops. Conflicts: vm/compiler/Loop.h Change-Id: I5df70422668eb53c7789899823586daeee265633 Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com> Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* JIT: Hoist loop load operations above loop.Henrik Smiding2013-05-263-1/+211
| | | | | | | | | | Hoists Dalvik frame load operations outside of loops, when possible. This improves performance in most loops, and is noticable in many applications. Change-Id: Ibe42b509b50a13f19758fd923f31d703e33a51c6 Signed-off-by: Henrik Smiding <henrik.smiding@stericsson.com> Signed-off-by: Patrik Ryd <patrik.ryd@stericsson.com>
* Fix JIT initialization racecm-10.1.0-RC2cm-10.1.0-RC1buzbee2013-05-021-0/+3
| | | | | | | | | | | | See b/8767735 Slow thread in thread spin test A race exists in thread creation/JIT initialization that can leave the JIT permanantly disabled for a thread (typically the first interpreter thread). (cherry-pick of 67985d960f5c877f86d0bba251d2d55c7a062b8d.) Change-Id: Ic7e3a1cde2833ac78455fa5d465156b5e0896fc1
* Fix JIT bug related to immediate doublesbuzbee2013-05-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change 256211 (JIT: Performance Fix for const doubles) introduced a defect that can cause the JIT to use the wrong floating point double constant in traces in which the following conditions hold: o Two (or more) different 64-bit floating point constants are used. o The physical register holding the first constant is still live at the time the second constant is used. o The low 32 bits of the two constants are identical. In this situation, the load/copy optimization pass will incorrectly determine that the two constants are the same, delete the load of the second constant and re-use the first constant value. Note: this problem only occurs with 64-bit floating point literals. 64-bit long literals are unaffected. This CL works around the problem, and a subsequent CL will rework disambiguation of 64-bit immediates in a somewhat cleaner fashion. (cherry-pick of c1757a6deab0ca0bfd42c38612d92b2f26c41dbe.) Change-Id: I795b4b753550d2745cbbdd83ae25f4a7088990f6
* Revert "Revert "JIT: Performance fix for const doubles""Steve Kondik2013-05-023-5/+65
| | | | This reverts commit 6799723387fe725e5418a83d2762539530a8835c.
* Remove dead instruction in common_exceptionThrown.Jeff Hao2013-04-119-9/+0
| | | | | | Addresses bug: https://code.google.com/p/android/issues/detail?id=43920 Change-Id: Ie735222db17b883416543ca5617b4f02fd8a8d76
* Fix a tracked reference leak in dvmGenerateProxyClass.Elliott Hughes2013-04-111-5/+4
| | | | | Bug: https://code.google.com/p/android/issues/detail?id=43919 Change-Id: Ib5c217368ba75f4422d0c932c2c67daaaeddea4b
* Remove stray references to non-existent opcodes.Elliott Hughes2013-04-115-12/+6
| | | | Change-Id: I83ca6ea12344a8df7ef14d600baf5060b76870f5
* Fix a Field.isAnnotationPresent crash.Elliott Hughes2013-04-111-7/+12
| | | | | | | | For instances of Proxy, generated at runtime, there is no corresponding .dex file. Bug: https://code.google.com/p/android/issues/detail?id=24846 Change-Id: I36da43d5279a61b8cb71cdf2bbc3065b6a979830
* Dump native stacks for all threads in native code.Elliott Hughes2013-04-111-10/+21
| | | | | Bug: 7432159 Change-Id: I83cb530155edfc35ae3be0f7a2a044245223d2d5
* Fix a minor leak in handleVM_CreateStringYou Kim2013-04-111-0/+1
| | | | Change-Id: I3273e5d2eb4621202837c43270a466fe056d6894
* Fix a minor leaks caused by failed initializations.(typo)You Kim2013-04-111-1/+3
| | | | Change-Id: I62bc3ea48938a4f54e9f47218d4025e954a6d566
* Fix a leak in Dalvik_dalvik_system_DexFile_openDexFileYou Kim2013-04-111-0/+1
| | | | Change-Id: I2b394c620af31914606763b35847b7f412774cf4
* Tiny optimization for complier templates for arm.You Kim2013-04-117-44/+44
| | | | | | | | | 1. Remove possible bubble in TEMPLATE_STRING_INDEXOF.S 2. Remove 1 instruction and reorder the opcodes TEMPLATE_MUL_LONG.S 3. Reorder ldr r2 instruction in TEMPLATE_RETURN.S Change-Id: I571c1278aa72cb1e6dbc6efe433932d5e9591b80
* GC triggering performance optimizationscm-10.1-M3cm-10.1-M2Wei Wang2013-02-223-8/+119
| | | | | | | Copy the correct starting heap size at process init. Interfaces to set GC/managed heap parameters. Change-Id: I1080ba60ae64d546c0f35925bc7c931b89c7600b
* Merge tag 'android-4.2.2_r1' of ↵mr1.1-stagingSteve Kondik2013-02-120-0/+0
|\ | | | | | | | | | | https://android.googlesource.com/platform/dalvik into 1.1 Android 4.2.2 release 1
| * am 51997559: Fail if the new index is out of range. do not merge.jwilson2013-01-021-0/+12
| |\ | | | | | | | | | | | | * commit '519975591eba13ae7ac4e494a0dfb88a34ca191b': Fail if the new index is out of range. do not merge.
| | * Fail if the new index is out of range. do not merge.jwilson2013-01-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were silently truncating, which made an obvious problem into a non-obvious one. Bug: http://code.google.com/p/android/issues/detail?id=40409 (cherry picked from commit 0a752f071fbbdfeab5dd9a230efe0f4f47b8cd94) Change-Id: I6adbe6309bdcb2882f0e5500d6e1e149d08dbd2d
| * | am b6f4e037: am afe3a013: (-s ours) am 288f2280: Revert "Fix alignment when ↵Yohann Roussel2012-11-120-0/+0
| |\| | | | | | | | | | | | | | | | | | | recompacting a DexMerger result. do not merge." * commit 'b6f4e0372154191bdf1ee32727aead1fe1200cbc': Revert "Fix alignment when recompacting a DexMerger result. do not merge."
| | * am afe3a013: (-s ours) am 288f2280: Revert "Fix alignment when recompacting ↵Yohann Roussel2012-11-120-0/+0
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | a DexMerger result. do not merge." * commit 'afe3a0131e75367759e1d7a69cec0aac2a45524c': Revert "Fix alignment when recompacting a DexMerger result. do not merge."
| | | * am 288f2280: Revert "Fix alignment when recompacting a DexMerger result. do ↵Yohann Roussel2012-11-071-1/+0
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not merge." * commit '288f22800c8fe1eb44afff78ec1fff815379183e': Revert "Fix alignment when recompacting a DexMerger result. do not merge."
| | | | * Revert "Fix alignment when recompacting a DexMerger result. do not merge."Yohann Roussel2012-11-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 707ebe9f1984f7b1ed2e3465012c7c0eb3ef2bd6 Looks like jb-dev is missing some other patches before it possible to cherry-pick this one. Change-Id: I8cbdd649d03696cb80be0dacc8640275468ef162
| * | | | am 437f58a5: am 2d2f13c5: (-s ours) am 707ebe9f: Fix alignment when ↵yroussel2012-11-120-0/+0
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | recompacting a DexMerger result. do not merge. * commit '437f58a5d25d76aa035c53e341e2516e39a70927': Fix alignment when recompacting a DexMerger result. do not merge.
| | * | | am 2d2f13c5: (-s ours) am 707ebe9f: Fix alignment when recompacting a ↵yroussel2012-11-120-0/+0
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DexMerger result. do not merge. * commit '2d2f13c50ba3c38dc4a8a8aaf483f6df155e0080': Fix alignment when recompacting a DexMerger result. do not merge.
| | | * | am 707ebe9f: Fix alignment when recompacting a DexMerger result. do not merge.yroussel2012-11-061-0/+1
| | | |\| | | | | | | | | | | | | | | | | | | | | * commit '707ebe9f1984f7b1ed2e3465012c7c0eb3ef2bd6': Fix alignment when recompacting a DexMerger result. do not merge.
| | | | * Fix alignment when recompacting a DexMerger result. do not merge.yroussel2012-11-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e0e7b076e427a327e27247aa409d0b0fa8b0e0aa) Change-Id: Ib8092bd9ce9ba5490040a41c5d604e6a138acc7d
| * | | | Reconcile with jb-mr1-release - do not mergeThe Android Open Source Project2012-11-120-0/+0
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: Ic0fb72b0939908c2e072e4ae5d60c9d24de9dc66
| * \ \ \ \ Merge f870f2d - do not mergeThe Android Open Source Project2012-11-125-9/+32
| |\ \ \ \ \ | | | |/ / / | | |/| | | | | | | | | Change-Id: Ib8ea0f0d579f78fcab1deca05ff1beac9ba9bc03
| | | | | |
| | \ \ \ \
| *-. \ \ \ \ Reconcile with jb-mr1-factory-release jb-mr1-release - do not mergeThe Android Open Source Project2012-11-060-0/+0
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia24bfd680910be16fa6f89fbd48db251b076d8f6
| | * | | | | | Revert the fix for incorrect package-private overriding.Elliott Hughes2012-10-151-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes FIFA 2012, the download portion of which relies on the old bug, without breaking instrumentation tests. The problem is that dexopt tries to quicken method calls, and gets confused by this case where the apparent static method resolution differs from the actual one at runtime, depending on the targetSdkVersion of the specific app. dexopt can't make an ahead-of-time decision in a world where the rules might change at runtime. Bug: 7301030 Bug: 7343420 Change-Id: Iaa15611f099546b7e54279cfd6abc9b4cdcb9812
| | * | | | | | merge in jb-mr1-factory-release history after reset to jb-mr1-devThe Android Automerger2012-10-150-0/+0
| | |\ \ \ \ \ \
| | | * \ \ \ \ \ merge in jb-mr1-factory-release history after reset to jb-mr1-devThe Android Automerger2012-10-120-0/+0
| | | |\ \ \ \ \ \
| | | | * \ \ \ \ \ merge in jb-mr1-factory-release history after reset to jb-mr1-devThe Android Automerger2012-10-100-0/+0
| | | | |\ \ \ \ \ \
* | | | | | | | | | | Zygote: Restrict slave mountspace so Dalvik apps can mount system-wide volumesMike Kasick2013-01-102-2/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android 4.2 implements multi-user storage using per-process mount namespaces. Originally, everything under "/" (the entire filesystem hierarchy) is marked as a recursive-slave mountspace for all zygote instances. This is done so that user-storage sandbox mounts under /storage/emulated are hidden from other apps and users. Unfortunately this means that any Dalvik app (actually, any program whose clone/fork ancestry includes a Dalvik zygote, which is everything except services spawned directly from init) cannot mount system-wide volumes. Thus, apps like CifsManager are effectively broken in Android 4.2, since its cifs mounts are only visible to the CifsManager app itself. All other apps see empty mountpoints instead of the mounted volume. Furthermore, Linux provides no provision for a process to "escape" a recursive-slave mountspace in versions prior to Linux 3.8 (setns syscall). Here, we restrict the slave mountspace to /storage (and, due to a possible kernel bug, /mnt/shell/emulated) so that Dalvik apps can mount system-wide volumes elsewhere (with appropriate permission, as in earlier versions of Android), while retaining full multi-user storage compatibility. This change requires that a tmpfs volume is mounted as /storage in init.rc. If this volume is unavailable, then Zygote falls back to the previous behavior of marking the entire filesystem hierarchy as slave. It also implicitly requires that EMULATED_STORAGE_TARGET is path-prefixed by (part of the subhierarchy of) ANDROID_STORAGE, which is the typical case.