History log of /art/compiler/jni/jni_compiler_test.cc
Revision Date Author Comments
2b86767c9d05d46a2cc8f2bcf1ded44cd6262ef0 10-May-2016 Dimitry Ivanov <dimitry@google.com> Initialize native loader before starting runtime

Loading public libraries before everything else
to prevent situation when libssl.so gets into
libopenjdk.so load group which then prevented
from unloading by a global library referencing
the very same libssl.so

Bug: http://b/28449304
Change-Id: I3bbff3cc6926c2377ae5cb5b7b5b5d6e26ea4470
(cherry picked from commit c544f34bfed4273b38e5c3769c627e0c3e9c5d73)
2041f98d807edd8afa2ef8c172ed1967472c3d9e 29-Apr-2016 Dimitry Ivanov <dimitry@google.com> Fix check_jni_compiler tests

Test needs to initialize nativeloader on runtime->Start(),
and reset it when runtime is stopped.

Bug: http://b/28449304
Change-Id: I0ba946fe5fc2817dff73154e3191444106dfcb08
(cherry picked from commit 5edb063fc050bad66fe4ae41c93f6d08b0ccccfe)
942dc298d7af3e60fe40c69b4b416ef144e5c723 24-Feb-2016 Dimitry Ivanov <dimitry@google.com> Simplify LoadNativeLibrary()

With ApplicationLoaders.getClassLoader() ensuring
linker-namespace initialization there is no longer
need for LoadNativeLibrary() and callers to pass
along namespace-specific information to art.

This change removes unnecessary parameters of such
calls.

Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: I341d35a2d5195e634678b352f4361f8712984b69
(cherry picked from commit c286a7fcd8a446c086127bf03fd07f904e017336)
c286a7fcd8a446c086127bf03fd07f904e017336 24-Feb-2016 Dimitry Ivanov <dimitry@google.com> Simplify LoadNativeLibrary()

With ApplicationLoaders.getClassLoader() ensuring
linker-namespace initialization there is no longer
need for LoadNativeLibrary() and callers to pass
along namespace-specific information to art.

This change removes unnecessary parameters of such
calls.

Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: I341d35a2d5195e634678b352f4361f8712984b69
d5bbadf44032510b1ce12d9e5f2adad9234cf6b9 15-Dec-2015 Dimitry Ivanov <dimitry@google.com> Use shared namespaces for bundled apps

Shared namespaces clone the list of loaded native
libraries from the caller namespace. This allows
classloaders for bundled apps to share already loaded
libraries with default namespace.

Bug: http://b/26165097
Bug: http://b/22548808
Change-Id: Ia90b603a0ca97194618b82fb191d6790a4b1f281
(cherry picked from commit 986f650d8b552e8b7dbebef1f50f015e7850edfc)
986f650d8b552e8b7dbebef1f50f015e7850edfc 15-Dec-2015 Dimitry Ivanov <dimitry@google.com> Use shared namespaces for bundled apps

Shared namespaces clone the list of loaded native
libraries from the caller namespace. This allows
classloaders for bundled apps to share already loaded
libraries with default namespace.

Bug: http://b/26165097
Bug: http://b/22548808
Change-Id: Ia90b603a0ca97194618b82fb191d6790a4b1f281
5366f5cefd0a1570aa21b3e0df3f86cdbd139f6e 11-Dec-2015 Dimitry Ivanov <dimitry@google.com> Fix call to LoadNativeLibrary

Change-Id: Ie625cdbdf18374b2a8b0adc11758aac47e603625
44409d33e05cd2f73d69e0a98daa5c9e2fe38089 11-Nov-2015 Dmitriy Ivanov <dimitry@google.com> Use isolated namespaces for app native libs

Linker namespaces provide necessary level
of isolation for application native libraries.

The native libraries will no longer be able to
mistakenly depend on platform private libraries
like /system/lib/libssl.so

This change creates one namespace for each instance
of class-loader and uses it when loading native libraries.

For backwards compatibility with older apps we keep
using default namespace and LD_LIBRARY_PATH if target
sdk version is <= 23. (currently set to 0 for testing)

Bug: http://b/22548808
Change-Id: I64e97af7450fbf7e3740ccddda96bb2f7c52e03b
(cherry picked from commit f5a3099c509cf9b8a4ce9c3073a4db47e14a23bc)
f5a3099c509cf9b8a4ce9c3073a4db47e14a23bc 11-Nov-2015 Dmitriy Ivanov <dimitry@google.com> Use isolated namespaces for app native libs

Linker namespaces provide necessary level
of isolation for application native libraries.

The native libraries will no longer be able to
mistakenly depend on platform private libraries
like /system/lib/libssl.so

This change creates one namespace for each instance
of class-loader and uses it when loading native libraries.

For backwards compatibility with older apps we keep
using default namespace and LD_LIBRARY_PATH if target
sdk version is <= 23. (currently set to 0 for testing)

Bug: http://b/22548808
Change-Id: I64e97af7450fbf7e3740ccddda96bb2f7c52e03b
559b1cc279deb9299414ddd46595bb8bca7fa090 24-Jun-2015 Lazar Trsic <Lazar.Trsic@imgtec.com> [MIPS64] JNI Compiler: Sign-extend int function arguments

MIPS n64 ABI differs from arm64. Arguments smaller than the 8B stack
slot need to be sign-extended.

Use combination (lw,sd), instead of (lw,sw) for 4B values.

Change fixes software keyboard crash on mips64.

Bug: 21555893

(cherry picked from commit f652d605753f1387e7797461b47116c5dcdf928d)

Change-Id: I7574d37f6039e9e8c9e0047254be71d28d4c829a
f652d605753f1387e7797461b47116c5dcdf928d 24-Jun-2015 Lazar Trsic <Lazar.Trsic@imgtec.com> [MIPS64] JNI Compiler: Sign-extend int function arguments

MIPS n64 ABI differs from arm64. Arguments smaller than the 8B stack
slot need to be sign-extended.

Use combination (lw,sd), instead of (lw,sw) for 4B values.

Change fixes software keyboard crash on mips64.

Change-Id: I7574d37f6039e9e8c9e0047254be71d28d4c829a
3d21bdf8894e780d349c481e5c9e29fe1556051c 22-Apr-2015 Mathieu Chartier <mathieuc@google.com> Move mirror::ArtMethod to native

Optimizing + quick tests are passing, devices boot.

TODO: Test and fix bugs in mips64.

Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
Some of the savings are from removal of virtual methods and direct
methods object arrays.

Bug: 19264997

(cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33)

Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d

Fix some ArtMethod related bugs

Added root visiting for runtime methods, not currently required
since the GcRoots in these methods are null.

Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes
--trace run-tests 005, 044.

Fixed optimizing compiler bug where we used a normal stack location
instead of double on ARM64, this fixes the debuggable tests.

TODO: Fix JDWP tests.

Bug: 19264997

Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3

ART: Fix casts for 64-bit pointers on 32-bit compiler.

Bug: 19264997
Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457

Fix JDWP tests after ArtMethod change

Fixes Throwable::GetStackDepth for exception event detection after
internal stack trace representation change.

Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of
proxy method.

Bug: 19264997
Change-Id: I363e293796848c3ec491c963813f62d868da44d2

Fix accidental IMT and root marking regression

Was always using the conflict trampoline. Also included fix for
regression in GC time caused by extra roots. Most of the regression
was IMT.

Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to
detached thread.

EvaluateAndApplyChanges:
From ~2500 -> ~1980
GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots

Bug: 19264997
Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0

Fix bogus image test assert

Previously we were comparing the size of the non moving space to
size of the image file.

Now we properly compare the size of the image space against the size
of the image file.

Bug: 19264997
Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a

[MIPS64] Fix art_quick_invoke_stub argument offsets.

ArtMethod reference's size got bigger, so we need to move other args
and leave enough space for ArtMethod* and 'this' pointer.

This fixes mips64 boot.

Bug: 19264997
Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
e401d146407d61eeb99f8d6176b2ac13c4df1e33 22-Apr-2015 Mathieu Chartier <mathieuc@google.com> Move mirror::ArtMethod to native

Optimizing + quick tests are passing, devices boot.

TODO: Test and fix bugs in mips64.

Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
Some of the savings are from removal of virtual methods and direct
methods object arrays.

Bug: 19264997
Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
48ee356484225ef0d7cfa197b1699524b866c802 11-Apr-2015 Andreas Gampe <agampe@google.com> ART: Ignore result for exception-case JNIEndWithReference

The value may not contain a valid jobject, so ignore and use null
directly.

Refactor a bit to have one common function for both synchronized
and non-synchronized case.

Add a test to the JNI compiler tests.

Bug: 18135031
Change-Id: If2f004a112f36f4ff68172a946dec67ce561ae4d
da4d79bc9a4aeb9da7c6259ce4c9c1c3bf545eb8 24-Mar-2015 Roland Levillain <rpl@google.com> Unify ART's various implementations of bit_cast.

ART had several implementations of art::bit_cast:

1. one in runtime/base/casts.h, declared as:

template <class Dest, class Source>
inline Dest bit_cast(const Source& source);

2. another one in runtime/utils.h, declared as:

template<typename U, typename V>
static inline V bit_cast(U in);

3. and a third local version, in runtime/memory_region.h,
similar to the previous one:

template<typename Source, typename Destination>
static Destination MemoryRegion::local_bit_cast(Source in);

This CL removes versions 2. and 3. and changes their callers
to use 1. instead. That version was chosen over the others
as:
- it was the oldest one in the code base; and
- its syntax was closer to the standard C++ cast operators,
as it supports the following use:

bit_cast<Destination>(source)

since `Source' can be deduced from `source'.

Change-Id: I7334fd5d55bf0b8a0c52cb33cfbae6894ff83633
369810a98e6394b6dd162f5349e38a1f597b3bc7 15-Jan-2015 Andreas Gampe <agampe@google.com> ART: Allow scoped adjustments to log verbosity

Add ScopedLogSeverity to adjust the logging level.

Suppress warnings by default in gtests. Suppress errors in instances
where errors are expected.

Change-Id: If3ef865813e9505ab60bc90baed63ff11d90afbb
956af0f0cb05422e38c1d22cbef309d16b8a1a12 11-Dec-2014 Elliott Hughes <enh@google.com> Remove portable.

Change-Id: I3bf3250fa866fd2265f1b115d52fa5dedc48a7fc
277ccbd200ea43590dfc06a93ae184a765327ad0 04-Nov-2014 Andreas Gampe <agampe@google.com> ART: More warnings

Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general,
and -Wunused-but-set-parameter for GCC builds.

Change-Id: I81bbdd762213444673c65d85edae594a523836e5
6a3c1fcb4ba42ad4d5d142c17a3712a6ddd3866f 31-Oct-2014 Ian Rogers <irogers@google.com> Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags.

Fix associated errors about unused paramenters and implict sign conversions.
For sign conversion this was largely in the area of enums, so add ostream
operators for the effected enums and fix tools/generate-operator-out.py.
Tidy arena allocation code and arena allocated data types, rather than fixing
new and delete operators.
Remove dead code.

Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
677cd61ad05d993c4d3b22656675874f06d6aabc 15-Oct-2014 Ian Rogers <irogers@google.com> Make ART compile with GCC -O0 again.

Tidy up InstructionSetFeatures so that it has a type hierarchy dependent on
architecture.
Add to instruction_set_test to warn when InstructionSetFeatures don't agree
with ones from system properties, AT_HWCAP and /proc/cpuinfo.
Clean-up class linker entry point logic to not return entry points but to
test whether the passed code is the particular entrypoint. This works around
image trampolines that replicate entrypoints.
Bug: 17993736

(cherry picked from commit 6f3dbbadf4ce66982eb3d400e0a74cb73eb034f3)

Change-Id: I3e7595f437db4828072589d475a5453b7f31003e
6f3dbbadf4ce66982eb3d400e0a74cb73eb034f3 15-Oct-2014 Ian Rogers <irogers@google.com> Make ART compile with GCC -O0 again.

Tidy up InstructionSetFeatures so that it has a type hierarchy dependent on
architecture.
Add to instruction_set_test to warn when InstructionSetFeatures don't agree
with ones from system properties, AT_HWCAP and /proc/cpuinfo.
Clean-up class linker entry point logic to not return entry points but to
test whether the passed code is the particular entrypoint. This works around
image trampolines that replicate entrypoints.
Bug: 17993736

Change-Id: I5f4b49e88c3b02a79f9bee04f83395146ed7be23
647b1a86f518d8db0331b3d52a96392b7a62504b 10-Oct-2014 Ian Rogers <irogers@google.com> Fix 2 new sets of clang compiler warnings.

Fix issues that are flagged by -Wfloat-equal and -Wmissing-noreturn.
In the case of -Wfloat-equal the current cases in regular code are deliberate,
so the change is to silence the warning. For gtest code the appropriate fix is
to switch from EXPECT_EQ to EXPECT_(FLOAT|DOUBLE)_EQ.
The -Wmissing-noreturn warning isn't enabled due to a missing noreturn in
gtest. This issue has been reported to gtest.

Change-Id: Id84c70c21c542716c9ee0c41492e8ff8788c4ef8
63bc11efaac0c041e849ab401f9fc368631a00f5 18-Sep-2014 Ian Rogers <irogers@google.com> DO NOT MERGE. Only have a portable entrypoint in portable builds.

Bug: 16214885

Change-Id: Iff7b7415efdbdabd7e6020e221a540f6a774c852
38bd1e1b8aa39bdc6e67c5dc205cc8d294d985c5 19-Aug-2014 Andreas Gampe <agampe@google.com> ART: Fix ARM invoke stub, run Generic JNI in jni_compiler_test

On devices which support it, run all jni compiler tests also with
the Generic JNI infrastructure.

Fix art_quick_invoke_stub for ARM32 to enforce 16B stack alignment.
As the native convention does not require as much, the previous
code would keep it unaligned.

Bug: 17107929

(cherry picked from commit 6e498695b60f1532d2264ec6badb1cd6e10ecaa9)

Change-Id: I1481500ff7c627ab4e5bfbfd7245099a639aa049
6e498695b60f1532d2264ec6badb1cd6e10ecaa9 19-Aug-2014 Andreas Gampe <agampe@google.com> ART: Fix ARM invoke stub, run Generic JNI in jni_compiler_test

On devices which support it, run all jni compiler tests also with
the Generic JNI infrastructure.

Fix art_quick_invoke_stub for ARM32 to enforce 16B stack alignment.
As the native convention does not require as much, the previous
code would keep it unaligned.

Bug: 17107929
Change-Id: Ibce423949846e447d2b0246d07973b6b717691ac
ebee8de725d5fa83483642786b19ea453d865762 13-Aug-2014 Nicolas Geoffray <ngeoffray@google.com> Fix bugs in the x86 and arm versions of generic JNI.

Also fix the run script of 116-nodex2oat to use the non-prebuild
script for target.

Bug: 17000769

(cherry-picked from commit 54accbca0b549b1b1ad3ef09655dad438bc1e104)

Change-Id: I439fcd710fb8bb408f3288ff8fb34fef23890adb
54accbca0b549b1b1ad3ef09655dad438bc1e104 13-Aug-2014 Nicolas Geoffray <ngeoffray@google.com> Fix bugs in the x86 and arm versions of generic JNI.

Also fix the run script of 116-nodex2oat to use the non-prebuild
script for target.

Bug: 17000769

Change-Id: I439fcd710fb8bb408f3288ff8fb34fef23890adb
68d8b42ddec39ec0174162d90d4abaa004d1983e 17-Jul-2014 Ian Rogers <irogers@google.com> Wire up check JNI force copy mode.

Increase check JNI checks.
Break apart jni_internal.h in to jni_env_ext.h and java_vm_ext.h.
Fix the abuse of ScopedObjectAccess/annotalysis by ScopedCheck in the case
of VM routines.
Make class loader override and shared library class loader JNI global
references rather than mirror pointers.
Clean-ups to native bridge.

Change-Id: If7c6110b5aade7a402bfb67534af86a7b2cdeb55
ee2d1ada2b9d0400e56c63656f9abfbccc880377 24-Jul-2014 Vladimir Marko <vmarko@google.com> Fix JNI compiler frame size adjustments.

Bug: 16321952

(cherry picked from 4e24b9da7c5ea6e517ecdbc09aa14a0995100b7e)

Change-Id: I486b7ad7ebefc7db9b56fe92809ef495c316292b
4e24b9da7c5ea6e517ecdbc09aa14a0995100b7e 24-Jul-2014 Vladimir Marko <vmarko@google.com> Fix JNI compiler frame size adjustments.

Bug: 16321952
Change-Id: I6f84a59c679e335e02a8e70944a5d0bc8d73f90b
04c31d2c984d382b4186974fa0a416aecbed2625 08-Jul-2014 Ian Rogers <irogers@google.com> JNI dlsym lookup fixes.

Thread* self is passed on all architectures apart from ARM and ARM64.
On x86 restore ebx correctly. Pass self in correct register on x86-64.
Ensure methods are compiled in jni_compiler_test even if the generic JNI
trampoline is present.

Change-Id: If5fdb1de97b78ac5a5cf8d0915c5b82311f23eb9
c200a4abeca91e19969f5b35543f17f812ba32b9 17-Jun-2014 Andreas Gampe <agampe@google.com> ART: Rework Generic JNI, add ARM version

Refactors and optimizes Generic JNI. This version uses TwoWordReturn
to avoid writing to / loading from the bottom of the alloca.

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

Merge ART from AOSP to lmp-preview-dev.

Change-Id: I0f578733a4b8756fd780d4a052ad69b746f687a9
cf4035a4c41ccfcc3e89a0cee25f5218a11b0705 29-May-2014 Andreas Gampe <agampe@google.com> ART: Use StackReference in Quick Stack Frame

The method reference at the bottom of a quick frame is a stack
reference and not a native pointer. This is important for 64b
architectures, where the notions do not coincide.

Change key methods to have StackReference<mirror::ArtMethod>*
parameter instead of mirror::ArtMethod**. Make changes to
invoke stubs for 64b archs, change the frame setup for JNI code
(both generic JNI and compilers), tie up loose ends.

Tested on x86 and x86-64 with host tests. On x86-64, tests succeed
with jni compiler activated. x86-64 QCG was not tested.

Tested on ARM32 with device tests.

Fix ARM64 not saving x19 (used for wSUSPEND) on upcalls.

Tested on ARM64 in interpreter-only + generic-jni mode.

Fix ARM64 JNI Compiler to work with the CL.

Tested on ARM64 in interpreter-only + jni compiler.

Change-Id: I77931a0cbadd04d163b3eb8d6f6a6f8740578f13
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
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
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
1dd61ba3081a52c3e2efdc78d64f5c134eea7895 02-Apr-2014 Vladimir Kostyukov <vladimir.kostyukov@intel.com> ART: A workaround for a wrongly-read caller's frame

The quick-trampoline treats caller's frame in a different way
then it was formed by quck-invoke stub for hard float ABI targets
such as x86_64 and aarch64. The patch workarounds the issue of
wrongly-read stack arguments due to no contract between quick-invoke
stub and quick-trampoline/shadow-frame-builder regarding the reg-
spill area.

Change-Id: I302f212b4ea5e38632527a5ace03f136b21ef806
Signed-off-by: Vladimir Kostyukov <vladimir.kostyukov@intel.com>
ad61517890168ff6ed19063cc8032a9c033d135b 05-Apr-2014 Andreas Gampe <agampe@google.com> Fix wrong handling of Generic JNI not finding native method.

Code did not properly call JNIMethodEnd, such that locks etc
where not correctly handled.

Add a test case to jni_compiler_test.

Change-Id: If2d5c628517d65a56dd6bb5c4cabdff77c7664a1
ee1d79a603c77c0667b27c075a983579d5c51f7e 21-Feb-2014 Sebastien Hertz <shertz@google.com> Cleanup transaction support

Updates Thread::CreateInternalStackTrace to support both transactional and
non-transactional modes using template.

Generalizes non-transactional mode for invariant fields (which are set only
once).

Removes ArrayLog::VisitRoots as we never create Array logs of ObjectArray. As
ObjectArray elements are set using Object::SetFieldObject, they are already
recorded in the object logs: the object is the array itself and the offset
corresponds to the element index in this array. And also checks we never log
ObjectArray in array logs.

Fixes location of thrown exception when calling native method during class
initialization.

Change-Id: Idbc368d3b8292b85ff40bc8a7c559e085477bf89
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
0f6784737882199197796b67b99e5f1ded383bee 11-Mar-2014 Ian Rogers <irogers@google.com> Unify 64bit int constant definitions.

LL and ULL prefixes are word size dependent, use the INT64_C and UINT64_C
macros instead.

Change-Id: I5b70027651898814fc0b3e9e22a18a1047e76cb9
7a0e504e60441012c78fc2f3ab8d4da131185c50 07-Mar-2014 Andreas Gampe <agampe@google.com> More JNI compiler tests and small fix

Add checks for alignment, floats, and maximum number of parameters
Fixed x86_64 ABI wrong interpretation (floats not widened in registers)

Change-Id: I6c09af4914b7675ac0275ce21003e317ca44a403
bf6b92a158053c98b15f4393abb3b86344ec9a20 06-Mar-2014 Andreas Gampe <agampe@google.com> Generic JNI implementation for x86_64

Starting implementation for generic JNI on x86_64. Frames are of
large static size (>4K) right now, should be compacted later. Passes
the whole of jni_compiler_test.

Change-Id: I88ac3e13a534afe7568d62a1ef97cb766e8260e4
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
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
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
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
2ce745c06271d5223d57dbf08117b20d5b60694a 18-Jul-2013 Brian Carlstrom <bdc@google.com> Fix cpplint whitespace/braces issues

Change-Id: Ide80939faf8e8690d8842dde8133902ac725ed1a
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