Use ALOGE rather than SLOGE for mountEmulatedStorage failures.

Otherwise the actual failure isn't in logcat, and all you see there
is the rather confusing:

  E dalvikvm: cannot mountExternalStorage(): Success

Change-Id: I10c96748b5ff5b6c3877312e7bdb2641026b4489
Remove dvmFindInterfaceMethodInCache2.

We can just use dvmFindInterfaceMethodInCache directly.

Change-Id: I2f3a660262ba7a39c05689df160ebdd2e7ec38a5
ExceptionInInitializerError should wrap only non Error exceptions.

Backport from dalvik-dev, due to customer demand.

Bug: http://code.google.com/p/android/issues/detail?id=41196
Change-Id: I53ef57e54983f2173546463ac78e265ff5dd3284
Optimize opcodes to avoid bubble in pipeline.

Possible bubbles between fetch(ldr) and extract(and)
Excute subsequent instruction(s) inbetween the bubble by reordering instruction.

Change-Id: I76d89ed6bc4ca44673231375cc529fdbfd5a8030
Possible leak in dvmAllocRegion

In error case mmapped ptr 'base' is not munmapped.

Change-Id: I9e43841371fee6b7c092fe9a8922ae82e78805ed
Fix handling of annotations whose classes are missing at runtime.

Bug: http://code.google.com/p/android/issues/detail?id=39854
Change-Id: I3089b693ff3084b093f991f991ac9273dea7356d
Remove dead code.

Change-Id: I56c27c510c8fc0ba2d8e691c788b433dce250f7a
Reclaiming attribute obj after pthread_create

call pthread_attr_destroy in order to reclaim attribute object.

Change-Id: I2592903ef67101a7c656a3ab0ad243a9716298b5
Remove possilbe leaks in dalvik.

Add missing free() calls.

Change-Id: Id602b84ba8f15fef1851f37e3d5aac214ac67de1
Optimize dvmHash Loops.

pHashTable->tableSize is working as volatile variable & is evaluated on every iteration.
Help compiler to define tableSize as local(Register) variable.

Change-Id: Iecdea3ecb810319d461ff3924ef21fd6c2d69d1e
Change NewDirectByteBuffer to allow NULL if capacity == 0.

Also make the diagnostics more uniform.

Bug: 7892060
Change-Id: Ib3ca0d6241a5958d2c8681337b1883fc3d74cb54
dalvik: remove duplicated call to dvmJitCalleeSave()

Change-Id: Ib7b5f637a22fd5ba60bdb45cd34ac8c1781c7bd3
Author: Rocky Zhang <zhangyan.hit@gmail.com>
Signed-off-by: Rocky Zhang <zhangyan.hit@gmail.com>
Zygote: Restrict slave mountspace so Dalvik apps can mount system-wide volumes

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.
Tiny optimization for complier templates for arm.

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
Fix a leak in Dalvik_dalvik_system_DexFile_openDexFile

Change-Id: I2b394c620af31914606763b35847b7f412774cf4
Fix a minor leaks caused by failed initializations.(typo)

Change-Id: I62bc3ea48938a4f54e9f47218d4025e954a6d566
Fix a minor leak in handleVM_CreateString

Change-Id: I3273e5d2eb4621202837c43270a466fe056d6894
Dump native stacks for all threads in native code.

Bug: 7432159
Change-Id: I83cb530155edfc35ae3be0f7a2a044245223d2d5
Fix a Field.isAnnotationPresent crash.

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
Remove stray references to non-existent opcodes.

Change-Id: I83ca6ea12344a8df7ef14d600baf5060b76870f5