Age | Commit message (Collapse) | Author |
|
Test: ./art/test.py -r --host --target --optimizing --64
Change-Id: Ic4b28b6cf5414d0a88c10a175b84255a0d78ea6c
|
|
Since the test starts up a VM, it'll load the boot classpath and among
other things register various internal native methods, which aren't
stable APIs. That may lead to problems if libart is linked statically
since the boot classpath is loaded from device and could potentially be
more recent than the libart instance in the test (on devices that don't
take Mainline modules).
Hence avoid art_standalone_gtest_defaults and instead link
libnativehelper dynamically to start the VM using libart on the device.
Note that earlier work in https://r.android.com/2375894 and
https://r.android.com/2384058 got rid of the direct dependency on the
runtime in the test (i.e. the art::CommonRuntimeTest inheritance), but
we still brought in runtime init code that got executed from
JNI_CreateJavaVM.
This (again) disables the JNI test on host. It's possible to solve but
not worth the effort (see comment in palette_test.cc).
Test: `atest art_standalone_libartpalette_tests` with a planted
libart-vs-BCP inconsistency based on b/402238495
Bug: 404306250
Change-Id: I99817670ba58272cb9ef7df7e216a3df637472d3
|
|
depending on CommonArtTest.
Preparation to fix the libart-gtest dependency in
art_standalone_libartpalette_tests.
Due to a new #include, this necessitated fixing a bunch of `testing`
namespace references that could become ambigious wrt `art::testing`.
Test: m generate-boot-image
Test: art/tools/buildbot-build.sh
Bug: 404306250
Change-Id: Iafb3d73148125775c9c5ddbcbaef39dc61859118
|
|
This removes 90%+ of files in the data for run-tests,
which is needed to build but not to execute the tests.
(original source code and java-bytecode class files)
Trade-fed has its own implementation of 'adb push',
which is very slow, so the extra files considerably
slowed everything down.
Test: ./art/test.py -r --jvm --host --target --optimizing --64
Change-Id: Ie4da1b9c9e94f0d265fdb384948a073593983ac5
|
|
Avoid `SyntaxWarning: invalid escape sequence '\.'`.
Test: buildbot-build.sh --target
Bug: 399857401
Change-Id: I616c41941545b7c8540d2d5ca3706cbc3ce1cb8a
|
|
Add a new state to LSE's `Value` class to mark loads that
depend on loop Phi placeholders but may require a type
conversion. We store the load in the `Value` and use the
`loads_requiring_loop_phi_[load->GetId()]->value` to form
a singly-linked list leading to the actual Phi placeholder.
During `LSEVisitor::ProcessLoadsRequiringLoopPhis()`, we may
replace these records, so a walk over the singly-linked list
in that stage can terminate with a replacement instruction
instead of the loop Phi placeholder.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 341476044
Change-Id: Id8f2edf4dfaa82dc3f25ddf47f3fe1da8f2fb3ea
|
|
055-enum-performance is disabled when run via testrunner from a long
time. This test is timing sensitive and might fail on heavily loaded
or slow systems. So disable this in tradefed runs as well.
Bug:394148480
Change-Id: I30d552c020445aa283ead9b4537cc51b002f8d12
|
|
This reverts commit 02a80d00ffd5eaa1985e18becd542579576720fc.
Reason for revert: Fix dump_trace.cc to parse timestamps as 64-bit unsigned lebs and not 32-bit. These were always 64-bit fields but the bug didn't impact because timestamp diff did fit in 32-bits.
When using ns, it no longer fits exposing the bug.
Change-Id: If979c0bf891ae5bd0fdf278915fcda8ed09bfa9f
|
|
r-launched-apex-module already sets the min_sdk_version value, hence
there is no need to override it.
Changing apex defaults from s-launched-apex-module to r-launched-apex module as statsd was launched in r, which keeps min_sdk_version to 30.
It does remove compressible:true property, but as discussed in the comments, it is fine as this is just a fake of statsd.
Flag: EXEMPT removing overriding property is not flagged
Bug: 361092707
Test: m art_fake_com.android.os.statsd
Change-Id: Iee5e64561d491104c976d2ee7bf804d72c671299
|
|
The need for a memfd_create() workaround is gone.
Change-Id: I07e46fc92d99b57dcb4bdc88deb8d11297c43279
|
|
Other CTS tests already require a working memfd_create(), and ART is no longer running tests locally on fugu (whose ancient kernel didn't support memfd_create()).
Change-Id: If442de7f62a3b2a38206223f15fdb2f62429523d
|
|
We no longer have working fugu devices.
Change-Id: I9cc60017027dd49cfa267c5bab95108217e8a1fd
|
|
aosp/3523163 used unique_ptr for an array of uint8_t but declared it
just as uint8_t, so there was a mismatch of allocation and deallocation.
Test: art/test.py -t 2246
Change-Id: Id1142f72618274ae8857e7724dd9b4e59cb730b0
|
|
The parser for the V2 method trace format allocated a buffer when
processing the trace entries but never released it. Fix the memory leak
and also use unique_ptr to avoid these kind of problems.
Test: art/test.py -t 2246-trace-v2
Change-Id: I4055206c288a38de67f27c5bb142590a547f6283
|
|
This gets rid of SyntaxWarning: invalid escape sequence '\d'.
Bug: 399857401
Test: test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: I3645330beed5f66f5504435c497e22e1a7cce7e8
|
|
Code owners should fix this.
```
...ka 'int (*)(long, long, long *, int, void *)') to 'ArtExtensionAPI' (aka 'int (*)(long, long, long *, int, void *, int)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
1606 | return reinterpret_cast<ArtExtensionAPI>(cb_callbacks->heap_iteration_callback)(
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Bug: b/353528991
Test: m checkbuild
Change-Id: I5f95a74baebe8d78ff1618bd22e1f8943018be6e
|
|
There are some cases where such APIs only have @UnsupportedAppUsage but
not @SystemApi(client = MODULE_LIBRARIES), but if they're de-facto
allowed for apps we can just as well allow them for the platform.
Test: 674-hiddenapi with core platform API enforcement enabled
(https://r.android.com/3500993)
Bug: 377676642
Change-Id: I920b28886cc3b6a0b402317c15d19236463a97d7
|
|
The special case in Soong that was requring the workaround in
b/395617594 is being removed.
Bug: 395617594
Test: compare installs-${TARGET_PRODUCT}.mk
Change-Id: Id6bd97f6d0faaa7f10889b3c5f65fc39f50cc1ba
|
|
The simulator requires a target profile and boot image to run and
correctly simulate target tests so add a build step to generate a
target profile and boot image on the host if the simulator is being
built.
Also add a flag (--android-root-for-locations) to allow the
bootclasspath locations to use the android root as a prefix to the
bootclasspath files. This means non-device paths (e.g.: the target or
host out directory) to the bootclasspath files can be used.
Author: Chris Jones <christopher.jones@arm.com>
Test: export ART_USE_SIMULATOR=true
test.py --host --target
Change-Id: I8c9f2a1c2e3f14bbc48bc3f2eef18a682ce5557b
|
|
This CL introduces a special ART setup for all modes (host, target),
which is going to be a base for VIXL Simulator Stage 1 setup. This
setup can be enabled by exporting ART_USE_RESTRICTED_MODE=true to the
environment before building ART. The setup limits ART by doing the
following:
- Limits the GC to only non-concurent Mark&Sweep.
- Turns off the Nterp (so only switch C++ intepreter to be used).
- Turns off the JNI compiler (GenericJNITrampoline to be used).
- Rejects the compilation of all method (except for the allow list).
- Turns off compilation and support of intrinsics.
- Turns off implicit null checks.
- Turns off implicit suspend checks.
- Turns off introspection entrypoints.
- Turns off special behavior for critical native methods.
- Turns off compiler CHECKER tool.
With these limitations it will be easier to start off an initial
Simulator Stage 1 setup. As the limitations are set for all the modes,
it will be easy to compare/debug the workflow for the simulator mode
and to compare it to host and target runs.
The CL also adds sections in knownfailures.json for tests that fail
in this special setup.
Also cleanup some read barrier entrypoint declarations in
entrypoints_init_arm64.cc to match the definitions in
quick_entrypoints_arm64.S and slightly refactor Runtime::Init to stay
below the 500 line limit.
Author: Artem Serov <artem.serov@linaro.org>
Artem Serov <artem.serov@arm.com>
Chris Jones <christopher.jones@arm.com>
Test: export ART_USE_RESTRICTED_MODE=true
test.py --host --target
Change-Id: I87319cf339646dc13b9086b00af08882b01603c8
|
|
Test: 860-vdex-failure
Change-Id: I0ffc6e7377fb432ef208ad9854a6b3f031f746dd
|
|
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
|
|
The compiler may have internally mark a method as not compilable. Do not
clear the verification results from the compiler callbacks, we still
need them during compilation.
Test: 860-vdex-failure
Bug: 395243275
Change-Id: I79ba61eb8a7ba6729b22c4c27fa83d8373fce03a
|
|
Bug: 377474232
Test: art/test.py --host -g
Change-Id: I0674378b5aaba1da4d6e623ac8db9e2c4acd4ed5
|
|
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
|
|
We were not enforcing the specified requirement from
https://source.android.com/docs/core/runtime/dalvik-bytecode
for `filled-new-array/-range`. We now reject the descriptors
`[J` and `[D` in the verifier and defer arrays of primitive
types other than `[I` to the interpreter. All these cases
would have previously hit a `DCHECK()` in the compiler.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: Iaf91465faa8ed9599abe2504796a2d9bc5bd4678
|
|
After this change, error messages in OatFileAssistant are all propagated
along the way to `GetBestInfo` and logged there.
This change reduces the amount of artd log by 82%.
Before: https://paste.googleplex.com/4527623093616640
After: https://paste.googleplex.com/4842357558870016
As we are adding two more paths to check, for SDM files, reducing the
amount of artd log becomes more critical than before. Otherwise, the log
spamming problem will get even worse.
Bug: 377474232
Bug: 345762752
Test: adb shell pm art dump
Change-Id: I34cdd7228fb063466c86511610687f831ae465ad
|
|
Refactor `move{,-wide,-object}` verification. Make sure we
keep the locking info for no-op `move-object vN, vN`.
Refactor `monitor-enter` and `monitor-exit` verification as
well because the former used the same helper functions as
`move-object`. Bail out on a hard failure - previously,
we'd keep processing previous instructions and use helper
functions that can add an additional hard failure.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I2d76812ecf1b8232b4a5da0426461d6f572da13b
|
|
Soong was accidentally allowing a corner case where modules that
were not supposed to be available to the platform (due to
apex_available being set to an apex and not including
"//apex_available:platform") were being made available to the
platform as long as no apex modules depended on them.
art_test_defaults has apex_available: ["com.android.art.bug"] to work
around an issue with duplicate install rules. Add
"//apex_available:platform" explicitly to some art tests whose install
rules are hidden when the corner case is fixed. These can be removed
when b/395617594 is investigated and fixed.
Bug: 394664568
Bug: 395617594
Test: compare out/soong/installs-${TARGET_PRODUCT}.mk
Change-Id: If0646aa317b1033f5a7c0622fa0fbf89286b4a83
|
|
... `DotToDescriptor()` and `DescriptorToName()` parameter.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 338123769
Change-Id: I9cda6e70f52ed8779fcd532a4e34515c12c40c78
|
|
This patch removes almost 16 KiB of padding at the start of each
OAT file, by reducing .rodata alignment from kElfSegmentAlignment
(16 KiB) to 4 bytes. It is valid to do because:
* The first loadable segment in the OAT (ELF) file is specified to
start at 0x0 and includes the .rodata and data before it (ELF
header, program headers, etc.):
+--------+---------+--------------------+---------+
| ELF | program | optional | .rodata |
| header | headers | .note.gnu.build-id | |
+--------+---------+--------------------+---------+
^ ^
| |
+-------- first loadable segment in memory -------+
|
+-- page-aligned
This patch does not change the alignment of this first loadable
segment mapped by the linker (both bionic's linker and ART's one),
it only reduces the size of the mapping by reducing the padding
within it.
* Content of .rodata doesn't need to be page-aligned, the maximum
memory alignment that it requires is 4 bytes.
At the moment the OatWriter uses offsets relative to the oat header
(actually the start of the .rodata); so all data *in other sections*
that requires more than 4-byte memory-alignment must account for
the fact that the header is no longer kElfSegmentAlignment aligned
and instead use the offset from the start of the file.
This patch also fixes an issue with the algorithm in
ImmuneSpaces::CreateLargestImmuneRegion, specifically when ART's
ELF loader is used. As this loader only guarantees mmaps begin on a
page-size aligned virtual address (rather than aligning to the largest
segment alignment as done via dlopen implementations), it is possible
that when an image space's end is rounded up to 16K, it may overlap
the next space's begin (see an illustration below), causing a failure.
Therefore, instead round up the end to the next 4K boundary when
calculating the region.
image space interval
/---------------------------+ oat space interval
\ +------+----------------------------/
/ | | \
\---+----------+-----+------+----------------------------/
/ | | | | \
\---+----------+-----+------+----------------------------/
^ ^ ^ ^
| | | +----- image space end (16 KiB aligned)
image end | |
| +-- oatdata (.rodata)
|
oat file (4 KiB aligned)
Actual disk usage reduction from this patch:
* Approx 90% of tested dense .odex files are reduced by 16 KiB
(all reductions are in range 0-16 KiB).
* Approx 75% of tested sparse .odex files are reduced by 4 KiB
(all reductions are in range 0-4 KiB).
Authors: Richard Neill <richard.neill@arm.com>
Konstantin Baladurin <konstantin.baladurin@arm.com>
Test: testrunner.py --optimizing
Bug: 378792349
Change-Id: I874bad5bea28fa1bcf66f331e7d74a506dda72cc
|
|
Test: m test-art-host-test
Test: testrunner.py --host --optimizing --interpreter
Change-Id: I8fd0cfa02ed3242c84143a4a99a76a4fec95a4ee
|
|
It's not just host testing that sends logcat messages to stderr. Simply
remove the condition for the sed command - it just won't have any
effect on device where the messages don't go to stderr in the first
place.
Test: 674-hiddenapi 690-hiddenapi-same-name-methods 691-hiddenapi-proxy
817-hiddenapi 822-hiddenapi-future 999-redefine-hiddenapi
2038-hiddenapi-jvmti-ext 2270-mh-internal-hiddenapi-use
on host and device
Bug: 377676642
Change-Id: I3faf97557dcb3e47bf3e927185cce1c96fe2ac8b
|
|
Necessary to allow executing run tests without a chroot setup, e.g. on
user devices. Also, the documented approach in README.chroot.md is that
the user should set ART_TEST_CHROOT explicitly to enable chroot mode.
Fixes regression from https://r.android.com/2977715.
Test: art/test/testrunner/testrunner.py --target 2279-aconfig-flags
Change-Id: I3deabdf2ef3b807065583fadc4f2c4e847956401
|
|
If enforcement is enabled then log as error instead of warning.
Also add "hiddenapi:" prefix to all log messages to make it easier to
search for them.
Test: Boot and check errors in logcat
Test: 674-hiddenapi 690-hiddenapi-same-name-methods 691-hiddenapi-proxy
817-hiddenapi 822-hiddenapi-future 999-redefine-hiddenapi
2038-hiddenapi-jvmti-ext 2270-mh-internal-hiddenapi-use
on host and target
Bug: 377676642
Change-Id: Ib4f790d7ab4850d398639c64f55be0d14c5c0408
|
|
This complements the treatment of NATIVELOADER_DEFAULT_NAMESPACE_LIBS,
so that ART internal libs can load the libraries listed in that
variable, as well as the other way around.
This makes it possible to load libartagent(d).so without absolute paths
in run tests on target, so use that to re-enable 900-hello-plugin.
Test: art/test/testrunner/testrunner.py --target --64 900
in armv8 target chroot
Test: art/test/testrunner/testrunner.py --host 900
Bug: 186654484
Change-Id: Ic418b26b2b77af8839af7b65ad44ea8b5121169c
|
|
and enable it on target again.
Test: art/test/testrunner/testrunner.py --target --64 656
in armv8 target chroot
Test: art/test/testrunner/testrunner.py --host 656
Bug: 186654484
Change-Id: I4cd3dde548aa30afe46c249bc79e36aa952a4aae
|
|
again.
This changes the test to load the native library by name instead of
through an absolute path, but that shouldn't affect what the test is
intended to do, i.e. test that the class loader object for the boot
class loader gets translated to nullptr internally.
Test: art/test/testrunner/testrunner.py --target --64 150
in armv8 target chroot
Test: art/test/testrunner/testrunner.py --host 150
Bug: 186654484
Change-Id: Ib951c287ba8e7a721b671b0d50aa84da4d89bf90
|
|
target again.
This requires adding an extra link from system to default linker
namespaces for NATIVELOADER_DEFAULT_NAMESPACE_LIBS, since some of the
test cases load a child class with the boot class loader, which in turn
loads libarttest(d)_external.so.
Test: art/test/testrunner/testrunner.py --target --64 674
in armv8 target chroot
Test: art/test/testrunner/testrunner.py --host 674
Bug: 186654484
Change-Id: I19a3332d99a4d8b2c7682e688cf3d965425a2eb0
|
|
No longer test that we actually time out quickly enough if we're running
on an emulator. That test sometimes fails on slow platforms because we
don't succeed in shutting down the process on time..
Bug: 385362249
Test: Check 1336-short-finalizer-timeout with a much too short timeout
Test: Treehugger
Change-Id: I33b7a25be4d8e15ffaace98b08262832a24206e0
|
|
... to `HControlFlowSimplifier` because "control flow" is
the correct technical term.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I2607ac699fa33c3e7ca7f54364e1e8497148412b
|
|
... as long as they have identical inputs at the relevant
indexes.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I40168de61d2dfe1143786a2e4a27549cc54b0451
|
|
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 358519867
Change-Id: I5b49f27c09582dc42eba8b6650a7032fad0ff14d
|
|
and re-enable 817-hiddenapi.
817-hiddenapi and some other run tests have been disabled on target
since https://r.android.com/1689792. A problem has been that (at least
some of) those tests depended on libarttest(d).so being in
java.library.path, so that the .so could be e.g. found and copied from
there by the test.
That's not possible to get to work with libarttest(d).so, since we have
to "register" it with NATIVELOADER_DEFAULT_NAMESPACE_LIBS before
dalvikvm starts.
Instead introduce a new test library libarttest(d)_external.so that
takes the place libarttest(d) had before https://r.android.com/1689792.
I.e. it gets installed in /data/nativetest(64)/art/<arch>, which is
present on java.library.path. It will be loaded in the test's
classloader namespace rather than com_android_art, so it cannot access
ART internals. However, it can access symbols in libarttest(d).so, so
it's possible to export an (unstable) API there that the "external"
library can call across the linker namespace boundary.
Use this approach to fix 817-hiddenapi, and re-enable it again.
Note: Since libarttest(d)_external doesn't have direct access to ART
internal it ought not need to be split into -d and non-d variants. The
only reason that's still the case is that its variants need to depend
on the corresponding variants of libarttest(d).
Test: art/test/testrunner/testrunner.py --target --64 817
in armv8 target chroot
Test: art/test/testrunner/testrunner.py --host 817
Bug: 186654484
Change-Id: I13c186e8d086d07c2480e96a1c1f85651dac7d84
|
|
... to `HCodeFlowSimplifier` in preparation for adding
more optimizations to this pass.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: Icb05c3455d93a7b939f82ced9b08165e533bb21a
|
|
If the invokesuper is from a default method, fail the resolution as we
only expect interfaces in super calls from interface methods.
Test: 736-interface-super-Object
Change-Id: I7bd105cf1e441a9e575250db867678908b147477
|
|
Update expectation to not run on RI and be more robust by throwing an
error if the expected exception doesn't happen.
Test: 735-interface-clone
Change-Id: Ia8594a4cec9744fef2e5eed7f1f4441b18ddb7f7
|
|
Test: test.py
Change-Id: Ib97fca637a8866a41a4389b150c6000d9fb6d99b
|
|
We used to have it as an error, but aosp/3117218 accidentally changed it
to a crash.
Test: 735-interface-clone
Bug: 349569228
Change-Id: I5005ac0a97d32e88ea3f89cdc9176a174a721224
|
|
Test: test.py
Change-Id: I063e951a1660c6fb5b4890eb94751b3d2ef409dc
|