History log of /art/runtime/jni_internal.cc
Revision Date Author Comments
12f7423a2bb4bfab76700d84eb6d4338d211983a 14-Jan-2015 Mathieu Chartier <mathieuc@google.com> Print more info in MarkSweep::VerifyRoot

Refactored old root callback to use a new class called RootInfo.
RootInfo contains all the relevant info related to the root
associated with the callback. The MarkSweep::VerifyRoot function
now uses this info to print the StackVisitor's described location
if the GC root is of the type kRootJavaFrame.

Some other cleanup.

Example output:
E/art (12167): Tried to mark 0x123 not contained by any spaces
E/art (12167): Attempting see if it's a bad root
E/art (12167): Found invalid root: 0x123 with type RootJavaFrame
E/art (12167): Location=Visiting method
'void java.lang.Runtime.gc()' at dex PC 0xffffffff (native PC 0x0)
vreg=0

Bug: 18588862
Change-Id: Ic5a2781f704e931265ffb3621c2eab4b2e25f60f
246a0130c5583170f4d168532feb49367fce2b47 20-Dec-2014 Andreas Gampe <agampe@google.com> ART: Do not JNI abort on nullptr GetObjectRefType

A nullptr is a valid input, as it is different from a null reference.

Bug: 18820997

(cherry picked from commit a87630724ef4f8760684fa69c8ecc685735aff88)

Change-Id: Ibda8907ba13b20d2055049492a356ffdf4ddc714
8c41753e5eda8322b4d992fe88855058f4c0c2e1 15-Nov-2014 Mathieu Chartier <mathieuc@google.com> Fix reference leaks in ToReflectedMethod and ToReflectedField

Used ScopedLocalRef to fix, added regression tests.

Bug: 18396311
Change-Id: I8ef447408f103c35389e76c14071a0f2e40de300
1f24296c7c8a6501ee2388c0d20b48f471b48660 16-Oct-2014 Mathieu Chartier <mathieuc@google.com> Add way to ensure we are at the front of the sigaction chain

Calling this after jni_on_load fixes the unity apps. This is
not exactly correct since we may already have the following chain.

Start up:
Us -> debuggerd

After app goes in front:
App -> us -> debuggerd

After we put ourself back at the front:
Us -> app -> us -> app -> .... stack overflow.

Bug: 17620677
Change-Id: I9183997e3d5ebd51c320b5d51425be5142e938f3
6d031046eeb5e9f62b657df0695b752e1d0aa583 10-Sep-2014 jgu21 <jinghui.gu@intel.com> ART: Update for split native bridge initialization

(cherry picked from commit a6da74e941d7cee498ac3880018a1d8dc953c6eb)
(cherry picked from commit 7a536531791293441253cffb6e370ba1150eee96)

Bug: 17671501
Change-Id: Id948e3ab22ac988d96f5d370bba8c3f86d08abff
a967c62e4e6675d3553445aa8e95a09e7a3381b0 11-Sep-2014 Mathieu Chartier <mathieuc@google.com> Delete pin table

The pin table was brought over from dalvik but not really needed
since ART doesn't support pinning in movable spaces. The only
thing it did was hold objects live for JNI functions.
This shouldn't be necessary since people keep jni references to
these objects or else they could never release the elements.

Bug: 17456946

Change-Id: Ibed0d029157ffb9e75ecd80d4d544d690986c090
5369c40f75fdcb1be7a7c06db212ce965c83a164 25-Aug-2014 Mathieu Chartier <mathieuc@google.com> Add native memory accounting through custom allocator.

Added a custom allocator that lets you pass in a special tag which
specifices where the allocation came from. This is used when
dumping. The performance overhead is low since each allocation only
does a atomic add/sub for each allocation/free.

The measurements are dumped to traces.txt during SIGQUIT.

Example output:
I/art (27274): AllocatorTagHeap active=120 max=120 total=168
I/art (27274): AllocatorTagMonitorList active=1572 max=6240 total=11724
I/art (27274): AllocatorTagClassTable active=185208 max=185208 total=268608
I/art (27274): AllocatorTagInternTable active=430368 max=430368 total=436080
I/art (27274): AllocatorTagMaps active=5616 max=6168 total=34392
I/art (27274): AllocatorTagLOS active=1024 max=1536 total=2044
I/art (27274): AllocatorTagSafeMap active=0 max=51936 total=533688
I/art (27274): AllocatorTagLOSMaps active=144 max=1248 total=5760
I/art (27274): AllocatorTagReferenceTable active=10944 max=11840 total=19136
I/art (27274): AllocatorTagHeapBitmap active=32 max=40 total=56
I/art (27274): AllocatorTagHeapBitmapLOS active=8 max=8 total=8
I/art (27274): AllocatorTagVerifier active=0 max=18844 total=1073156
I/art (27274): AllocatorTagModUnionCardSet active=5300 max=5920 total=56020
I/art (27274): AllocatorTagModUnionReferenceArray active=24864 max=24864 total=24864
I/art (27274): AllocatorTagJNILibrarires active=320 max=320 total=320
I/art (27274): AllocatorTagOatFile active=1400 max=1400 total=5852

Bug: 16238192

Change-Id: Ibb470ef2e9c9a24563bb46422d46a55799704d82
93de4273d72a2558a7b3423547b5074cd76c5796 12-Aug-2014 Calin Juravle <calin@google.com> [ART] Move to system/core native bridge library

Some cleanups on the way:
- move NativeBridgeRuntimeCallbacks from a global to a field
- rename native_bridge_library_string to the more suggestive
navtive_bridge_library_path
- clean up imports

Bug: 16884833

(cherry picked from commit I73aab8e212860ba5aee9444d801806d3da326a41)

Change-Id: I67f037ea81d2a4ede4294afd8b84b7640e534a13
cb6b0f31ede2275e79e6199ec391147585a37a2a 12-Aug-2014 Ian Rogers <irogers@google.com> Avoid use of std::string where we have const char*.

Removing the ClassHelper caused std::string creation for all calls to
Class::GetDescriptor and a significant performance regression. Make the
std::string an out argument so the caller can maintain it and its life time
while allowing GetDescriptor to return the common const char* case.

Don't generate GC maps when compilation is disabled.

Remove other uses of std::string that are occuring on critical paths.
Use the cheaper SkipClass in CompileMethod in CompilerDriver.
Specialize the utf8 as utf16 comparison code for the common shorter byte
encoding.
Force a bit of inlining, remove some UNLIKELYs (they are prone to pessimizing
code), add some LIKELYs.

x86-64 host 1-thread interpret-only of 57 apks:
Before: 29.539s
After: 23.467s

Regular compile:
Before: 1m35.347s
After: 1m20.056s

Bug: 16853450
Change-Id: Ic705ea24784bee24ab80084d06174cbf87d557ad

Conflicts:
runtime/utils.cc
20ae1d77463d1c3f206eac8d541124b4555464de 17-Jul-2014 Ian Rogers <irogers@google.com> Clean up native bridge

(partially cherry picked from commit
68d8b42ddec39ec0174162d90d4abaa004d1983e)

Change-Id: I85813e97d73b1b331646dd0e880108dfbfe80f69
d4c3c62cc68296fbaf35e7b37108c2fde2278a3b 11-Jul-2014 Narayan Kamath <narayan@google.com> Fix broken JNI IsAssignableFrom.

The expected argument order was the opposite of what the spec
dictated.

Reported-By: Mikhail Naganov <mnaganov@google.com>
bug: 16531674

(cherry picked from commit 1268b742c8cff7318dc0b5b283cbaeabfe0725ba)

Change-Id: I2b6636998c4e15c1eb10dc96a57940aca56c4d0d
1268b742c8cff7318dc0b5b283cbaeabfe0725ba 11-Jul-2014 Narayan Kamath <narayan@google.com> Fix broken JNI IsAssignableFrom.

The expected argument order was the opposite of what the spec
dictated.

Reported-By: Mikhail Naganov <mnaganov@google.com>
bug: 16531674

Change-Id: I1ebc6d5814ebb4feeb96f3ecdf1a4602da4ba7ce
94f7b49578b6aaa80de8ffed230648d601393905 23-Jul-2014 Hiroshi Yamauchi <yamauchi@google.com> Add GcRoot to clean up and enforce read barriers.

Introduce a value-type wrapper around Object* for GC roots so that 1)
we won't have to directly add the read barrier code in many places and
2) we can avoid accidentally bypassing/missing read barriers on GC
roots (the GcRoot interface ensures that the read barrier is executed
on a read).

The jdwp test passed.

Bug: 12687968
Change-Id: Ib167c7c325b3c7e3900133578815f04d219972a1
355383f61d28f2dc8072fbde2639c80627adf16d 24-Jul-2014 Yong WU <yong.wu@intel.com> Integrate ART with NativeBridge interfaces

Native-bridge will provide the following interfaces to ART:

struct NativeBridgeCallbacks {
bool (*initialize )(NativeBridgeArtCallbacks* vm_itf);
void* (*loadLibrary )(const char* libpath, int flag);
void* (*getTrampoline)(void* handle, const char* name, const char* shorty,
uint32_t len);
bool (*isSupported )(const char* libpath);
};

Native-bridge will expose a symbol NativeBridgeItf with the
type of NativeBridgeCallbacks to ART.

And ART will provide the interfaces below to native-bridge:

struct NativeBridgeArtCallbacks {
int (*logger )(int prio, const char* tag, const char* fmt, ...);
const char* (*getMethodShorty)(JNIEnv* env, jmethodID mid);
int (*getNativeMethodCount )(JNIEnv* env, jclass clazz);
int (*getNativeMethods )(JNIEnv* env, jclass clazz, JNINativeMethod* methods,
uint32_t method_count);
};

Based on the interfaces, if an ART call to dlopen fails to open a native library,
it queries the native bridge by using NativeBridgeCallbacks::isSupported(). If the
native library is supported by native-bridge, ART can load the native library
using NativeBridgeCallbacks::loadLibrary() and get a trampoline for a specific
native method using NativeBridgeCallbacks::getTrampoline(). ART can then call
the native method using the normal signature and the address of the trampoline.

On the other side, in the case of a native method calling JNI native function
CallXXXXMethodY(), native-bridge calls back to Art for the shorty of the method
using NativeBridgeArtCallbacks::getMethodShorty() so that it can prepare based
on host calling convention.

In case of JNI function RegisterNatives()/UnregisterNatives(), native bridge can
call back to NativeBridgeArtCallbacks::getNativeMethodCount() and NativeBridgeArtCallbacks
::getNativeMethods() to get all native methods of specified class so that all
corresponding trampolines can be prepared/destroyed.

Class NativeBridge is created to encapsulate the function pointers of
NativeBridgeCallbacks and provides better abstraction to ART.

Note: functionality is turned off in native_bridge.cc at the moment.

Change-Id: I652755044957a7960254648652b538cce70dd011
22d5e735f403c57525fe868304c7123f0ce66399 16-Jul-2014 Ian Rogers <irogers@google.com> Remove object_utils.h.

Break into object_lock, field_helper and method_helper.
Clean up header files following this.
Also tidy some of the Handle code in response to compiler errors when resolving
the changes in this CL.

Change-Id: I73e63015a0f02a754d0866bfaf58208aebcaa295
e63db27db913f1a88e2095a1ee8239b2bb9124e8 16-Jul-2014 Ian Rogers <irogers@google.com> Break apart header files.

Create libart-gtest for common runtime and compiler gtest routines.
Rename CompilerCallbacksImpl that is quick compiler specific.
Rename trace clock source constants to not use the overloaded profiler term.

Change-Id: I4aac4bdc7e7850c68335f81e59a390133b54e933
fa65e846362829d6e444bd88b12fe2496b3d5647 03-Jul-2014 Sebastien Hertz <shertz@google.com> More checks in JNI RegisterNatives

Throws NoSuchMethodError (and returns JNI_ERR) when given method name, method
signature or native function is null.

Bug: https://code.google.com/p/android/issues/detail?id=72293
Bug: 15886341
Change-Id: I1c0582d54031eaa58a6025a2417d65090a2a622a
3a1444ccb92fb1b11d4943c3baa1f0a3abed4f10 25-Jun-2014 Alexei Zavjalov <alexei.zavjalov@intel.com> ART: JNI ExceptionDescribe crashes if no exception occurred

Some tests are calling ExceptionDescribe without checking if
we have an exception occurred. The most JVM's like Dalvik can
handle this in a good way, but art crashes with JNI error.

This adds a check in art::ExceptionDescribe for a case when it
called without exception.

Change-Id: Id9eddcc73e78b1197109be5a6340f9ff60940c74
Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
d3333767dc25566ad207c90c897adaefd813588d 26-Jun-2014 Sebastien Hertz <shertz@google.com> Fix JNI ToReflectedMethod for constructor

Returns java.lang.reflect.Constructor object for <init> and <clinit> methods.

Bug: https://code.google.com/p/android/issues/detail?id=72312
Bug: 15885285
Change-Id: I2f4a266b2d9574659673dc6966104860578d709e
85a93364e5111dc56a73eed0130856e66cab0802 25-Jun-2014 Brian Carlstrom <bdc@google.com> Address comments on change 45d26c86b00580593067ca42091ad66cf7dc4f7c

Change-Id: Ibb559ae41654660064f4a8df71274c4e4f16807a
45d26c86b00580593067ca42091ad66cf7dc4f7c 25-Jun-2014 Brian Carlstrom <bdc@google.com> Treat larger than jint capacity in NewDirectByteBuffer as an error

Bug: 15854028
Change-Id: If78921f4ba2b38a9d0bb421acf9c8bca962ed42a
ea2e1bd713ca8295ba4fcd01e77a3ce532ea61e4 18-Jun-2014 Hiroshi Yamauchi <yamauchi@google.com> Add more read barriers for JNI roots.

To make it possible to concurrently scan the JNI global roots (that
is, the roots visited by JavaVMExt::VisitRoots()), add read barriers
to the indirect reference table and the reference table.

Also, add read barriers to the jmethodID/jfieldID decode routines
(ScopedObjectAccessAlreadyRunnable::DecodeField/DecodeMethod) so that
we can concurrently handle (encoded) fields and methods.

Bug: 12687968
Change-Id: I3df4e4e622a572ff0ea8d44b2dc70a4d6b3ba058
6c5cb212fa7010ae7caf9dc765533aa967c95342 19-Jun-2014 Ian Rogers <irogers@google.com> Ensure classes are initialized rather than initializing.

A class can be being initialized on a different thread, in that case other
threads should block trying to access the class. The initializing state shows
the class is being initialized but not that its safe for other threads to
access. Change occurances of IsInitializing to IsInitialized primarily in
slow-path code.
Bug: 15347354

Change-Id: Ib586d0a385be6086a890dfbf8868d76f16767fac
004644fe87046b965442b1ee1008b7206817d187 18-Jun-2014 Brian Carlstrom <bdc@google.com> Fix GetMethodID to find an interface method from a super-interface

Bug: 15651032
Change-Id: I5df113e9489a1615e901f03bed92ed2a1a42bd67
9f1020305292a21fd14a402b189c765a125226ab 23-May-2014 Sebastien Hertz <shertz@google.com> Fix exception reporting from interpreter

To comply with JDWP exception report rules, we must report an exception at the
location of the throw (or the first instruction encountered after a native
call). To do this, we use the CatchLocationFinder visitor to look for a catch
handler until we reach a native frame or the top frame.

Because interpreter handles pending exception on a method-by-method basis, we
need a flag to remember we already reported the exception and avoid reporting
it multiple times when unwinding methods. The drawback is we need to maintain
the state of this flag. We clear it when the exception is cleared. In the case
we temporarily clear the exception (when finding a catch handler for instance),
we restore the flag to its previous value at the same time we restore the
pending exception.

Bump oat version to force recompilation because we modify Thread offsets.

Bug: 14402770
Change-Id: Ic059c58f80b2023b118038301f8f0a24f1e18241
56890e2615ab3dd612f1f81c3cadab6299eceacb 02-Jun-2014 Fred Shih <ffred@google.com> Modified functions to return pointers where appropriate

GetStringChars will return a pointer to the underlying char array iff
it is not movable. Otherwise, it will return a copy of the char array.
For consistency, the null terminating character has been removed as the
specification for a jchar strings are not null terminated:

http://developer.android.com/training/articles/perf-jni.html

GetStringCritical will now always return a pointer to the char array.
The char array is pinned and moving gc is disabled until the pointer is
released.

Change-Id: I19c8cbaecc1f3f723d80acec074fb8c5e2d489c3
ffddfdf6fec0b9d98a692e27242eecb15af5ead2 03-Jun-2014 Tim Murray <timmurray@google.com> DO NOT MERGE

Merge ART from AOSP to lmp-preview-dev.

Change-Id: I0f578733a4b8756fd780d4a052ad69b746f687a9
a309d76d4c9f4e5564b09708004bf4b2e3401bb3 26-May-2014 Serguei Katkov <serguei.i.katkov@intel.com> Fix GC race condition in visit roots

While GC visits roots other code can change the set pending exception
due to lack of synchronization.

Change-Id: If387944ac933a66fe176df066c3a0ea52131cad4
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
b74cd29802f364b4cec88f4913fa38ade26b8fab 29-May-2014 Mathieu Chartier <mathieuc@google.com> Compaction cleanup for FindArrayClass.

We now pass double pointer in to signify that it can cause thread
suspension, this double pointer gets wrapped by a handle if don't
find the array class in the cache.

Change-Id: I43436b6c35597c7252b65d1180baddb5ac4caabb
196851b634a5bfdd8ab3fb59a320e550b21b0f4d 29-May-2014 Hiroshi Yamauchi <yamauchi@google.com> Add read barriers for the weak roots in the JNI weak globals.

Bug: 12687968
Change-Id: Ic265a0e162e8cc9edc4ab7fa34f8afd5ce968d08
0cd81352a7c06e381951cea1b104fd73516f4341 23-May-2014 Mathieu Chartier <mathieuc@google.com> Revert "Revert "Fix an outstanding compaction bug in interpreter.""

Fixed the generic trampoline to not use ToJObject when unnecessary.

Bug: 15167269

This reverts commit 3bdb873122964da7937eb070cbcf2ef638a8e459.

Change-Id: I0525d0e0f3afb753c770e1572070a0fa22b02271
3bdb873122964da7937eb070cbcf2ef638a8e459 23-May-2014 Mathieu Chartier <mathieuc@google.com> Revert "Fix an outstanding compaction bug in interpreter."

This reverts commit e09ae0920be57760fb390b6944bce420fa0b5582.

Change-Id: I48036306130d5ccfec683d0dc3e9a642a02ee9c1
e09ae0920be57760fb390b6944bce420fa0b5582 15-May-2014 Mathieu Chartier <mathieuc@google.com> Fix an outstanding compaction bug in interpreter.

Fixed a bug in DoFieldPut where the FieldHelper GetType could cause
thread suspension which would result in a stale obj.

Added more handles in the class linker to facilitate moving fiels
and methods in the future.

Removed un-necessarly passing handle references since these are value
types and don't need to be passed by reference.

Added a special NullHandle type which allows null handles without a
handle scope.

Change-Id: I1b51723920a2e4f4f8b2907066f578a3e879fd5b
35aef2ce9d9cbfb37e9b2f6776afce3caed37063 19-May-2014 Yevgeny Rouban <yevgeny.y.rouban@intel.com> Fix race condition between GCDaemon and DeleteLocalReference

There is a race condition between the GCDaemon visiting
thread local roots starting from the thread's indirect ref table (IRT)
and another thread calling JNI::DeleteLocalReference, which is clearing
one of the indirect references.

To cope with the race condition the DeleteLocalReference used to transit
from suspended to running state by creating a ScopedObjectReference(env).
But this transition was removed with the following patch:
https://android.googlesource.com/platform/art/+/ef28b14268ed0f9db0c7bbd571aa514354a360bd%5E!/#F0

If so the GCDaemon must be careful to work with IRT entries.

This new patch:
1. calls the visitor only if the reference is not null. This if-null
behavior of ART GC is consistent with what Dalvik GC does.
2. But this might be not enough for some future sophisticated GC algorithms.
For example, if GC moves an object, then the IRT entry must be changed
with CAS only if it has not been cleared. So, for the safety reasons
the patch put backs the ScopedObjectReference soa(env) to
DeleteLocalReference.

Only one of those two changes would be enough.

mathieuc note: I decided to delete the root null check but kept the
ScopedObjectAccess in DeleteLocalRef and added missing annotations as
well as more ScopedObjectAccess in jni internals.

Bug: 14626564

Change-Id: I90d4b8494f61404579ecdd2918d1482093d99387
Signed-off-by: Yevgeny Rouban <yevgeny.y.rouban@intel.com>
Signed-off-by: Yang Chang <yang.chang@intel.com>
700a402244a1a423da4f3ba8032459f4b65fa18f 20-May-2014 Ian Rogers <irogers@google.com> Now we have a proper C++ library, use std::unique_ptr.

Also remove the Android.libcxx.mk and other bits of stlport compatibility
mechanics.

Change-Id: Icdf7188ba3c79cdf5617672c1cfd0a68ae596a61
f832284dd847ff077577bb5712225430bbbb3b67 16-May-2014 Mathieu Chartier <mathieuc@google.com> Delete ClassHelper and fix compaction bug in GetDirectInterface

Cleanup helps to prevent compaction bugs. Fixed a fairly serious
compaction error caused by calling ClassHelper::GetDirectInterface
without handling the case where it causes thread suspension due to
ResolveType.

Bug: 8981901

Change-Id: I82b3bb6dd48d21eb6ece7aae0733c4a23c2bc408
507dfdd147c97bfbadebfd63584d094b6a4e7b47 16-May-2014 Ian Rogers <irogers@google.com> Compatibility layer to transition from UniquePtr to std::unique_ptr.

Use ART_WITH_STLPORT (enabled for the target) to cause the use of UniquePtr,
for the host switch to std::unique_ptr. For now the type remains called
UniquePtr.
Make dalvik compile with clang on the host, move its build to C++11.

Change-Id: I5ba8d2757904bc089ed62047ea03de3c0853fb12
2d10b206f9d0b97396b7dadb9a6415cd39efd341 13-May-2014 Ian Rogers <irogers@google.com> Ensure JNI primitive array type is appropriate.

Check the primitive array type for GetPrimitiveArray, ReleasePrimitiveArray,
GetPrimitiveArrayRegion and SetPrimitiveArrayRegion matches the given array
type. Check the GetPrimitiveArrayCritical and ReleasePrimitiveArrayCritical are
given a primitive array.
Add unit tests that null parameters lead to fatal errors, not crashes. Fix
issues where CheckJNI assumed non-null arguments.
Tidy testing code via the use of nullptr. Add a few extra checks.
Ensure arrays of void are not able to be created, use RI compatible
NoClassDefError.

Bug: 14817823

Change-Id: I9903bcd800d0da1988ced07f61fb97b783c5deab
eb8167a4f4d27fce0530f6724ab8032610cd146b 08-May-2014 Mathieu Chartier <mathieuc@google.com> Add Handle/HandleScope and delete SirtRef.

Delete SirtRef and replaced it with Handle. Handles are value types
which wrap around StackReference*.

Renamed StackIndirectReferenceTable to HandleScope.

Added a scoped handle wrapper which wraps around an Object** and
restores it in its destructor.

Renamed Handle::get -> Get.

Bug: 8473721

Change-Id: Idbfebd4f35af629f0f43931b7c5184b334822c7a
c56057e40938c587a74984651a510e320a8cb4fd 04-May-2014 Mathieu Chartier <mathieuc@google.com> Add lockless SynchronizedGet for indirect reference table.

Used for decoding global references without holding locks.

Results on JniCallback:
Before: 615ms (3 samples).
After: 585ms (3 samples).

Change-Id: Ifcac8d0359cf658d87f695c6eb869d148af002e5
b0fa5dc7769c1e054032f39de0a3f6d6dd06f8cf 29-Apr-2014 Ian Rogers <irogers@google.com> Force inlining on trivial accessors.

Make volatility for GetFieldObject a template parameter.
Move some trivial mirror::String routines to a -inl.h.

Bug: 14285442

Change-Id: Ie23b11d4f18cb15a62c3bbb42837a8aaf6b68f92
3b60fea8458f0bf65ef4530e1c4ee6fdd4b199e9 25-Apr-2014 Mathieu Chartier <mathieuc@google.com> Use __FUNCTION__ in CHECK_NON_NULL_*ARGUMENT.

Prevents naming errors and reduces code maintenance requirements.

Change-Id: I14aba05f0d5dab8009f472b3af0b698551ac2a7e
92b7889dfbfb44e875ba46c4e9ec3235c37b7709 25-Apr-2014 Mathieu Chartier <mathieuc@google.com> Clean up ScopedThreadStateChange + Get/SetPrimtiveArrayRegion

Simplified code in ScopedThreadStateChange and fixed an incorrect
name in Get/SetPrimitiveArrayRegion.

Change-Id: Id71affec1d64911449d792911cd52104dd179840
35d5c3baf701ca3d1e2d5b0b3653a5ca16f21f7e 23-Apr-2014 Colin Cross <ccross@android.com> art: fix dlopen error message

detail is a std::string *, dereference it when logging the error
message.

Change-Id: If73a5806445df17d91ff1a7f4f3a6d31f0e9f54e
987560fee798e48fb725c44b796d8ca7a5872ad6 22-Apr-2014 Ian Rogers <irogers@google.com> Remove support for app JNI workarounds.

Change-Id: I4396df7e93fcace4b5b19c2c387e5c30089182a6
dd7624d2b9e599d57762d12031b10b89defc9807 15-Mar-2014 Ian Rogers <irogers@google.com> Allow mixing of thread offsets between 32 and 64bit architectures.

Begin a more full implementation x86-64 REX prefixes.
Doesn't implement 64bit thread offset support for the JNI compiler.

Change-Id: If9af2f08a1833c21ddb4b4077f9b03add1a05147
62f0512bf6d9bc6141358bf22e93afa70dc58b1a 21-Mar-2014 Ian Rogers <irogers@google.com> Improvements to Field.get/set.

Avoid unnecessary repeated computation in Field.get/set.
Refactor FromReflectedField and FromReflectedMethod into common helpers in
mirror::ArtField and mirror::ArtMethod, and make use of thereby avoiding
transitions through JNI.
Avoid JNI use from within FromReflectedField and FromReflectedMethod.
Tidy up Field.get/set wrt moving collector support.
Bug: 12189533

Change-Id: I643ab3474bade4abac3a3ae2b6e373b2bb0891c8
53b8b09fc80329539585dcf43657bc5f4ecefdff 14-Mar-2014 Ian Rogers <irogers@google.com> Refactor reflective method invocation.

Move invocation code out of JNI internal into reflection, including ArgArray
code. Make reflective invocation use the ArgArray to build arguments rather
than allocating a jvalue[] and unboxing arguments into that.
Move reflection part of jni_internal_test into reflection_test.
Make greater use of fast JNI.

Change-Id: Ib381372df5f9a83679e30e7275de24fa0e6b1057
0c6afa40af7b9f097131126d084d5f19c2accaac 19-Dec-2013 Mathieu Chartier <mathieuc@google.com> 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
Bug: 13400455

(cherry-picked from e8c48db6bb507d7fa20c78481c58c23be0045f67)

Change-Id: I9159682e6edad8f415ef8144fc13b9aedd2cceb4
5647d189c3ea5324e569d96cef67c87879d6cd05 08-Mar-2014 Mathieu Chartier <mathieuc@google.com> Fix tests to pass with VerifyObject.

A SIRT ref with a null class was causing object verification problems
in space_test.

Change-Id: I95cfc3da5e0fec0155387f75612b0a3f26f6d3c9
c645f1ddb7c40bea6a38eda4b3f83f6b6dec405b 07-Mar-2014 Mathieu Chartier <mathieuc@google.com> Add more VerifyObject calls.

Added verify object calls to SirtRef, IndirectReferenceTable,
ReferenceTable.

Removed un-needed verify object in ScopedObjectAccess / DecodeJObject
since object sources are handled.

Bug: 12934910
Change-Id: I55a46a8ea61fed2a77526eda27fd2cce97a9b125
719d1a33f6569864f529e5a3fff59e7bca97aad0 06-Mar-2014 Ian Rogers <irogers@google.com> Enable annotalysis on clang ART builds.

Fix clang build errors aswell as restructure locking/mutex code for correct
thread safety analysis support.
Reorder make dependencies so that host builds build first as they should
provide better compilation errors than target.
Remove host's use of -fno-omit-frame-pointer as it has no value with correct
use of CFI, which we should have.

Change-Id: I72cea8da9a3757b1a0b3acb4081feccb7c6cef90
491ca9e75fad381468dd7f5fdbff56d1a9738dd7 03-Mar-2014 Brian Carlstrom <bdc@google.com> Add ART -help and -showversion

Bug: https://code.google.com/p/android/issues/detail?id=62149
Change-Id: I5c21c0433f5f341f94e7d977e8d2d69cc46d6fe3
a2806550cefb7c70781d8ee6279e6ad5769804cb 27-Feb-2014 Brian Carlstrom <bdc@google.com> Remove some stray stringpiece.h includes

Bug: 13186058
Change-Id: I2cb313425864a5d4e988fcf71a99c60ad63c63fb
a1ce1fef2d49d1d537776a5308ace7102a815fe5 25-Feb-2014 Brian Carlstrom <bdc@google.com> Split up CommonTest into CommonRuntimeTest and CommonCompilerTest

Change-Id: I8dcf6b29a5aecd445f1a3ddb06386cf81dbc9c70
9837939678bb5dcba178e5fb00ed59b5d14c8d9b 25-Feb-2014 Ian Rogers <irogers@google.com> Avoid std::string allocations for finding an array class.

Introduce ClassLinker::FindArrayClass which performs an array class lookup
given the element/component class. This has a 16 element cache of recently
looked up arrays.
Pass the current thread to ClassLinker Find .. Class routines to avoid calls
to Thread::Current().
Avoid some uses of FindClass in the debugger where WellKnownClasses is a
faster and more compacting GC friendly alternative.

Change-Id: I60e231820b349543a7edb3ceb9cf1ce92db3c843
8151b8fe2987e01ed915ea2053ed42fac95ff3db 11-Dec-2013 Jeff Hao <jeffhao@google.com> Fix FindFieldID to use class's classloader to find field type.

Also includes a test case, though the test case does not recreate
this exact issue because the attached native thread would need to
have a null context classloader.

Bug: 11737351
(cherry picked from 62509b662929175228bb0d0f014ef4ef4e33be10)

Change-Id: I6f15aba990eaf84696c02c37d02e80f88aff59ed
936b37f3a7f224d990a36b2ec66782a4462180d6 14-Feb-2014 Ian Rogers <irogers@google.com> Upcall support for x86-64.

Sufficient to pass jni_internal_test.

Change-Id: Ia0d9b8241ab8450e04765b9c32eb6dc8fc1a8733
815873ecc312b1d231acce71e1a16f42cdaf09f2 14-Feb-2014 Mathieu Chartier <mathieuc@google.com> Change root visitor to use Object**.

Simplifies code and improves the performance of root visiting since
we usually don't need to check to see if the object moved.

Change-Id: Iba998f5a15ae1fa1b53ca5226dd2168a411196cf
d2fe10a3a34af171bf1631219cd2d6ff6b7778b5 15-Jan-2014 Sebastien Hertz <shertz@google.com> Remove blacklist

Removes the class initialization blacklist and use transaction to detect and
revert class initialization attempting to invoke native method. This only
concerns class initialization happening at compilation time when generating an
image (like boot.art for the system).

In transactional mode, we log every object's field assignment and array update.
Therefore we're able to abort a transaction to restore values of fields and
array as they were before the transaction starts. We also log changes to the
intern string table so we can restore its state prior to transaction start.

Since transactional mode only happens at compilation time, we don't need to log
all these changes at runtime. In order to reduce the overhead of testing if
transactional mode is on/off, we templatize interfaces of mirror::Object and
mirror::Array, respectively responsible for setting a field and setting an
array element.

For various reasons, we skip some specific fields from transaction:
- Object's class and array's length must remain unchanged so garbage collector
can compute object's size.
- Immutable fields only set during class loading: list of fields, method,
dex caches, vtables, ... as all classes have been loaded and verified before a
transaction occurs.
- Object's monitor for performance reason.

Before generating the image, we browse the heap to collect objects that need to
be written into it. Since the heap may still holds references to unreachable
objects due to aborted transactions, we trigger one collection at the end of
the class preinitialization phase.

Since the transaction is held by the runtime and all compilation threads share
the same runtime, we need to ensure only one compilation thread has exclusive
access to the runtime. To workaround this issue, we force class initialization
phase to run with only one thread. Note this is only done when generating image
so application compilation is not impacted. This issue will be addressed in a
separate CL.

Bug: 9676614
Change-Id: I221910a9183a5ba6c2b99a277f5a5a68bc69b5f9
e7e8a5fea2d852cccc840fa046151a16627f26cd 15-Feb-2014 Mathieu Chartier <mathieuc@google.com> Remove using mirror::* in jni internal.

Cleans up the code since it helps make it easier to spot moving GC
related bugs.

Also fixed moving GC bugs in MonitorEnter, and FindFieldID.

Change-Id: I794e4fbcc2010875fc6b299c6d4c9fb0f071b71a
8e611d32d8bb32681e94af896eb10d6ce6b8485b 10-Feb-2014 Narayan Kamath <narayan@google.com> Fix function names in CHECK_NON_NULL_ARGUMENT.

Fixes a copy paste error that leads to confusing
JNI error logs.

Change-Id: I27af4e1b206e84d28590c50e38d4f718af2405e9
0177e53ea521ad58b70c305700dab32f1ac773b7 12-Feb-2014 Ian Rogers <irogers@google.com> Work in the direction of hard float quick ABIs.

Pass a shorty to ArtMethod::Invoke so that register setup can use it.
Document x86-64 ABI.
Add extra debug output for one JNI native method registration fails, namely a
dump of the Class and its dex file's location.
Add hack to get testing of OatMethod's without GC maps working in 64bit.

Change-Id: Ic06b68e18eac33637df2caf5e7e775ff95ae70f3
d68ac700820f3e4253c8b4bcf718daf452f6da4c 11-Feb-2014 Mathieu Chartier <mathieuc@google.com> Add more checking to ReleasePrimitiveArray.

When we ReleasePrimitiveArray, we now check that the elements pointer
is not a heap address if it is not equal to the java array's data.

Bug: 12845603
Change-Id: I458862f4dc586ba1c414647c7eb81b978c4ccb7e
83c8ee000d525017ead8753fce6bc1020249b96a 28-Jan-2014 Mathieu Chartier <mathieuc@google.com> Add root types and thread id to root visiting.

Enables us to pass the root type and thread id to hprof.

Bug: 12680863
Change-Id: I6a0f1f9e3aa8f9b4033d695818ae7ca3460d67cb
ef7d42fca18c16fbaf103822ad16f23246e2905d 06-Jan-2014 Ian Rogers <irogers@google.com> Object model changes to support 64bit.

Modify mirror objects so that references between them use an ObjectReference
value type rather than an Object* so that functionality to compress larger
references can be captured in the ObjectRefererence implementation.
ObjectReferences are 32bit and all other aspects of object layout remain as
they are currently.

Expand fields in objects holding pointers so they can hold 64bit pointers. Its
expected the size of these will come down by improving where we hold compiler
meta-data.
Stub out x86_64 architecture specific runtime implementation.
Modify OutputStream so that reads and writes are of unsigned quantities.
Make the use of portable or quick code more explicit.
Templatize AtomicInteger to support more than just int32_t as a type.
Add missing, and fix issues relating to, missing annotalysis information on the
mutator lock.
Refactor and share implementations for array copy between System and uses
elsewhere in the runtime.
Fix numerous 64bit build issues.

Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
055d46c479369ea825712834353660b45215c195 06-Feb-2014 Mathieu Chartier <mathieuc@google.com> Add missing SIRT to LoadNativeLibrary.

When we transition to kWaitingForJniOnLoad, we are suspended and
a GC can occur. This caused issues since classloaders are movable.

Change-Id: Iae59019c22ac64322a82300107d06a4323ee602b
8f4be93c8260b84d706d91586aff572791edd9fe 29-Jan-2014 Mathieu Chartier <mathieuc@google.com> Visit libraries roots in JavaVMExt::VisitRoots

SharedLibrary holds a direct pointer to a class loader. Since class
loaders can move we need to visit these as roots and update them
during the GC. I believe this was causing UnsatisfiedLinkError with
background compaction enabled.

Bug: 8981901
Change-Id: I9e2a230c6dd3c25969abaf2121d8d473f6f8b601
1d27b34d3b18a5a0c832dae9768366dc08ef8d1c 28-Jan-2014 Mathieu Chartier <mathieuc@google.com> Change DisableGC to DisableMovingGC.

Also removed the WaitForConcurrentGC in IncrementDisableMovingGC
since we do not currently support any type of concurrent moving
collectors.

This fixes the performance regression introduced by waiting for the
concurrent GC which manifested itself in framework perf benchmarks
as a result of background compaction.

Change-Id: I524f9ab52e1992419626a27649f232ca6967b03d
3e8b2e1f14176c6beb61a31a27af30bc35998e80 20-Jan-2014 Mathieu Chartier <mathieuc@google.com> Fix bugs in ReleasePrimitiveArray.

JNI_COMMIT should not unpin the array or decrement the disable GC
count.

Change-Id: I8f6beef18c03cff93387a6967f32a8891348642c
1d99e4549309d05007d041d058b1878de88e9585 03-Jan-2014 Ian Rogers <irogers@google.com> Disallow JNI NewObjectArray of primitive types.

Also, make jni_internal_test execute via the interpreter rather than compile
methods. Add tests for passing negative array sizes to JNI routines new
functions. Re-enable the tests NewStringNullCharsNonzeroLength and
NewDirectBuffer_GetDirectBufferAddress_GetDirectBufferCapacity. Test and
explicitly fail if the initial value argument to NewObjectArray isn't
assignable to that type of array.
Use unchecked ObjectArray::Set with NewObjectArray with an initial value.

Change-Id: If3491cb5f974b42cf70c1b850819265f9963ee48
e8c48db6bb507d7fa20c78481c58c23be0045f67 19-Dec-2013 Mathieu Chartier <mathieuc@google.com> 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
62509b662929175228bb0d0f014ef4ef4e33be10 11-Dec-2013 Jeff Hao <jeffhao@google.com> Fix FindFieldID to use class's classloader to find field type.

Also includes a test case, though the test case does not recreate
this exact issue because the attached native thread would need to
have a null context classloader.

Bug: 11737351
Change-Id: Ieb7536702a556485d667361124cd7985b712b093
c528dba35b5faece51ca658fc008b688f8b690ad 26-Nov-2013 Mathieu Chartier <mathieuc@google.com> Enable moving classes.

Slight reduction in Zygote size, memory savings are in the noise.
Before: Zygote size: 8739224
After: Zygote size: 8733568

Fixed a bug where we didn't set the concurrent start bytes after
switching the allocator from bump pointer to ROSAlloc in the
zygote. This caused excessive memory usage.

Added the method verifiers as roots to fix an issue caused by
RegTypes holding a Class*.

Added logic to clear card table in the SemiSpace collector, this
reduces DalvikOther from ~2400k -> ~1760k when using the SemiSpace
collector.

Added a missing lock to the timing loggers which caused a rare
one time crash in std::set.

Bug: 11771255
Bug: 8499494
Bug: 10802951

Change-Id: I99d2b528cd51c1c5ed7012e3220b3aefded680ae
590fee9e8972f872301c2d16a575d579ee564bee 13-Sep-2013 Mathieu Chartier <mathieuc@google.com> Compacting collector.

The compacting collector is currently similar to semispace. It works by
copying objects back and forth between two bump pointer spaces. There
are types of objects which are "non-movable" due to current runtime
limitations. These are Classes, Methods, and Fields.

Bump pointer spaces are a new type of continuous alloc space which have
no lock in the allocation code path. When you allocate from these it uses
atomic operations to increase an index. Traversing the objects in the bump
pointer space relies on Object::SizeOf matching the allocated size exactly.

Runtime changes:
JNI::GetArrayElements returns copies objects if you attempt to get the
backing data of a movable array. For GetArrayElementsCritical, we return
direct backing storage for any types of arrays, but temporarily disable
the GC until the critical region is completed.

Added a new runtime call called VisitObjects, this is used in place of
the old pattern which was flushing the allocation stack and walking
the bitmaps.

Changed image writer to be compaction safe and use object monitor word
for forwarding addresses.

Added a bunch of added SIRTs to ClassLinker, MethodLinker, etc..

TODO: Enable switching allocators, compacting on background, etc..

Bug: 8981901

Change-Id: I3c886fd322a6eef2b99388d19a765042ec26ab99
1eb512d33f94d1dd7ea38263307ba0f7a0dfa653 19-Oct-2013 Ian Rogers <irogers@google.com> Fast JNI support.

Use a modifier to signal a native method is a fast JNI method. If the
modifier is set then don't perform runnable transitions.

Change-Id: I7835b4d837bfdd1cb8e2d54b919c0d5e6cf90499
ce88853ab316c70ef7b598978a3609611db60552 10-Oct-2013 Brian Carlstrom <bdc@google.com> Have JNI FindClass fall back to system ClassLoader
Bug: 10994325

Change-Id: Id0a46e78eecfe8a9eb91008765c4fff48697cc58
d9c4fc94fa618617f94e1de9af5f034549100753 02-Oct-2013 Ian Rogers <irogers@google.com> Inflate contended lock word by suspending owner.

Bug 6961405.
Don't inflate monitors for Notify and NotifyAll.
Tidy lock word, handle recursive lock case alongside unlocked case and move
assembly out of line (except for ARM quick). Also handle null in out-of-line
assembly as the test is quick and the enter/exit code is already a safepoint.
To gain ownership of a monitor on behalf of another thread, monitor contenders
must not hold the monitor_lock_, so they wait on a condition variable.
Reduce size of per mutex contention log.
Be consistent in calling thin lock thread ids just thread ids.
Fix potential thread death races caused by the use of FindThreadByThreadId,
make it invariant that returned threads are either self or suspended now.

Code size reduction on ARM boot.oat 0.2%.
Old nexus 7 speedup 0.25%, new nexus 7 speedup 1.4%, nexus 10 speedup 2.24%,
nexus 4 speedup 2.09% on DeltaBlue.

Change-Id: Id52558b914f160d9c8578fdd7fc8199a9598576a
d91d6d6a80748f277fd938a412211e5af28913b1 26-Sep-2013 Ian Rogers <irogers@google.com> Introduce Signature type to avoid string comparisons.

Method resolution currently creates strings to then compare with strings formed
from methods in other dex files. The temporary strings are purely created for
the sake of comparisons. This change creates a new Signature type that
represents a method signature but not as a string. This type supports
comparisons and so can be used when searching for methods in resolution.

With this change malloc is no longer the hottest method during dex2oat (now its
memset) and allocations during verification have been reduced. The verifier is
commonly what is populating the dex cache for methods and fields not declared
in the dex file itself.

Change-Id: I5ef0542823fbcae868aaa4a2457e8da7df0e9dae
c11d9b8870de5f860b13c84003ade7b3f3125a52 19-Sep-2013 Mathieu Chartier <mathieuc@google.com> Re-enable concurrent system weak sweeping.

Enabled by disallowing new system weaks during the pause and
re-allowing it after the system weaks have been swept. Reduces
GC pause by ~1ms.

Fixes pause regression caused by fix for
Bug: 10626133

Change-Id: If49d33e7ef19cb728ed3cef5187acfa53b9b05d8
6aa3df965395566ed6a4fec4af37c2b7577992e9 18-Sep-2013 Mathieu Chartier <mathieuc@google.com> Refactor system weak sweeping, add support for modification.

Required for moving collectors.

Change-Id: Ib97ba4a05af1139f8d388077a15e62bcb9534855
423d2a3dcbb260b020efb5da59f784c9f02accbf 13-Sep-2013 Mathieu Chartier <mathieuc@google.com> Add support for changing roots through the root visitor callback.

Needed for copying collectors.

Change-Id: Icc4a342a57e0cfb79587edb02ef8c85e08808877
3b7ffa1f4c466f4bf8032c328a47aea83a23868c 07-Sep-2013 Elliott Hughes <enh@google.com> Support apps that pass JNI_VERSION_1_1 to GetEnv.

Bug: 10649815
Change-Id: I73b9bef20f7f8fa96cdcb5afdab9592c35ea0f3e
8fcaca53648e72bfc08b2316d42d844dfd2cef41 22-Aug-2013 Ian Rogers <irogers@google.com> Allow NULL JNI arguments for length 0 memcpys.

Bug 10393546.

(cherry picked from commit 4ffdc6bd962c37bca407267c0858b37bb18a9857)

Change-Id: I02058019be16c07da06cb88654556aac1d7964a8
4ffdc6bd962c37bca407267c0858b37bb18a9857 22-Aug-2013 Ian Rogers <irogers@google.com> Allow NULL JNI arguments for length 0 memcpys.

Bug 10393546.

Change-Id: Ifaba4481e5b356c3e85a32525e6007e35036fcd1
b8a0b94735f188bc739e4c55479c37699006b881 21-Aug-2013 Ian Rogers <irogers@google.com> Switch JNI globals lock to reader-writer.

Also, verifier rejected classes lock. These locks show as contended during
dex2oat, however, they're commonly only read access is required.

Change-Id: If8bb834cc69cd8c26494c87fb7f7b20d4e41cdfd
aa836f7fa2ef359cf8ec1ef98d924f7971ba8352 21-Aug-2013 Elliott Hughes <enh@google.com> Fix PushLocalFrame(0).

Bug: 10395422
Change-Id: Iafef3e496127bfd65db87419ba374a1e5745f148
abd7be989a7509d6dd7325d505fa9926ed502355 15-Aug-2013 Ian Rogers <irogers@google.com> Prevent segvs in JNI.

A segv in JNI code (without CheckJNI) is hard to debug as we fail to see
stacks, pending exceptions.. Make JNI code robust to null arguments, but don't
go to the lengths that CheckJNI does in also sanity checking arguments, the
priority here is just to stop the VM from crashing.

Bug 10305723

Also, allow an unknown throw location not to crash exception dumping.

Found/useful for debugging bug 10331039.

(cherry picked from commit bc939663ccfbe0c648dd6a3670041510aca82420)

Change-Id: Id0203db7d9e320d45ae5ba25d2b63939c79e5c16
02e25119b15a6f619f17db99f5d05124a5807ff3 15-Aug-2013 Mathieu Chartier <mathieuc@google.com> Fix up TODO: c++0x, update cpplint.

Needed to update cpplint to handle const auto.

Fixed a few cpplint errors that were being missed before.

Replaced most of the TODO c++0x with ranged based loops. Loops which
do not have a descriptive container name have a concrete type instead
of auto.

Change-Id: Id7cc0f27030f56057c544e94277300b3f298c9c5
bc939663ccfbe0c648dd6a3670041510aca82420 15-Aug-2013 Ian Rogers <irogers@google.com> Prevent segvs in JNI.

A segv in JNI code (without CheckJNI) is hard to debug as we fail to see
stacks, pending exceptions.. Make JNI code robust to null arguments, but don't
go to the lengths that CheckJNI does in also sanity checking arguments, the
priority here is just to stop the VM from crashing.

Bug 10305723

Also, allow an unknown throw location not to crash exception dumping.

Found/useful for debugging bug 10331039.

Change-Id: Ib1e5540df87e2d9ce7570802d624baae7797611f
ea46f950e7a51585db293cd7f047de190a482414 30-Jul-2013 Brian Carlstrom <bdc@google.com> Refactor java.lang.reflect implementation

Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1.

Move to ArtMethod/Field instead of AbstractMethod/Field and have
java.lang.reflect APIs delegate to ArtMethod/ArtField.

Bug: 10014286.

Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
672a4230348c88cfce3a6dd37593a9257cb5516d 03-Aug-2013 Elliott Hughes <enh@google.com> Not all shared libraries have a JNI_OnLoad.

Change-Id: I7b3b6a48ed5631db6659461072ed4aa735bfd033
(cherry picked from commit 85affca81271f573c75c32316aa6faa8e52448b1)
a4afbb8c46952567713df3534fa451d9bd08956e 03-Aug-2013 Elliott Hughes <enh@google.com> Handle JNI_ERR results from JNI_OnLoad functions specially.

Change-Id: I3042f87493361d8eddab8aeebb92c6252e999425
(cherry picked from commit 7935372ab784477db452d11112cd60d26be87093)
85affca81271f573c75c32316aa6faa8e52448b1 03-Aug-2013 Elliott Hughes <enh@google.com> Not all shared libraries have a JNI_OnLoad.

Change-Id: I7b3b6a48ed5631db6659461072ed4aa735bfd033
7935372ab784477db452d11112cd60d26be87093 03-Aug-2013 Elliott Hughes <enh@google.com> Handle JNI_ERR results from JNI_OnLoad functions specially.

Change-Id: I3042f87493361d8eddab8aeebb92c6252e999425
9dcd45c60c691524bd8ef7d6f65075d9ee3e5554 29-Jul-2013 Elliott Hughes <enh@google.com> Fix NewLocalRef to use AddLocalReference.

Bug: 10026664
Change-Id: I06f8f75a92f73b3b58fa767c0d08d1b736f7d5b5
7934ac288acfb2552bb0b06ec1f61e5820d924a4 26-Jul-2013 Brian Carlstrom <bdc@google.com> Fix cpplint whitespace/comments issues

Change-Id: Iae286862c85fb8fd8901eae1204cd6d271d69496
3e3d591f781b771de89f3b989830da2b6ac6fac8 18-Jul-2013 Brian Carlstrom <bdc@google.com> Fix cpplint build/namespaces issues

Change-Id: I19c68703270c1482d6c6aad8cdf97d3d2924360a
7940e44f4517de5e2634a7e07d58d0fb26160513 12-Jul-2013 Brian Carlstrom <bdc@google.com> Create separate Android.mk for main build targets

The runtime, compiler, dex2oat, and oatdump now are in seperate trees
to prevent dependency creep. They can now be individually built
without rebuilding the rest of the art projects. dalvikvm and jdwpspy
were already this way. Builds in the art directory should behave as
before, building everything including tests.

Change-Id: Ic6b1151e5ed0f823c3dd301afd2b13eb2d8feb81