Add support for ARMv6J and ARMv6-VFP processor target

Merged in code from gingerbread branch with updated code in ics.
Merge branch 'ics-mr1' of https://android.googlesource.com/platform/dalvik into aosp
DexOpt anything in /system on /cache

Allow system property to disable use of /cache for dexfiles.

(manually cherry-picked commit 15d27bbe10e307136e081bedb7cf25131896f1cb)
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

(manually cherry-picked commit 55ac5b0a908b85c050f34dc603f62dd4b1fc4e9f)
[PATCH] Basic KSM Support

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: I271cbee74a1f02a89c34c6ee9006a4ea81360154
dalvik: fix a bug in redundant branch elimination
Merge "[PATCH] Basic KSM Support" into ics
Merge "dalvik: fix a bug in redundant branch elimination" into ics
Merge branch 'ics-mr1-release' of https://android.googlesource.com/platform/dalvik into aosp
Obvious mix of = and ==

Change-Id: I52183924c287b80e9ca7c20df6edfe132b43e088
Compact merged dexes on their byte aligned size

Previously, if a merged dex had too much free space, the compaction step
would subtract the unused space from the section sizes generated by
adding the merged dexes section sizes. The merged sizes weren't 4-byte
aligned, which meant if a section had been bumped in size for the
boundary, the compaction would fail when loading into a section eg
'Section limit 3665072 exceeded by string data'.

This gets the compacted section size from the actual used space instead
of from the non-aligned estimate, so everything fits.

Change-Id: I1aee1abd721ec21998bb3ea78f6f424e7421b614
 Fix: Issue 26627: Dalvik Heap Trim timer value after GC

dvmRelativeCondWait need millisecods not seconds.

With this fix, trim will begins 5 seconds after concurrent GC

Bug: http://code.google.com/p/android/issues/detail?id=26627
Change-Id: I3802b48e345725fb78e4ef2c999dd243ef30a138
  Trim after explicit gc.

  On Gingerbread, dvmHeapSourceTrim() is called 5 seconds
  after every kind of GC. Current AOSP do trim only for
  concurrent GC. That makes OOM killer too busy.

  At least explicit GC need trim and in case of explicit
  GC, there are no need to delay 5 seconds before trim.

Change-Id: I8fde8f773398bf20c674cfa6f686d7d745d56492
dalvik: Increase HEAP_IDEAL_FREE to 7.2 MB

Increase HEAP_IDEAL_FREE to 7.2 MB
To avoid frequent garbage collections,
which causes stutters while scrolling sms/contacts.

Change-Id: I037a0375d530670f2e6f0c06883ee394b1839e39

vm: Add interface to make GC IDEAL_FREE and CONCURRENT_START
configurable from framework

Change-Id: Ib566d945ccad12b2d7fb5de56e26f892f8be6352
dalvik: Compile fixes with gcc 4.6

Dalvik is compiled with -Werror, causing it to fail with gcc 4.6
because it creates additional warnings - mostly about variables
being defined but never used if LOG_NDEBUG is set.

This fixes the warnings.

Change-Id: If84d05a38b16ed3ef5eae2107ea40c614c5f57af
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>