History log of /art/runtime/common_runtime_test.h
Revision Date Author Comments
a01b5249c529829f47774d15b890b4716e935068 27-Mar-2017 Alex Light <allight@google.com> Make base64 explicitly check dst_size for nullptr

Also moved it out of utils.h and into common_runtime_test.h since it
is only used for tests.

Test: ./test.py --host -j40
Change-Id: Ib3c18cb510be833928482c0b2f47f9fb02933f7f
19772bf5cbfc8fdaddabc945c25d34e236d1d753 16-Feb-2017 Roland Levillain <rpl@google.com> Disable the dex2oat swap test for x86 altogether.

On x86, this test has been seen failing on the CMS
configuration, not just the CC configuration.

Test: m ART_USE_READ_BARRIER=true test-art-host-gtest
Test: m ART_USE_READ_BARRIER=false test-art-host-gtest
Bug: 29259363
Change-Id: I3690aaec0aedd0020660aff42b408487e042cfd4
57070daa94f1eb98bea947494b98ac296eebeed6 14-Feb-2017 Vladimir Marko <vmarko@google.com> Revert "Enable dex2oat swap test for CC on x86."

Is't still failing and the difference can be
rather huge:
Expected: (native_alloc_2_) < (native_alloc_1_),
actual: 379712 vs 248600

Bug: 29259363

This reverts commit 38f5663a970b633f08e144b4dff33633c51352ee.

Change-Id: Ie1d62fbba688aeadffb9d5aafd5b9cf632742ed6
38f5663a970b633f08e144b4dff33633c51352ee 13-Feb-2017 Vladimir Marko <vmarko@google.com> Enable dex2oat swap test for CC on x86.

The test should be OK after
https://android-review.googlesource.com/335763

Test: m ART_USE_READ_BARRIER=true test-art-host-gtest
Bug: 29259363
Change-Id: I16f4051036b247b4f520533e77eaa71d6ff7bb41
0afd1be3c2bd0b77e9264bbac6649a2a7129044f 04-Nov-2016 Andreas Gampe <agampe@google.com> ART: Remove "explicit" annotation

Remove unnecessary annotation.

Bug: 32619234
Test: m
Change-Id: I8bbef5e3b4b8d3f5ddeaece08fe614b9eeae6f2c
d01f60cbed4ba360b84f1310d2e0d422d6a16534 28-Oct-2016 Nicolas Geoffray <ngeoffray@google.com> Add a VerifierDeps::Dump method.

Also, fix the Encode/Decode logic around dex file order:
iterating over a std::map doesn't guarantee insertion order.

test: verifier_deps_test
bug: 30937355

Change-Id: Id3efd703b3c8ca21ab49c2600c612c132fb021cd
1cc62e4ea24828fdb3f3da0b8603f0b107d09a04 04-Oct-2016 Mathieu Chartier <mathieuc@google.com> Rename ObjPtr::Decode to ObjPtr::Ptr

Done to prevent ambiguity with ScopedObjectAccess::Decode.

Bug: 31113334

Test: test-art-host
Change-Id: I07a2497cc9cf66386311798933547471987fc316
3398c7874e002beaa6c2b2fadf183e7d1ddad23a 30-Sep-2016 Mathieu Chartier <mathieuc@google.com> Move ArtField to ObjPtr

Added EXPECT_OBJ_PTR_EQ and variants to gtests.

Fixed moving GC bugs in:
ClassLinker::CreatePathClassLoader
ClassLinkerTest: StaticFields

ObjPtr Decode call sites: 186 -> 181.

Some tests fail due to ResolvedFieldAccessTest, will fix in follow
up CL.

Bug: 31113334

Test: test-art-host CC baker

Change-Id: I8b266ad00f3c20c8cbe7cfdf280d175083df0b88
496577fb4d6d7baea9c093d35d17e208c831bbca 21-Sep-2016 Mathieu Chartier <mathieuc@google.com> Smarter image layout

Put strings in the dex file that resolves them.

Depth first traversal with overrides for class and dex cache. The
work list keeps track of what oat_index with each pushed item. This
means the static fields of a class will usually be in the same image.

Added layout test to image_test to make sure things are somewhat
reasonably attributed.

Bug: 28640955

Test: test-art-host

(cherry picked from commit 4e9c4e746617bad6a012d799d2f5cf9e01d24ea2)

Change-Id: I67a536c33aeed603b252d8e0f75622c9efbf2559
4e9c4e746617bad6a012d799d2f5cf9e01d24ea2 21-Sep-2016 Mathieu Chartier <mathieuc@google.com> Smarter image layout

Put strings in the dex file that resolves them.

Depth first traversal with overrides for class and dex cache. The
work list keeps track of what oat_index with each pushed item. This
means the static fields of a class will usually be in the same image.

Added layout test to image_test to make sure things are somewhat
reasonably attributed.

Bug: 28640955

Test: test-art-host

Change-Id: I67a536c33aeed603b252d8e0f75622c9efbf2559
866d874c4fca90385251a1df28eed0eb6e1b88e2 22-Sep-2016 Mathieu Chartier <mathieuc@google.com> Make image test multi image

Required for testing multi image layout in future CLs.

Bug: 28640955

Test: clean-oat-host, test-art-host, device booting

(cherry picked from commit 25adcfb7dc81131add3a0a681ae18bced6f7a0e0)

Change-Id: I14809f56e711b4a87e01056c327eddbbd087f4ee
25adcfb7dc81131add3a0a681ae18bced6f7a0e0 22-Sep-2016 Mathieu Chartier <mathieuc@google.com> Make image test multi image

Required for testing multi image layout in future CLs.

Bug: 28640955

Test: clean-oat-hos, test-art-host, device booting

Change-Id: I14809f56e711b4a87e01056c327eddbbd087f4ee
367f3dd32454858b8b25d87feb8f6599d3b4c9dd 02-Sep-2016 Igor Murashkin <iam@google.com> jni: Add @CriticalNative optimization to speed up JNI transitions

Change-Id: I963059ac3a72dd8e6a867596c356d7062deb6da7
04147efc0621ce09fb4548cc482d42da2ff4e088 06-Sep-2016 Roland Levillain <rpl@google.com> Add build rules for statically linked oatdump on host.

Also extend oatdump_test to exercise oatdump(d)s.

Test: ART_BUILD_HOST_STATIC=true m test-art-host-gtest-oatdump_test
Bug: 29530992
Change-Id: I6eb6c96f385832733d18d0400abd9974a6d8e45c
0f7eaebb1622e08482c519fe5eaab9afa8f64df1 01-Sep-2016 Jeff Hao <jeffhao@google.com> Disable dexlayout_test on target.

Target doesn't have diff to compare output files.

Bug: 29921113
Test: mm test-art-target-gtest-dexlayout_test
Change-Id: I244c0c74214b780676283de1b309978667ff58e3
bdf7f1c3ab65ccb70f62db5ab31dba060632d458 31-Aug-2016 Andreas Gampe <agampe@google.com> ART: SHARED_REQUIRES to REQUIRES_SHARED

This coincides with the actual attribute name and upstream usage.
Preparation for deferring to libbase.

Test: m
Test: m test-art-host
Change-Id: Ia8986b5dfd926ba772bf00b0a35eaf83596d8518
3aaa37bba53d6df0265793de48b4b0b57327e57a 29-Jul-2016 jessicahandojo <jessicahandojo@google.com> creating workflow for mirror::String compression

All-ASCII String characters are stored in 8-bit blocks
instead of 16-bit. The compression has not taken place, but all
workflow are in the code already (changing kUseStringCompression in
string.h file to TRUE will enable the feature)

Notes: Feature works on interpreter only without optimizing

Test art: m ART_TEST_INTERPRETER=true ART_TEST_OPTIMIZING=false
test-art-host

Also tested with String tests from libcore/:
1. libcore.java.lang.StringTest
2. libcore.java.lang.StringBufferTest
3. libcore.java.lang.StringBuilderTest
4. libcore.java.lang.OldStringTest
5. libcore.java.lang.OldStringBufferTest

Memory improvement is 33% (from 6.03% to 4.03%, total String memory
from all apps per total memory of all apps) measured on Angler
with Hprof tools

Bug: 31040547
Change-Id: I9cc92c265ebf1305fc06b5fc33efd83797660cce
a794c26a0909f5d882f236f12d7f5fd30a336f35 25-Jul-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix art::ArchTest::FinalizeSetup not being called.

CommonRuntimeTestImpl::SetUp() is calling FinalizeSetup. Since
CommonRuntimeTestImpl::FinalizeSetup is not virtual (it's virtual
one step higher in class hierarchy in CommonRuntimeTestBase), overridden
version in ArchTest was never used. This is causing ArchTest to
fail with openjdk8u60 version of java.lang.reflect (it's calling
Class#getDeclaredField in clinit, which fails on 32 bit
version because of different pointer sizes [arch_test forces
64-bit ISA])

Bug: 28666126
Test: make -j 32 test-art-host-gtest
Change-Id: Ief370f5b18ef787575ac0f88ecbe17ebbf037542
63b6eb400c9d9052447b213471f90dfa4e6f242c 28-Jul-2016 Roland Levillain <rpl@google.com> Disable CheckSwapUsage test with read barriers on x86.

This test does not produce the expected results on
some x86 systems when read barriers are enabled.

Also remove unused TEST_DISABLED_FOR_READ_BARRIER macro
definition.

Test: m test-art-host-gtest
Bug: 29259363
Bug: 12687968
Change-Id: If7c124226b32c10425725e62bb684150aba108ab
e1459ae21f1eb6ed779bf9d049e4f41f1edf89e7 29-Jun-2016 Andreas Gampe <agampe@google.com> ART: Add dex2oat swap-usage parameters

Make the dex2oat swap usage decision dependent on parameters that
can be changed on the command line. Both the dex file size and dex
file count can be modified through the following to new parameters:

--swap-dex-size-threshold
--swap-dex-count-threshold

The defaults remain the same (20MB and 2).

Factor out some dex2oat setup code from oat_file_assistant_test
and use it in a new dex2oat test.

Bug: 29557002
Change-Id: I8863224f0304c98afe251572ffda8c5b3ead735b
Test: m test-art-host-gtest-dex2oat_test
Test: m test-art-host-gtest-oat_file_assistant_test
Test: m test-art-host
25a9abe3cd9594a60d353c0277b4f9e49a71a40a 24-Jun-2016 Andreas Gampe <agampe@google.com> ART: Add dex2oat swap-usage parameters

Make the dex2oat swap usage decision dependent on parameters that
can be changed on the command line. Both the dex file size and dex
file count can be modified through the following to new parameters:

--swap-dex-size-threshold
--swap-dex-count-threshold

The defaults remain the same (20MB and 2).

Factor out some dex2oat setup code from oat_file_assistant_test
and use it in a new dex2oat test.

Bug: 29557002
Test: m test-art-host-gtest-dex2oat_test
Test: m test-art-host-gtest-oat_file_assistant_test
Test: m test-art-host
Change-Id: I2814a0b895d960416d20b31c4b0052f98c9cb5e6
91c911690868a1a109ec6d52666def5682b026e1 15-Jan-2016 Mathieu Chartier <mathieuc@google.com> Add value parameterized test support for runtime tests

Usage is demonstrated in type_lookup_table_test.

Bug: 10245322

Change-Id: Ife6eb1ed57cb12edecce9ef101215ff15ae032e1
c7d4a5889085de271130c1ebeb83f96881195124 30-Sep-2015 Andreas Gampe <agampe@google.com> ART: Use non-stripped core jars in gtests

To support emulators and other preopted device configurations, use
a special core-libart and core-oj version that will never be stripped.

Bug: 24535627
Change-Id: Ie632bc382bbc753e9c100039f2ecc4ac1f2ab249
a00f012660e9a4baa34c0ab96042f7146e9a6017 17-Dec-2015 Andreas Gampe <agampe@google.com> ART: Refactor CommonRuntimeTest::SetUp

Factor out finishing up the runtime. This code will execute the
interpreter to initialize important classes etc., which is not
necessary for testing RuntimeMethod sizes and trampoline entrypoints,
in fact it may violate pointer-size invariants.

Also add InstructionSet parsing tests to the ParsedOptions test.

Change-Id: I75cd00c6d358e1bc962c8f1845244f6400c1cd6c
0d5a281c671444bfa75d63caf1427a8c0e6e1177 13-Nov-2015 Roland Levillain <rpl@google.com> x86/x86-64 read barrier support for concurrent GC in Optimizing.

This first implementation uses slow paths to instrument heap
reference loads and GC root loads for the concurrent copying
collector, respectively calling the artReadBarrierSlow and
artReadBarrierForRootSlow (new) runtime entry points.

Notes:
- This implementation does not instrument HInvokeVirtual
nor HInvokeInterface instructions (for class reference
loads), as the corresponding read barriers are not stricly
required with the current concurrent copying collector.
- Intrinsics which may eventually call (on slow path) are
disabled when read barriers are enabled, as the current
slow path infrastructure does not support this case.
- When read barriers are enabled, the code generated for a
HArraySet instruction always go into the array set slow
path for object arrays (delegating the operation to the
runtime), as we are lacking a mechanism to keep a
temporary register live accross a runtime call (needed for
the instrumentation of type checking code, which requires
two successive read barriers).

Bug: 12687968
Change-Id: I14cd6107233c326389120336f93955b28ffbb329
5b8e6e36e96d6d1921dd356fa46191d1e6a18082 30-Sep-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix for gtest missing core classes, attempt 2

common_runtime_test loads both core-libart and
core-oj

Change-Id: I8a4d5750b99aed2e500cad89b841a57fe9c1ca69
be26f77dac06fb02b0cc80914b740662bf8d0b26 30-Sep-2015 Narayan Kamath <narayan@google.com> Revert "Fix for gtest missing core classes."

This reverts commit fa5480de6eca7f43b147c696bdb2936dc48d75d7.

Change-Id: Ifa9851f4f90af6093ed0bca852c55b3026fcd554
136781e23244f9a42ba08de7035c675cfd4d108b 30-Sep-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix for gtest missing core classes.

common_runtime_test loads both core-libart and
core-oj

Change-Id: I5b814e4dcf9f6162c47b4eb5e7890a32e59c2cef
90443477f9a0061581c420775ce3b7eeae7468bc 17-Jul-2015 Mathieu Chartier <mathieuc@google.com> Move to newer clang annotations

Also enable -Wthread-safety-negative.

Changes:
Switch to capabilities and negative capabilities.

Future work:
Use capabilities to implement uninterruptible annotations to work
with AssertNoThreadSuspension.

Bug: 20072211

Change-Id: I42fcbe0300d98a831c89d1eff3ecd5a7e99ebf33
4d02711ea578dbb789abb30cbaf12f9926e13d81 01-Jul-2015 Roland Levillain <rpl@google.com> Implement heap poisoning in ART's Optimizing compiler.

- Instrument ARM, ARM64, x86 and x86-64 code generators.
- Note: To turn heap poisoning on in Optimizing, set the
environment variable `ART_HEAP_POISONING' to "true"
before compiling ART.

Bug: 12687968
Change-Id: Ib3120b38cf805a8a50207a314b9ccc90c8d93740
bfa5eb6e8d15ea73a36f8df449630f285a91e995 30-May-2015 Hiroshi Yamauchi <yamauchi@google.com> Add heap poisoning support to the entrypoints.

In preparation for full compiler/managed-code support.

Enable stub_test with heap poisoning.

Bug: 12687968
Change-Id: I79fc54ce6386c0a1eb9621759bb4cc23bc393a75
d90957fbe6f41c66d5494ae5db1f60d2434d4c84 01-May-2015 Douglas Leung <douglas.leung@imgtec.com> ART: Fix mips64 jni bugs.

For mips64, 32-bits loads can be zero extended or sign extended to
64-bits. The extension type must match the data type to be loaded.

Also re-enable mips64 generic jni testing.

Change-Id: I9cabaf80b4fde63d9868fccd74593b36d1c324e8
3e52aa4d406fe802dabee2a2e7ba8764cc13aaaa 12-Apr-2015 David Srbecky <dsrbecky@google.com> Move GetAndroidToolsDir to common location.

Move the code which looks for the prebuilts directory
to CommonRuntimeTest and add test for it.

Change-Id: Id804de31c466656957fdd4b6a470f80a00477aed
bb9c6b1c55e9e2308b4f5892a398a8837231fdbd 29-Mar-2015 Andreas Gampe <agampe@google.com> ART: Refactor callbacks_ in common_runtime_test

The callback is now important for some runtime checks, and just
resetting callbacks_ is not correct anymore.

Change-Id: I2cb806f1916fd5ea190911a833ce460be557a428
81c6f8db12b203878a7d72444ead2bc7cf5c47ad 26-Mar-2015 Andreas Gampe <agampe@google.com> ART: PathClassLoader for compiler

Use an actual PathClassLoader when compiling apps, instead of a
side structure and cutout.

This CL sets up a minimal object 'cluster' that recreates the Java
side of a regular ClassLoader such that the Class-Linker will
recognize it and use the internal native fast-path.

This CL removes the now unnecessary compile-time-classpath and
replaces it with a single 'compiling-the-boot-image' flag in the
compiler callbacks.

Note: This functionality is *only* intended for the compiler, as
the objects have not been completely initialized.

Bug: 19781184

Change-Id: I7f36af12dd7852d21281110a25c119e8c0669c1d
66d874d96d5699bb090c59f47a5a528956ca053e 15-Jan-2015 Richard Uhler <ruhler@google.com> Create OatFileAssistant class for assisting with oat files.

The oat file assistant is used for determining whether dex2oat or
patchoat is needed, for running dex2oat or patchoat as needed to make
an oat file up to date, and to load dex files associated with a given
dex location.

The introduction of the OatFileAssistant class is meant to clean up and
consolidate code related to the management of oat files that was
duplicated and spread across dalvik_system_DexFile.cc and
class_linker.cc.

Bug: 11301553
Change-Id: I0c16027b9bae4570c2c50faa9c14f581c0cbafb8
aaebaa0121be3b9d9f13630585304482cbcaeb4b 26-Jan-2015 Igor Murashkin <iam@google.com> art: Refactor RuntimeOptions/ParsedOptions

Refactor the RuntimeOptions to be a
type-safe map (VariantMap, see runtime_options.h) and the ParsedOptions
to delegate the parsing to CmdlineParser (see cmdline/cmdline_parser.h).

This is the start of a command line parsing refactor, and may include
more in the future (dex2oat, patchoat, etc).

For more details of the command line parsing generator usage see cmdline/README.md

Change-Id: Ic67c6bca5e1f33bf2ec60e2e3ff8c366bab91563
fbef44de596d298dc6430f482dffc933a046dd28 23-Dec-2014 Richard Uhler <ruhler@google.com> Use unique_ptr to track ownership of dex files.

Bug: 18809837
Change-Id: Ie571eae8fc19ee9207390cff5c7e2a38071b126a
c275259449ec57987e52d3ab1eda3272b994488f 02-Jan-2015 Richard Uhler <ruhler@google.com> Remove back-door bootclasspath option from Runtime

The 'bootclasspath' option allowed users of the Runtime to load their
own boot class path DexFiles and pass them directly to the Runtime as
an option. This obscures the fact that the Runtime must take ownership
of the boot class path DexFiles.

This change removes the use of the bootclasspath option by dex2oat and
the common runtime tests. For dex2oat, we use the existing
-Xbootclasspath option instead, and introduce a new
-Xbootclasspath-locations option to override the dex locations for the
loaded boot class path dex files. For the common runtime tests, we
simply use -Xbootclasspath.

Bug: 18809837
Change-Id: Idfcd4885390bf0f3dc350993756dd337220def73
e21dc3db191df04c100620965bee4617b3b24397 09-Dec-2014 Andreas Gampe <agampe@google.com> ART: Swap-space in the compiler

Introduce a swap-space and corresponding allocator to transparently
switch native allocations to memory backed by a file.

Bug: 18596910

(cherry picked from commit 62746d8d9c4400e4764f162b22bfb1a32be287a9)

Change-Id: I131448f3907115054a592af73db86d2b9257ea33
62746d8d9c4400e4764f162b22bfb1a32be287a9 09-Dec-2014 Andreas Gampe <agampe@google.com> ART: Swap-space in the compiler

Introduce a swap-space and corresponding allocator to transparently
switch native allocations to memory backed by a file.

Bug: 18596910
Change-Id: I131448f3907115054a592af73db86d2b9257ea33
3774335b08076117d6950cd472cdd59a167470b5 13-Nov-2014 Igor Murashkin <iam@google.com> Add a new imgdiag tool to diff boot.art/core.art against a process

Analyze the dirty memory pages of a running process per-object,
this allows is to to fine-tune the dirty object binning algorithm in
image writer.

Also:
* Factor out oatdump command line parsing code into cmdline.h
* Factor out common build rules for building variations of binaries
* Add a gtest for imgdiag

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

Change-Id: I3bf3250fa866fd2265f1b115d52fa5dedc48a7fc
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
ee5618be0076ac359ab59af1c2ba945d85b2986e 15-Aug-2014 Jeff Hao <jeffhao@google.com> resolved conflicts for merge of 549c9b17 to lmp-dev-plus-aosp

Change-Id: Icea7763c830aeefa02d6a86c960c4b41148d397b
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
95b4c65da93500cdbdcaa3e01010771ef3f466f1 15-Aug-2014 Jeff Hao <jeffhao@google.com> Prevent stubs from being installed in java.lang.reflect.Proxy.<init>.

This CL is a better fix for proxy tracing and undoes the changes in
https://android-review.googlesource.com/#/c/103025/

Bug: 16386215

(cherry picked from commit db8a664e0b68c7c4d36270cd21dce8de1912d7f9)

Change-Id: Ic9e0ea2af7cb2da5d90c56aa009de92dba14cc47
4bf8d11df5dccc1b276cd9c40a98e8a14d79a9c8 25-Jul-2014 Jeff Hao <jeffhao@google.com> Fix proxy tracing and enable tests that now work with tracing.

Also updates proxy_test to generate an image for GetQuickOatCodeFor.

Bug: 16386215

(cherry picked from commit f0a3f09c3d54646166a55c05a6b39c7dd504129c)

Change-Id: I138edbad9e1646db8590f2b1b73f2788d9710e68
db8a664e0b68c7c4d36270cd21dce8de1912d7f9 15-Aug-2014 Jeff Hao <jeffhao@google.com> Prevent stubs from being installed in java.lang.reflect.Proxy.<init>.

This CL is a better fix for proxy tracing and undoes the changes in
https://android-review.googlesource.com/#/c/103025/

Change-Id: Ie82bb49f07774bd08a6720ddbe5b1f8ee9363acf
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
f896965072343a2d6ad64d46a61112b10b3645dd 06-Aug-2014 Andreas Gampe <agampe@google.com> ART: Remove test files after test

The unix_file tests should remove files and directories when they
are done testing.

Bug: 16505797

(cherry picked from commit 7747c8de402f64e3009ca3bcccebddbb70f617ee)

Change-Id: I9c3c8f1a80ec0d37628a742193267e182c25b0cd
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
7747c8de402f64e3009ca3bcccebddbb70f617ee 06-Aug-2014 Andreas Gampe <agampe@google.com> ART: Remove test files after test

The unix_file tests should remove files and directories when they
are done testing.

Bug: 16505797
Change-Id: Iff6856f64ee42ee9818b4ac23a6de3fe7eec6eae
f0a3f09c3d54646166a55c05a6b39c7dd504129c 25-Jul-2014 Jeff Hao <jeffhao@google.com> Fix proxy tracing and enable tests that now work with tracing.

Also updates proxy_test to generate an image for GetQuickOatCodeFor.

Bug: 16386215
Change-Id: Ie7daad3d73ea7b60187bc1e7037ade0df8277107
a59dd80f9f48cb750d329d4d4af2d99d72b484d1 03-Jul-2014 Alex Light <allight@google.com> Runtime can now be set to require relocation

Add a pair of runtime flags -Xrelocate and -Xnorelocate that can force
the runtime to require that all files that are run are relocated, to
prevent attacks based on the known art base address.

Add support for running patchoat on oat files compiled without an image.

Change run-test to have new --prebuild and --relocate flags.

Bug: 15358152

Change-Id: I91166c62dd1ab80e5cbcb7883a2cd0d56afca32d
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
4e99b3d8955131f3fc71aa113f0fa71f0092cb6f 24-Jun-2014 Sebastien Hertz <shertz@google.com> Add missing class initialization during compilation and tests

Adds missing class initialization during compilation and tests, especially
java.lang.Class. Otherwise, we'd be able to execute code while the referring
class is not initialized or initializing.

Also adds mirror::Class::AssertInitializedOrInitializingInThread method to
check class initialization when entering the interpreter: the called method's
declaring class must either be initialized or be initializing by the current
thread (other threads must be waiting for the class initialization to complete
holding its lock). Note we only do this check in debug build.

Bump oat version to force compilation.

Bug: 15899971
Change-Id: I9a4edd3739a3ca4cf1c4929dcbb44cdf7a1ca1fe
5ced67270d178df0ddd78abe2af2235de905d6f0 10-Jul-2014 Elliott Hughes <enh@google.com> Use the icu4c headers from the new location.

Change-Id: I6ca56e8f9909bf3644a5f79f2d705547ddba6d03
86f5662a9374ee03bcd2b440a67f1e90eaac70c0 26-Jun-2014 Andreas Gampe <agampe@google.com> ART: Use ANDROID_HOST_OUT for ANDROID_ROOT in Runtime tests

On the host, if ANDROID_ROOT is not set, first try ANDROID_HOST_OUT.
This will ensure that builds with OUT_DIR_COMMON_BASE will run the
gtests correctly, as icu will use ANDROID_ROOT to look for a file.

Change-Id: I8988901be32249c1c79f96b36947a647df5de041
833a48501d560c9fa7fc78ef619888138c2d374f 22-May-2014 Andreas Gampe <agampe@google.com> ART: Native support for multidex

Native support for zip files with multiple classesX.dex.

Works by explicitly looking for those files in ascending order. As
these files have no file system representation for themselves,
introduce synthetic dex locations: the name of the originating file
plus a colon plus the name of the dex file, e.g., test.jar:classes2.dex.

Opening a zip dex file will return all dex files in this way. This
keeps the changes to dex2oat minimal.

To hide multidex/synthetic names from the Java layer, let the handle
of dalvik.system.DexFile refer to a vector of DexFile objects. When
opening a location, test possible synthetic names and add them to the
vector. Thus, the original multidex jar in the classpath will be
associated with all embedded dex files.

Change-Id: I0de107e1369cbc94416c544aca3b17525c9eac8b
afd9acc30bdd11cdd12d8209eb994cb371c65e33 17-Jun-2014 Ian Rogers <irogers@google.com> Multilib ART host.

Build ART for the host as a multilib project with dalvikvm32 and dalvikvm64
running as 32 or 64-bit repsectfully. Note, currently multilib host builds
are not the default, you make the so by setting BUILD_HOST_64bit=1.
Extend tests to execute in both 32 and 64-bit modes. By default both 32 and
64-bit tests are run, add 32 or 64 to the end of a test name to run it in
purely that flavor.
Given the extra spam, modify oat tests to only generate console output when
the test fails.
Change the test harness so that common commands are run when a test should be
skipped, when it passes or when it fails. Use these commands to generate a
summary of passing, skipped and failing tests. Tests will be skipped if they
are known to be broken or if a test has already failed. Setting the variable
TEST_ART_KEEP_GOING=true will force working tests not to be skipped.
In this change all tests running on the optimizing compiler are marked broken
due to breakages running them in a multilib environment.
Break apart Android.common.mk into its constituent parts, along with other
pieces of reorganization.

Stylistic nit, we refer to make rule targets as targets thereby overloading
the term target. While consistent with make's terminology, its confusing with
the Android notion of target. I've switched to just calling targets rules to
avoid confusion in host tests.

Change-Id: I5190fc3de46800a949fbb06b3f4c258ca89ccde9
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
0e12bdc49744eb6d5c29b9611a8dbe10bac4cd53 15-May-2014 Brian Carlstrom <bdc@google.com> Add ISA directory to image and odex pathnames.

Bug: 14882223
Bug: 14694978
Change-Id: Ic1b5ae836b8e91ea461dcd4f3da8e38dc3bec00f
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
b40c6a768aa8df4774d2a8c3ac7045237cc748cd 02-May-2014 Andreas Gampe <agampe@google.com> ART: Fix assembler_test to use ScratchFile

This removes a warning about tmpnam usage.

Also add an assertion to ScratchFile about ANDROID_DATA being set,
which it relies on for the temp directory.

Change-Id: I1202f92e48e61492f0ed3ac36ff44fde34dbb0e1
afbaa1aab02cfe519d00336870b1bcd24b61378d 26-Mar-2014 Andreas Gampe <agampe@google.com> Build changes to build multilib tests

Test files will be emitted into directories for both first and second
target architectures. Going with the naming scheme for binaries,
single-architecture and 32b cases have the standard name, and
64b goes into a directory with "64" suffix.

In multi-architecture setups, the default concrete test targets are
extended with a "32" and "64" suffix, e.g., test-art-target-oat-JniTest64.
The suffix-less form is linked to the primary architecture target (usually 64).
That means running combined targets, e.g., test-art-target-oat, will only
test the primary architecture right now.

Fixed target run tests calling the right dalvikvm. Fixed library search
path for tests derived from CommonRuntimeTest.

Missing in this work-in-progress is correct handling of dex2oat for the
secondary architecture. To make it work on 64b, comment out line 101
in build/Android.executable.mk

Change-Id: I3d260994e6efe8b73b56c71994053cc9392943a9
05b15d6e896af7ae0075a690ea791e2e92ecf443 19-Mar-2014 Hiroshi Yamauchi <yamauchi@google.com> Make test-art pass with heap reference poisoning enabled.

Heap reference poisoning is currently interpreter only. This change
disables one compiler driver test that actually invokes compiled code
if heap reference poisoning is enabled.

Bug: 12687968
Change-Id: Ia9516f4067d84e9a4de50d9ff44cfbe38f282d16
c0a1b18ac71ec0ff3ec0cca3cc8db9eb74e50690 05-Mar-2014 Brian Carlstrom <bdc@google.com> Reuse NoopCompilerCallbacks in oatdump

Change-Id: Icb4d3941196c1a236f0184fe4d0b7f5838bc13bd
9583fbcf597eff6d0b3c5359b8e8d5f70ed82c40 28-Feb-2014 Nicolas Geoffray <ngeoffray@google.com> Remove oat file location in the image.

The oat file is now always in the same directory, and has the
same name as the image file. Only difference is the extension.

This also removes the need for host-prefix.

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

Change-Id: I8dcf6b29a5aecd445f1a3ddb06386cf81dbc9c70