runtime: Add support for dexroot-on-cache

If installd puts the dex files there, we want to read/write our oat
files out of there, too

Change-Id: I7da528622d7c855431dd99b20ff54da791bc1681
runtime: dexroot-on-cache: obey dalvik.vm.dexopt-data-only

Change-Id: Ie037706b1004e014c20f81c8fcdc219c46da57c7
tools: use '/usr/bin/env python' instead of '/usr/bin/python'

* This is how it is done in other scripts in the AOSP tree, as
  '/usr/bin/python' may be python3 on some distros, which isn't
  supported yet.

Change-Id: I0d9857fc6a122f505953fddcd6244dad75b1838a
verifier: Bypass monitor-{enter,exit} depth checks

Per Google Bug 61916[1], the monitor-enter and monitor-exit checks in
dex2oat are excessively strict and will reject some valid APKs, such as
WhatsApp[2].  This change attempts to relax those requirements.

[1] https://code.google.com/p/android/issues/detail?id=61916
[2] http://forum.xda-developers.com/showthread.php?t=2525044

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Merge tag 'android-4.4.1_r1' into HEAD

Android 4.4.1 Release 1
4-byte align 64-bit values in Get/Set Double/Long for GCC 4.8.

Bug: 10837416
Change-Id: Ibb562407d81c2085666ae8824e7570f22e56eaa7
Merge branch 'kitkat' of https://github.com/AOSPA/android_art into kitkat
Fix a portable build breakage

  http://android-build/builds/git_dalvik-dev-linux-mysid-userdebug_portable/848398/logs/build.log

 due to

  https://googleplex-android.googlesource.com/platform/art/+/3b4c18933c24b8a33f38573c2ebcdb9aa16efeb5

Change-Id: I89ef5f77dfc640efbe3378549e22bb699da3149f
Implement thumb expansion of immediates.

Change-Id: Ie50c17f82cbf97a16b58350b378914030cc0499f
Allow host valgrind gtests to be run individually.

Change-Id: I80976600034046cb42e8565bfd38f75811d7a08e
Fix clean-oat

Change-Id: I96ba59794e50f630aaa06d226b1048000b1b6188
Put arguments first in debugger variable table and fix name bug.

Bug: 11569468

Change-Id: I63d45427ded0937c3ab2456fe5cec22da5558e53
Avoid unnecessary copy of dex_gc_map.

Change-Id: I8a7209d92aeee853f6a4e9e9bb0e094c5acd5e05
Propagate 'this_object' for method unwind event.

Propagates the 'this_object' to InstrumentationListener::MethodUnwind callback.

Change-Id: I12561f1a611b8399b94e669f9b8a6eaaf1a58631
runtime: Invert the default for dexopt-on-cache

The growth of /system apps and total /data space are making this
device-breaking (insufficient space to dexopt everything to
/cache), pointless (/data has more than enough room to hold
the cache), and in some cases, both.
The default behavior is now the same as mainline Android's: dexopt
everything to /data. Set dalvik.vm.dexopt-data-only=0 to change
that and dexopt /system apps to /cache. If you do that, make sure
your /cache can accomodate double the size of the dex classes in
system, since that has been observed during dex2oat

Change-Id: I8c1debee6e16a6fb162e42a7c9a47ec076eb69df
Fix NewLocalRef, NewGlobalRef to handle cleared weak globals.

We were not checking for null after decoding the reference, this
meant that we incorrectly created null weak global references instead
of returning null.

Issue: 63929
Change-Id: I9159682e6edad8f415ef8144fc13b9aedd2cceb4
Finish fixing Zygote descriptor leakage problem

In order to prevent Zygote descriptors from leaking into the child
environment, they should be closed by the forked-off child process
before the child switches to the application UID.  These changes close
the descriptors via dup2(), substituting a descriptor open to
/dev/null in their place; this allows the Zygote Java code to close
the FileDescriptor objects cleanly.

This is a multi-project change:	dalvik, art, libcore, frameworks/base,
and external/sepolicy are affected.  The CLs need to be approved
together, lest the build break or the software fail to boot.

Round 2: use proper type (jsize) for iteration variable;  whitespace.

Round 3: indentation.

Bug: 12114500
Change-Id: I31d25831b477b076d980c531d57773f9c8c83261