Add support for the armv6j processor target

This is a squashed commit of the following from CM's froyo tree:

commit 66f7a572ecbd8a4126597779b7b4ee80a2899686
Author: Koushik Dutta <koushd@gmail.com>
Date:   Tue Sep 14 11:51:25 2010 -0700

    Rebuild generated files prior to changing armv5te to arvm6j.

commit c87698a189cc369ce398080e91cd6f4037e19c38
Author: Koushik Dutta <koushd@gmail.com>
Date:   Tue Sep 14 11:47:56 2010 -0700

    This breaks hero and heroc.

    Revert "Enable armv6 support for armv5te (MSM7200A) arch"

    This reverts commit 4d013250edb74e4141ed6a4479fd8d6b9a035134.

commit cc20774d7e153447445c1de0b25a4d5bba25a53c
Author: Koushik Dutta <koushd@gmail.com>
Date:   Sun Dec 19 03:42:11 2010 +0000

    Add support for armv6j for MSM7200A boards.

commit d18d6f8f2ba384b0b90ca887711af585521f809d
Author: Alex Boag-Munroe <boagenator@gmail.com>
Date:   Sun Aug 22 15:44:26 2010 +0100

    Enable armv6 support for armv5te (MSM7200A) arch

Change-Id: I5119806667bf3aeddf62ff2b9a7678ad12773d2d
Add support for the armv6-vfp processor target

This is a squashed commit of the following from CM's froyo tree:

commit 05e32f9502d357d4cdc419d589ab4252f153da1f
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Tue Nov 9 01:27:18 2010 +0000

    dalvik: Finish armv6-vfp support

commit 39d5cf768028ecad60a2c8f5252dc8b79c96bcc8
Author: Gary King <gking@nvidia.com>
Date:   Wed Nov 18 14:07:21 2009 -0800

    dalvik: add support for armv6-vfp processor target

    adds specialized support for ARMv6 w/ VFP to the Dalvik interpreter

and, in addition: Do some minor updates necessary for gingerbread,
mostly deleting unused variables to fix these:

cc1: warnings being treated as errors
dalvik/vm/mterp/out/InterpC-armv6-vfp.c: In function 'dvmMterpDumpArmRegs':
dalvik/vm/mterp/out/InterpC-armv6-vfp.c:1232: error: unused variable 'glue'
dalvik/vm/mterp/out/InterpC-armv6-vfp.c:1235: error: unused variable 'method
dalvik/vm/mterp/out/InterpC-armv6-vfp.c:1227: error: unused variable 'dvmAsm

Change-Id: I929bb74b0f72ffd2c7ef498b5b76fe800b2c7c66
Fix armv6j codegen templates

These weren't building due to the lack of some new definitions for
gingerbread

Change-Id: I083c447f85f9b20d12937d8560b9479c3129761e
DexOpt anything in /system on /cache

Change-Id: I24d77e263df1cf86c4d45174a654edabe0ecd9a5

Allow system property to disable use of /cache for dexfiles.
Merge branch 'gingerbread' of git://android.git.kernel.org/platform/dalvik into 233-merge
Fixed leak of real object pointer.  Only a problem when using indirect refs.

Change-Id: Ia5768f8642894bf5c8b4d47fbad0d3240f74f3fe
Fix uninitialized variable warning pointed out by gcc flag -fdata-sections

Change-Id: I5e0bcec7e3466e48cca84d46f54690aa2b8969c2
Merge branch 'gingerbread' of git://git.omapzoom.org/platform/dalvik into 237
Exclude sha1.c when building libdex for device

In bionic, there is already an optimized SHA-1 hash implementation,
and the file 'sha1.c' in libdex is almost identical.  It is only
necessary to build sha1.c for host version of libdex.

In addition, the SHA-1 hash implementation in bionic is slightly faster
than the one included in libdex.

Here is the reference SHA-1 benchmark on Nexus S:

[libdex]
Rounds: 100000, size: 6250K, time: 1.28s,  speed: 4.768 MB/s

[bionic]
Rounds: 100000, size: 6250K, time: 1.184s, speed: 5.156 MB/s

Change-Id: Ia8918aeaeec75aceecbbb8cd55130d709a9fe311
Support Dex on /sd-ext and /cache

Change-Id: Ie9178a49f650dae4a8ecc96b5c9faa8a3e16c1c8

Conflicts:

	libdex/OptInvocation.c
Revert "Support Dex on /sd-ext and /cache"

This reverts commit da2db55593521e8c2818ba72d3ff151086963cf4.

Change-Id: Ibae8d64320d5bc4ffc53796acebf2e223c247e84
Revert "DexOpt anything in /system on /cache"

This reverts commit 15d27bbe10e307136e081bedb7cf25131896f1cb.

Change-Id: I0514b2c0e616fce0c473bac47feac3563163ab4b
Support Dex on /sd-ext and /cache

Change-Id: Ie9178a49f650dae4a8ecc96b5c9faa8a3e16c1c8
Obvious mix of = and ==

Typo fix from AOSP/master

Change-Id: I52183924c287b80e9ca7c20df6edfe132b43e088
Fix memory leaking in the VM

Doesn't correctly free the resources before return

original change id If7de75c1780f4240ee21bc536cc739de4729cd98

picked from:
https://android-review.googlesource.com/#/c/23248/
Don't malloc between fork and exec

This was causing hangs in DEX file loading.

Bug 5329833

picked from
https://github.com/android/platform_dalvik/commit/63cd4b08e623242066c63563bad3a9f414a2bd2d

Change-Id: Ie125c12013791156c9c7aa6b22ce90728b6f7fd5
Undecoded jobject leaking in through attachThread

picked from
https://android-review.googlesource.com/#/c/23058/
Basic KSM Support

[ported from ics commit]

Be sure to add '#define MADV_MERGEABLE 12' to
bionic/libc/include/sys/mman.h so we can have a central place for this

parse the process memory map and inform madvise common HEAP/Stack
regions on fork from zygote

These then can be used by the kernel KSM module to re-join (copy on write)
pages between the various dalvik processes.

As is on a fully loaded system you can expect ~12MB to be indicated to be
scanned by KSM.. of this 10-15% will be saved; as such a recommend a very
slow scan until as any logic to stop scanning while sleeping will require
another process and remove all memory savings provided by this logic.

To activate on a KSM kernel (2min for full scan of ~16m and 1%CPU):

echo 4000 > /sys/kernel/mm/ksm/sleep_millisecs
echo 128 > /sys/kernel/mm/ksm/pages_to_scan
echo 1 > /sys/kernel/mm/ksm/run

Newer kernels only require the last line.

In future additional memory regions and kernel logic may improve this.

Change-Id: If431bf77a21bc7358499678f83d84404e5db2738
Restore fp after calling JNI method in allstubs interpreter

The allstubs interpreter uses self->interpSave.curFrame as fp.
The invokeMethod native code sets self->interpSave.curFrame directly
effectively updating fp, so restore fp after the call has completed.

original Id: I0ffb15b71a48c2780251bbcd66e551bb0a52fe94
Signed-off-by: Chris Dearman <chris@mips.com>

Conflicts:

	vm/mterp/c/gotoTargets.c
	vm/mterp/out/InterpC-allstubs.c
	vm/mterp/out/InterpC-portdbg.c
	vm/mterp/out/InterpC-x86-atom.c
	vm/mterp/out/InterpC-x86.c
resolved:) and adapted to gingerbread

picked from
https://android-review.googlesource.com/#/c/31824/
cleanup redundant interfaces from iftable to avoid excessive LinearAlloc use

picked (without the tests) from
https://github.com/android/platform_dalvik/commit/a669206dc91323e664a84b2a4ca170ec0332c926

dependencies removal

Change-Id: Ice0a9672144bfe654622e4e8d0020a3f0053466d