Age | Commit message (Collapse) | Author |
|
Avoid indirectly `#include`-ing `instrumentation.h` in every
compilation unit that needs the `runtime.h`. This reduces
incremental compilation times when touching certain files.
The additional load when accessing `Instrumentation` via the
`Runtime` has negligible performance impact.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: Ibaf96696693b105e843c7c2cbf4e7604b126808e
|
|
Introduce `Instrumentation::ReinitializeMethodsCode()` for
the cases where we want to reset the entrypoint after the
method has already been initialized. Keep the old function
`Instrumentation::InitializeMethodsCode()` exclusively for
the initialization of a newly loaded method's entrypoint,
split out the work that can be done in suspended state and
remove any unnecessary work. For example, we do not use
the Nterp entrypoint until the class has been verified, so
all the Nterp checks can be removed.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 329196666
Change-Id: I1d0c195b0118fe50434d496f56346a9f744fbaf7
|
|
... and related functions in most cases.
Note that the `CompilerDriver` previously resolved the
`ClassLoader` and `TransactionAbortError` using the provided
class loaders. We're now using the `ClassLoader` from the
class roots and resolving the `TransactionAbortError` in the
BCP class loader.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 181943478
Bug: 338123769
Change-Id: I38e480cdcdb8bf02c958e4d0773437f5766f6be0
|
|
Move the transactional interpreter, `AotClassLinker`,
`Transaction` and `SdkChecker`.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: If001e06711ee345ce5b937ed764e66b26a0abcd6
|
|
Keep a simple flag for active transaction in `Runtime` but
move all other transaction data to `AotClassLinker`.
Make `IsActiveTransaction()` a pre-requisite for calling
`IsTransactionAborted()`.
Eliminate `AbortTransactionAndThrowAbortError()` by inlining
into `AbortTransactionV()` and rewriting other callers to
use `AbortTransactionF()` instead.
Separate transaction-related test code to its own files.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: Ie6ee421fcfed1599049ab50ca692f19c71f395ce
|
|
Bug: 260881207
Test: presubmit
Test: abtd app_compat_drm
Test: abtd app_compat_top_100
Test: abtd app_compat_banking
Change-Id: Id729aca1d8b6d003ff3e9755112f3283e9f2b507
|
|
The first parameter of the Open methods specifies the data source,
that we intend to load the dex file(s) from. This creates large number
of overloads when multiplied by diversity of the other arguments.
Move the data source parameters to the constructor of DexFileLoader.
Specifically, the constructor just creates the right DexFileContainer,
and the rest of the loader is independent of the data source used.
This removes large amount of the overloads as well as large amount
of copy-pasted code. Majority of ArtDexFileLoader has been removed.
Bug: 266950186
Test: ./art/test.py -b --host --optimizing --64
Change-Id: I6580b49e65441eec93a7e0124be23bd8c859904a
|
|
Test: m test-art-host-gtest
Change-Id: I5e8a206560131b429298b56699b9111a2a2992d0
|
|
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I9cfef2a2c302f70826ac762202421388213e60e6
|
|
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: atest CtsJdwpTestCases
Change-Id: I7b94a481304f8899bcb828ed5875fe165dd90dda
|
|
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I27b4e8f5513511ce1c320e3224dd9c2a40880b69
|
|
The reasons previously described in `Runtime::Start()` for
initializing intrinsics after well-known classes no longer
hold. And if we want to add some new well-known classes and
initialize them early, we actually need to initialize
intrinsics earlier. For example, the class initializer for
`jdk.internal.math.FloatDecimal` requires intrinsics to be
initialized when using the `invoke-polymorphic` instruction.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 19575890
Change-Id: I7a119a7dcef0f5263b89f22cf45f2b45725d0eee
|
|
And make `ClassLinker::RunRootClinits()` responsible for
the initialization of primitive boxing classes.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: testrunner.py --host --interpreter --no-image
Bug: 253570082
Change-Id: Ia000113d53eb60518a137547684df28a0c788997
|
|
Mostly involved replacing compile-test check for read-barrier with
runtime one.
Bug: 160737021
Test: art/test/testrunner/run_build_test_target.py -j <core-count> art-test
Change-Id: I685e4b717d314a19f7714ece5c8b84f23154cc66
|
|
When compiling without a boot image, we used to not initialize them.
Also adjust run-test with --no-image to not pass an image to dex2oat.
Test: test.py --no-image --optimizing
Bug: 220702556
Change-Id: Ia0f26f35ee4ad24988e067c4c7c53a0acf98cf51
|
|
This reverts commit c9607e3cebb5fa942fec1d40b4a36a31ca5fb7c7.
Reason for revert: Fixed LUCI tests by not relying on any environment
variable.
Bug: 216467764
Test: Run art/tools/run-gtests.sh on Cuttlefish.
Change-Id: I20e2d27a5d7f9e0938bd09d58a2fb5b350c0c5ad
|
|
This reverts commit 5791123eeefd60d39b2ef1e62817ec9a1346b2af.
Reason for revert: Broke LUCI tests again.
Change-Id: I2481f9a147f8ae25930e30c0b717c139fd93fbdb
|
|
This reverts commit e208b04cc2efaf707390d7acbe8f978142701d72.
Reason for revert: Fixed LUCI failures.
Bug: 216467764
Test: Run art/tools/run-gtests.sh on Q on Cuttlefish.
Change-Id: I910415dd0e6dad1f54bf8ac134fa6344c3118ec2
|
|
It used to be that ART ensured all code in the boot classpath was fully
verified. Now that we have mainline, we cannot guarantee this at
compile-time. Therefore make boot image compilation also use
VerifierDeps.
Test: test.py
Change-Id: I414de823fe79a6637679550cdb16c1b28f397ed2
|
|
This reverts commit 6454968f07511897f2ab85db14dc729c6b3788c5.
Reason for revert: ART buildbot shows several failing builds
Change-Id: I2e6f2d21cad667fd0f1fd669e79bce81bafb5c03
|
|
This CL implements a simple commandline tool to generate a primary boot
image on device for testing, and invoke it in a `target_preparer`. See
the bug for why this is done.
Bug: 216467764
Test: All `art_standalone_*_tests`
Test: ArtGtestsTargetChroot
Test: Steps in art/test/README.chroot.md
Change-Id: I412357bbe7ea9ed73b26a0b2631b415ad025fceb
|
|
entrypoint."
This reverts commit b0f63c93e44bf53a34dda90c74b8725a932922da.
Reason for revert: Fix For proxy init.
Test: test.py
Change-Id: I6b4796115d73a093f86309cec1f03cafd981c2e9
|
|
This CL adds a function `art::GetPrebuiltPrimaryBootImageDir`, which
returns the location of the primary boot image. Other code should use
this function to find the primary boot image. In that way, changing the
location of the primary boot image only requires changing this function.
Also:
- Use the ART boot profile in art_common_test as a fallback when the
primary boot image cannot be used.
- Update the `-Xforcejitzygote` flag not to assume that the primary
boot image exists in the ART APEX.
Bug: 211973309
Test: All ART test suites.
Test: -
1. Change `art::GetPrebuiltPrimaryBootImageDir` to returning a path on
/system.
2. Make the corresponding change in the build system.
3. Run all ART test suites again.
Change-Id: Id34d7eec534733d932e520fa3b503488c0dc513a
|
|
entrypoint."
This reverts commit 82e525a4f5f08a72ea1b6907c0a10dacb77a8a87.
Reason for revert: Fails a test
Change-Id: Iab83b543b99fb6f6d5d9be22cd10d4eb88312d4b
|
|
To make sure we use the best available entrypoint in such situations.
Test: test.py
Change-Id: I255b708464d62d7f628f51a200af465303f92fba
|
|
Rewrite access to Thread's state and flags to use 32-bit
atomic operations. Avoid `volatile` accesses that prevent
compiler optimizations.
Change `ThreadState` and `ThreadFlag` to `enum class`es.
Golem results for art-opt-cc (higher is better):
linux-ia32 before after
NativeDowncallStaticNormal 28.162 35.323 (+25.43%)
NativeDowncallStaticNormal6 26.447 32.951 (+24.59%)
NativeDowncallStaticNormalRefs6
NativeDowncallVirtualNormal 27.972 35.027 (+25.22%)
NativeDowncallVirtualNormal6 26.096 32.131 (+23.13%)
NativeDowncallVirtualNormalRefs6 25.922 31.873 (+22.95%)
linux-x64 before after
NativeDowncallStaticNormal 26.987 34.380 (+27.40%)
NativeDowncallStaticNormal6 25.424 31.096 (+22.31%)
NativeDowncallStaticNormalRefs6 25.086 30.602 (+21.99%)
NativeDowncallVirtualNormal 26.812 33.234 (+23.95%)
NativeDowncallVirtualNormal6 25.086 30.617 (+22.05%)
NativeDowncallVirtualNormalRefs6 25.086 30.602 (+21.99%)
linux-armv7 before after
NativeDowncallStaticNormal 7.2394 7.9523 (+9.848%)
NativeDowncallStaticNormal6 6.8527 7.4888 (+9.283%)
NativeDowncallStaticNormalRefs6 6.3976 6.9444 (+8.547%)
NativeDowncallVirtualNormal 7.2081 7.9130 (+9.779%)
NativeDowncallVirtualNormal6 6.8527 7.4888 (+9.283%)
NativeDowncallVirtualNormalRefs6 6.3168 6.8527 (+8.483%)
linux-armv8 before after
NativeDowncallStaticNormal 7.0389 7.5973 (+7.933%)
NativeDowncallStaticNormal6 6.8527 7.3783 (+7.670%)
NativeDowncallStaticNormalRefs6 6.2924 6.8226 (+8.427%)
NativeDowncallVirtualNormal 6.8527 7.3783 (+7.670%)
NativeDowncallVirtualNormal6 6.5604 7.0423 (+7.344%)
NativeDowncallVirtualNormalRefs6 6.1408 6.5329 (+6.386%)
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: run-gtests.sh
Test: testrunner.py --target --optimizing --interpreter
Bug: 172332525
Bug: 143299880
Change-Id: Ib55d457ad8f5d9e1159b681dfd279d1f9cfb2af7
|
|
Host timing of
art_compiler_tests --no_isolate --gtest_filter='<pattern>'
for different patterns:
"ms total" before after
LoadStoreEliminationTest* 16945 4750
LoadStoreAnalysisTest* 2647 689
ReferenceTypePropagationTest* 13542 3929
InstructionSimplifierTest* 1452 406
Host timing of
art_runtime_tests --no_isolate --gtest_filter='<pattern>'
for different patterns:
"ms total" before after
RegType*Test* 2976 1675
DexCacheTest* 265 74
JavaVmExtTest* 785 230
Host timing of
art_libartbase_tests --no_isolate --gtest_filter='<pattern>'
for different patterns:
"ms total" before after
FlagsTests* 691 214
Host timing of
art_dex2oat_tests --no_isolate --gtest_filter='<pattern>'
for different patterns:
"ms total" before after
VerifierDepsTest* 3567 874
Test: m test-art-host-gtest
Change-Id: I20df90e3d38aaa286e22ba070c7845bcb09e3bca
|
|
This allows for a shared library to overriden by content in the dex path
Bug: 179429740
Test: m test-art-host-gtest-art_runtime_tests32
Change-Id: I5f69c7bf32b7bd389eff8bdbb21616ba89ed9e87
|
|
Introduce standalone versions of ART gtests on target, not bundled
with the ART APEX.
So far ART gtests have always been built as debug artifacts (and
linked against ART debug libraries). Make some adjustments in some of
these tests so that they can also work as non-debug artifacts and be
used with the Release ART APEX (which contains only non-debug
artifacts).
Newly added tests:
* `art_standalone_cmdline_tests`
* `art_standalone_compiler_tests`
* `art_standalone_dex2oat_tests`
* `art_standalone_dexdump_tests`
* `art_standalone_dexlist_tests`
* `art_standalone_dexoptanalyzer_tests`
* Note: Requires root access to the device.
* `art_standalone_libartbase_tests`
* `art_standalone_libartpalette_tests`
* `art_standalone_libartservice_tests`
* `art_standalone_libarttools_tests`
* `art_standalone_libdexfile_support_tests`
* `art_standalone_libdexfile_tests`
* `art_standalone_libprofile_tests`
* `art_standalone_oatdump_tests`
* `art_standalone_odrefresh_tests`
* `art_standalone_profman_tests`
* Note: Requires root access to the device.
* Note: Some tests (2 out of 37) are failing in multi-ABI
contexts and have been temporarily disabled.
* `art_standalone_runtime_compiler_tests`
* `art_standalone_runtime_tests`
* Note: Some tests (16 out of 686) are failing and have been
temporarily disabled.
* Note: Some tests (4 out of 686) are failing in multi-ABI
contexts and have been temporarily disabled.
* `art_standalone_sigchain_tests`
Tests not added:
* `art_standalone_dexanalyze_tests`
* Reason: ART binary `dexanalyze` is not part of the Release ART APEX.
* `art_standalone_dexdiag_tests`
* Reason: ART binary `dexdiag` is not part of the Release ART APEX.
* `art_standalone_dexlayout_tests`
* Reason: ART binary `dexlayout` is not part of the Release ART APEX.
* `art_standalone_imgdiag_tests`
* Reason: ART binary `imgdiag` is not part of the Release ART APEX.
Test: atest -a art_standalone_cmdline_tests
Test: atest -a art_standalone_compiler_tests
Test: atest -a art_standalone_dex2oat_tests
Test: atest -a art_standalone_dexdump_tests
Test: atest -a art_standalone_dexlist_tests
Test: atest -a art_standalone_dexoptanalyzer_tests
Test: atest -a art_standalone_libartbase_tests
Test: atest -a art_standalone_libartpalette_tests
Test: atest -a art_standalone_libartservice_tests
Test: atest -a art_standalone_libarttools_tests
Test: atest -a art_standalone_libdexfile_support_tests
Test: atest -a art_standalone_libdexfile_tests
Test: atest -a art_standalone_libprofile_tests
Test: atest -a art_standalone_oatdump_tests
Test: atest -a art_standalone_odrefresh_tests
Test: atest -a art_standalone_profman_tests
Test: atest -a art_standalone_runtime_compiler_tests
Test: atest -a art_standalone_runtime_tests
Test: atest -a art_standalone_sigchain_tests
Test: atest -a art_standalone_\*_tests
Test: m art_chroot && atest ArtGtestsTargetChroot
Bug: 162834439
Bug: 162734417
Change-Id: I8beda9159d48c4ca495698357dc3bd95e3ff84d5
|
|
The profile loading is currently permissive, so this
does not really matter but we intend to make it more
strict soon.
Also clean up ScratchFile to avoid dex2oat_image_test
error logs related to ScratchFile destruction.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 148067697
Change-Id: I34526ddb0389444d54b9754afbedeb671c7b05a8
|
|
Use the `ArtMethod*` as the key in the maps to avoid
the `PrettyMethod()` overhead.
Remove ByteOrder.isLittleEndian() implementation from
UnstartedRuntime. The Java method has been removed by
https://android-review.googlesource.com/151062 .
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: boots.
Bug: 175869411
Change-Id: I97cf91a0abf2b28f83562d8764d28edafa1a09e2
|
|
On device the boot image files are in the APEX, but on host they're
created by the global code in dexpreopt_config.go and installed by make
in the same location irrespective of the ART APEX in use (release or
debug). That location is now moved to
$(ANDROID_HOST_OUT)/apex/art_boot_images to avoid conflict with the
APEX paths (because the release APEX is moving from
com.android.art.release to com.android.art).
Test: art/test/testrunner/run_build_test_target.py art-test
Test: art/build/apex/runtests.sh
Test: art/tools/buildbot-build.sh {--host,--target}
Test: art/tools/run-gtests.sh
Test: m test-art-host-gtest
Test: art/test/testrunner/testrunner.py --target --64 --optimizing
Test: m build-art-target-golem
Bug: 169639321
Change-Id: I932a15539e170d3c6c78515b22dd4b91ce1c57b4
|
|
Another step in preparation to move to the LLVM toolchain.
Bug: 147817558
Test: m test-art-host-gtest
Change-Id: Ie5be337165d8f24e04740de0486144fa6a62f063
|
|
Second attempt at this, which fixes the asan failures.
Remove test_per_src since it is not supported by atest.
Replace it with gtest_isolate which is transparent to atest,
and which still allows us to run tests in parallel.
The size of test binaries halves (from 1GB to 0.5GB).
Test run-time on host is unchanged.
Test run-time on target is 4x faster (tested on walleye).
Added a gtest_main.cc with the gtest isolated main function,
and ART-specific initialization.
Bug: 147819342
Test: m test-art-host-gtest
Test: art/tools/run-gtests.sh
Test: art/test/testrunner/run_build_test_target.py art-gtest-asan
Change-Id: I515c911bb7d44285495802fc66cd732fc8e6d8df
|
|
This reverts commit 8103e479d8f8447584582b2b70752029f7087776.
Reason for revert: asan run fails in multiple ways
Test: ran ./art/test/testrunner/run_build_test_target.py art-gtest-asan
Change-Id: Ib9f2887436a664b64c6410f56a25ae2dd0e0aab4
|
|
Remove test_per_src since it is not supported by atest.
Replace it with gtest_isolate which is transparent to atest,
and which still allows us to run tests in parallel.
The size of test binaries halves (from 1GB to 0.5GB).
Test run-time on host is unchanged.
Test run-time on target is 4x faster (tested on walleye).
Bug: 147819342
Test: m test-art-host-gtest
Test: art/tools/run-gtests.sh
Change-Id: Id295af00d08b24baa2e421b0f3313df0b2e56fe9
|
|
Also fix a bug in relocation; even for -Xnorelocate we need
to relocate second and later extension if it's not compiled
against all previous boot image components.
Also clean up InternTable includes.
Test: New tests in image_space_test.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Bug: 152037801
Change-Id: Ie6ae70721f4ffb48950bd248ffa123dee460bcd7
|
|
Closely mirror the behaviour of target tests.
Test: m test-art-host-gtest
Bug: 147817558
Change-Id: If9a1d34cef022fa93c9c09c8f31adc26ac71afdc
|
|
Test: aosp_taimen-userdebug boots.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 147346243
Change-Id: If1fc8be94caa69f734438d7a1f4c715addfd8876
|
|
This will be used to compute the contexts that should be sent over to
the dex load reporter. See associated changes in libcore &
frameworks/base.
Motivation: At the moment of committing there are two classloader
context encoders- one in ART and one in the package manager. The
duplicate logic is susceptible to divergences. For example at the moment
if a package uses shared libraries and has secondary dex files then the
context encoded for secondary dex files will be incorrect[1]. In order to
eliminate this bug and future possible bugs lets centralize where all
classloader context computation is done.
[1]: The context will be incorrect because it doesn't take into account
the shared libraries that are loaded at runtime.
Test: m test-art-host-gtest-class_loader_context_test
Test: m test-art-host-gtest
Test: ./test/testrunner/testrunner.py --host -b
Test: Introduced a set of tests for the new API(s)
Test: See tests in associated libcore & framework/base commits
Bug: 148494302
Change-Id: Id39293a2e1d3d05194f2864f4febb3e652bce075
|
|
They are essentially the same. We can use boot.art to run gtests
since it is already part of the apex, including the jar files.
This will make it easier to run the tests in atest, since we
will not have to worry about copying core.art to the device.
The long-term goal is to avoid generating core.art altogether.
Couple of tests also require "alternate" image which has no
compiled code. The tests now generate it on-demand in code.
The host gtests still use core.art for now (as there is no
boot.art on host). The plan is to add it in future CLs.
Test: m test-art-host-gtest
Test: ./art/tools/run-gtests.sh
Bug: 147817606
Change-Id: I3a750bb8e60eea0b4a7df1491285feffd5a0161c
|
|
And clean up transaction-related code to keep test code
out of the production binaries.
Test: Add TransactionTest#Constraints to transaction_test.
Test: m test-art-host-gtest
Test: testrunner.py --host
Test: aosp_taimen-userdebug boots.
Change-Id: Iefe5f1cfde95f564069249148f9e7d71564d7a10
|
|
This was missed when moving to common_art_test.
Test: m test-art-gtest
Change-Id: I0ff50983cf71bd86b32350222caac2a36a72ad4b
|
|
Remove unnecessary logging used for debugging.
Test: m test-art-host-gtest
Change-Id: I271c9c10eea728d9e534a96d981cac095c6e2e8e
|
|
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: I457eeda55bbfb905dd2de0abd68451ab42ef9c1f
|
|
Add new class loader tag IMC to class loader context spec which
represents InMemoryDexClassLoader. A special case is required to not
attempt to open its dex files as the dex location does not correspond
to a real file path. This is achieved by setting load-attempted variable
to 'true' when encountering IMC whilst parsing a spec. Context with IMC
can still have opened dex files if it was created from an existing class
loader.
Bug: 72131483
Test: m test-art-host-gtest-class_loader_context_text
Change-Id: Ic64065819018a1e56dee0f65405d26beb8fd7bbd
|
|
Also clean up proxy_test and reflection_test.
Test: m test-art-host-gtest
Change-Id: I7530855a40d7b9f7214ea7a069508ae1361b2b42
|
|
Bug: 117094880
Test: m libartbase-art-gtest libart-runtime-gtest
Change-Id: Iff46ce8ac9f12fb0021ae453624efe84df20a56a
|
|
|
|
This reverts commit 1717a493a4a0c1c3b69ecfcb58838627b4c75878.
bug: 120036590
bug: 120031686
Reason for revert: Fix code to ensure ownership of dex files.
Change-Id: I99fffb52b73e0a41d779a41605ddf2e9249c02e0
|