Age | Commit message (Collapse) | Author |
|
Porting a part of StringFactory.newStringFromBytes from libcore to
native
for UTF-8 character set. It can improve the UX score of Antutu v8 a
little
bit.
Only watch UX score. We test 10 times and average the total score.
Bechmark results
- before(Java implementation):
10 times avg,: 13133.9
- after (Native implementation):
10 times avg.: 13324.2
Diff.: +1.4%
Bug: 176514597
Test: cts
Change-Id: I6b601c09663b21fdacde7f14b0db1ac4f0a94c0f
|
|
We want to stop the clock if the processor is powered down.
Bug: 156968512
Test: art/test/testrunner/testrunner.py --host -b --64
Change-Id: Ib615851fea78df1568305b8bcf8d9bea405a8f35
(cherry picked from commit 7809156fe25b5c8aa210f61fe1234a30a27e59bb)
|
|
Live dex caches must keep their associated classloader live. Otherwise
the classloader may get unloaded, attempting to free DexFiles which
cannot be unregistered.
Companion to ART change.
Test: art/test/testrunner/testrunner.py -b --host
Bug: 149098478
(cherry-picked from commit 271b4054b825efca3176c4ac11565e33cff5d09a)
Merged-In: I0eed5b3b46ed681c739d6923a57d0878afbba1a7
Change-Id: I0eed5b3b46ed681c739d6923a57d0878afbba1a7
|
|
This reverts commit Ie9fa5a25d5352f214a16e10d5bbbe45da9f3c486.
Original commit message:
Moves cloning of FileDescriptor in, out, and err descriptors
into a ZygoteHook. This avoids the need to run JNI methods
in FileDescriptor.<clinit> and enables native Core Platform
API checking of FileDescriptor descriptor and ownerId fields.
Changes in reland:
Force UnixChannelFactory to fail initialization during AOT
compilation. UnixChannelFactory is on the preloaded-classes-blacklist
and the changes in the original CL unintentionally allowed
it to be initialized. It used to be that FileDescriptor and
UnixChannelFactory initialization failed in the same transaction
due to the FileDescriptor clinit method making native calls (dup(s)).
Bug: 144502743
Bug: 150680645
Test: art/test/run-test --host 001-HelloWorld
Test: art/tools/run-libcore-tests.sh --mode=host --variant=X64
Test: atest -s <serial> -c \
CtsLibcoreTestCases:libcore.java.io.FileDescriptorTest
Test: atest PreloadCheck
Change-Id: I81e1af1d13ec81b3e51ce1d2f3c202f807d9f9bb
Merged-In: I81e1af1d13ec81b3e51ce1d2f3c202f807d9f9bb
(cherry picked from commit 32ea49e614fc79873148ae974df55b0d8ba15396)
|
|
This will allow toggling access to APIs that are in greylist-max-p and
greylist-max-q (two separate toggles).
Bug: 149994052
Bug: 149997251
Test: mma test-art-host-gtest-hidden_api_test64
Test: adb shell dumpsys platform_compat
Change-Id: I21d7a37a35cad8ec638d9c33dea27e75752324eb
Merged-In: I21d7a37a35cad8ec638d9c33dea27e75752324eb
|
|
This API is needed by the PackageManager server to validate class loader
context strings passed to it from untrusted applications. See the
discussion on I00357cfe086ff149f92c1078c6df6daa713c8f7c.
Test: atest com.android.server.pm.dex.DexManagerTests
Change-Id: I1a4fb1f863db94d27a84fd93f612541d2deb7bff
|
|
This function is identical to VMDebug#isDebuggerConnected and always
has been in ART (on dalvik there was a distinction between the two).
Dedup the one user to the isDebuggerConnected function.
Test: build
Bug: 148401311
Change-Id: Iad18a55bc6dc2c371cc7c2c49765e0aba2f7a793
|
|
This removes a workaround that allows bypassing hidden api checks.
Bug: 142365358
Test: art/test/testrunner/testrunner.py --target --64 -t674-hiddenapi
Test: art/test/testrunner/run_build_test_target.py -j110 art-asan
Change-Id: Icfd0cd8b7ae5ae7534bdc475a815a4598e5da347
|
|
Revert "Harden hidden api checks."
Revert submission 1203343-hidden-api-check-hardening
Reason for revert: art-asan target failure
Reverted Changes:
I5af9f79f5: Add change id for hidden api check hardening
Ifc8d39ba2: Harden hidden api checks.
Change-Id: Ic21ecd06378ca4ec7dfb93a4c7c60c41b3e99283
|
|
This removes a workaround that allows bypassing hidden api checks.
Bug: 142365358
Test: art/test/testrunner/testrunner.py --target --64 -t674-hiddenapi
Change-Id: I5af9f79f5f62c7bbef69557067c9de234ecde7d3
|
|
|
|
Test: atest libcore.dalvik.system
Bug: 145743810
Exempt-From-Owner-Approval: identical to internal approved change
Change-Id: Ib21b2ad689a18ba4770e4ed22accc44eb2dd71a4
Merged-In: Ib21b2ad689a18ba4770e4ed22accc44eb2dd71a4
|
|
New annotation is tools/platform-compat/annotation/src/java/android/compat/annotation/UnsupportedAppUsage.java.
Existing annotations in libcore/ and frameworks/ will be deleted after the migration:
- libcore/dalvik/src/main/java/dalvik/annotation/compat/UnsupportedAppUsage.java
- frameworks/base/core/java/android/annotation/UnsupportedAppUsage.java
This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Exempt-From-Owner-Approval: +2 by owner, by vote lost on latest patch.
Change-Id: Ib5b7baa399cdc38da1d3ca622ba0ba26936b1b2d
|
|
Used to avoid Jit counters from class preloading being recorded in the
boot profiles.
Bug: 139883463
Bug: 142564450
Test: test/run-test 2230-profile-save-hotness
Change-Id: I127d2930f2714574f7aced63330ce13da37231c0
|
|
Bug: 138994281
Test: m droid
Change-Id: I18b8058fa4d174d8e1c1e813dad739ec7d1ce3fe
|
|
This adds package-level mappings for libcore.*, sun.*, android.system,
dalvik.system, and org.json.
Test: treehugger
Bug: 130283485
Change-Id: I4f82d1fe316d4d0ac76951c43bdc08c69336a252
|
|
This field is used to keep track of Class objects that have been made
obsolete by structural class redefinition. They must be kept live and
accessible to preserve JIT invariants around code liveness and to
ensure we can continue to access their dex-caches for obsolete
methods.
Test: ./test.py --host --all-compiler
Bug: 140891089
Change-Id: I0ce309f479c42b56b543339654e2cc49c917bce5
|
|
This adds package-level mappings to the appropriate test
packages. There are a few special cases, such as running the JSR166
tests for java.util.concurrent.
Test: treehugger
Bug: 130283485
Change-Id: I0a8494845ee298f6293277fdcc1e6dad120f4e58
|
|
|
|
set."
|
|
Needed for jit-zygote performance improvements.
Test: device boots
Bug: 119800099
Change-Id: If62f022fdd316535a1242eb861c91b191eb8f778
|
|
Bug: 132905502
Bug: 133242086
Change-Id: If6de33758bb2155d14207c02c11dad8d75b64b0d
|
|
|
|
Use of this API would allow bypassing of all API greylist enforcement
and invalidates other policies. App should use the official manifest API
instead.
Bug: 136102585
Test: m, inspect out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I3d1b88a02e5d28cb6ea47f11ce76f999ba401a15
|
|
This reverts commit d9888496eb1cc5687a2c6e428df62427a800ca14.
This unreverts commit b79c6d4b45
Reason for revert: Fixed issue causing 004 flakes on debuggable
Test: ./test.py --host --debuggable --jit
Bug: 134162467
Change-Id: If0d6483a9c7801b88e5cec1160a5e5cbd2c6b93c
|
|
This reverts commit b79c6d4b4505c0ec3d070107f8883775f9c11726.
Bug: 134162467
Reason for revert: Fails debuggable
Change-Id: I8180737dbf9d22c4b1456a2cfe9143219cde346e
|
|
We want to be able to track JNI ids using fields in class-ext. Add the
fields to the class.
Test: ./art/test.py --host --index-ids
Bug: 134162467
Change-Id: Ifbe5496824b25a615336352f93d16963830deba5
|
|
Add a core platform API that will be used by the framework to pass down
the full path to app's data directory. ART will cache verification data
into that folder.
Test: compiles, boots
Bug: 72131483
Change-Id: Ibe382b49dc5b9a6b96f9ba53559220b551975b79
|
|
Make it available via VMRuntime, and use it in FinalizerTimeoutDaemon.
Partially work around the fact that some apps know about the old
static final field specifying the timeout.
Bug: 129350738
Bug: 68792448
Test: Boot AOSP, TreeHugger
Change-Id: I1849cedd3d17dbc78556f78f849c76cb7792dae5
|
|
Bug: 128423826
Test: AOSP boot and TreeHugger
Change-Id: If6d984a6bc13d2ba85c1dd86ceffc556c8c938d3
|
|
|
|
Encode malloc-only allocations with an odd size field.
These are treated similarly to the prior treatment of zero size
objects, except that:
- Huge allocations cause more frequent mallinfo() checks.
- The sizes are stored, and hence available to ahat and friends.
Add public factory methods to hide the negative size representation
and provide a slightly easier-to-describe-and-use API.
Add registerNativeAllocation(long) and registerNativeFree(long)
methods to VMRuntime to avoid enshrining the obsolete ones in the
platform API. Unfortunately we need to retain the old ones for
compatibility, at least for now.
See also ag/6235934 .
Bug: 121304803
Test: build and boot AOSP
Change-Id: Idccb8b50d26c8c3e93cc34040d784f74dfcdbf51
|
|
Add a callback that can be called to denote that application startup
is completed. This may affect how the profile is collected and how
startup related caches are managed.
Bug: 123377072
Bug: 120671223
Test: test-art-host
Change-Id: Ia317627614566c3060e3c2e246bfb01f6b4f750a
|
|
This reverts commit 07cfc3f74a422d9725cca0ad32915709a3b37862.
Reason for revert: Fixed flake with test 1919
Test: ./art/test.py --host -j80
Bug: 123696564
Bug: 124284724
Change-Id: I958a48ebfe2e3989bd855fc4abe12cec56bf9df5
|
|
|
|
This reverts commit 89b46205a8be6a2cf6264c066290ed29ef8a2d61.
Bug: 123696564
Bug: 124284724
Reason for revert: b/124284724
Change-Id: I059e914d09187cbcf81ce5b077090f853f7e9e6b
|
|
The logger will use the sampled value to select the logging method to be
used.
Test: m
Bug: 119217680
(cherry picked from commit c46991d2b3b13889bef3b0e91662c8cbd7d0ce4f)
Change-Id: If58442275b6936a56b5ae25f1e80654a567dc953
Merged-In: If9fce9a254eb0d2952e9b68ead658c2f096dbab9
|
|
Enabling apps to overwrite their target SDK version in the runtime is
undersirable as it may allow them to access APIs in greylists intended
for legacy apps only, e.g. an app targeting Q accessing greylist-max-o.
Move the setter in VMRuntime to blacklist. API usage data shows very
limited affect of this change.
Test: n/a
Change-Id: I52de53c208894fae15edde19a92efb60f86100f0
|
|
The threads started by Daemons.java are special daemon threads that
provide important GC related functionality to the runtime. As such the
runtime sometimes needs to keep track of which threads these are. This
adds support for keeping track of that data.
Also give a way for the runtime to wait for all Daemon threads to come
up.
Test: while atest CtsJdwpTestCases; do; done;
Exempt-From-Owner-Approval: Previous version approved by nfuller@ with
only minor nit changes. Bypassing further
owner review since all owners are currently
in LON.
Bug: 123696564
Change-Id: Ia70da0b4d11409930bef47e4d06359b0d612c8fa
|
|
Added HiddenApiUsage interface, a static setter, and two static methods
which forward the hidden api usage events to the logger (for access via
JNI and via reflection)
Topic: hidden-api-reporting-upcall
Test: m
Bug: 119217680
Change-Id: I0185ebda779f9df3d4186806a6696b063847ad1c
Merged-In: Ia2f154f4649c5f0c22c55e6a12c0399a5912deb8
|
|
5c9406fb hardcoded "linux" as the value for the os.name
property on Android. Because we will now support additional
device OSs, this value is no longer static.
Reverting back to dynamically querying os.name will regress
compile-time initialization for AbstractDatagramSocket.
Analysis of this is tracked in b/121268567.
Bug: 119271070
Bug: 117987577
Bug: 28174137
Test: Verify os.name keys to the proper underlying
OS.
Change-Id: I233e87b56b6e5513aab31ef68e1b2afbcd238fc8
|
|
Provide a new NativeAllocationRegistry constructor that does not
require a size, assuming instead that all native allocation goes
through malloc() and the GC tracks native allocation anyway.
Use it in BigInt, Pattern, and Matcher, the traditional problem cases
for proper size tracking. We should use it in many other cases as well.
The fact that we're not yet doing so has the effect that we're currently
double-counting some allocations. However a mere factor of 2 error is
likely to be a huge improvement already over prior accounting.
Force the argument to setTargetHeapUtilization to be at least 0.1.
Very small numbers are not reasonable, and could cause overflows in ART.
(Needed by accounting cleanups in the companion ART CL.)
Bug: 111447610
Test: atest NativeAllocationRegistryTest (option 2)
Test: Built and booted AOSP. Ran 175-alloc-big-bignums.
Change-Id: Iad76e1efe0849ddf03834571f71a00e684e82858
|
|
Hidden API access checks refer to the dex file of a class to read
the access flags of a given method/field. The pointer to the dex
file is lost when the class is redefined with JVMTI. Add two fields
to ClassExt which will preserve the DexFile pointer and ClassDef
index of the redefined class.
Bug: 119688837
Test: m test-art
Change-Id: I4808a9bd9f9d29849a342355de6369fbce969b87
|
|
Additional libcore classes and methods have been added to the hiddenapi
since the last time stubs were added. This change adds stubs and
annotations for them all.
This was tested by making and then manually checking that the generated
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt was the
same (after sorting) before and after this change.
Test: see above
Bug: 117818301
Change-Id: Ie860cc92a029b21d8ac0e75245a3b6d4de63199f
|
|
Metalava was accidentally including default constructors in the API
generated for CorePlatformApi and IntraCoreApi annotations. This change
adds the constructor and appropriate annotations to allow the metalava
bug to be fixed without changing the API.
Tested by building the API with and without the Metalava fix and
checking that they were the same apart from removing the constructors
for the following classes as they are not required in the API because
the classes are never meant to be instantiated:
* dalvik.system.VMSTack
* libcore.icu.ICU
* libcore.io.DropBox
* libcore.io.EventLogger
* libcore.net.MimeUtils
* libcore.util.SneakyThrow
Bug: 119859108
Test: see above
Change-Id: I87cdb60827edbc2703b9b8723e873aa49c82d9cf
|
|
Hidden API toasts have been removed. That makes
VMRuntime.hasUsedHiddenApi() obsolete.
Test: m
Change-Id: Iabddcb809be524f0cc0738b2dfcef5c752afe2bc
|
|
Fields used by ART internally.
Test: test-art-host
Bug: 116059983
Change-Id: Ie2b31557e806f627f643ae08d8b6b1619379973b
|
|
Test: ensured that generated light grey list did not change
Bug: 117818301
Merged-In: Ifcdd4c815a2d8fc438290a5b3b9db669f5035145
Change-Id: I6bd92384b4c81d425961d0f9ef4b681271e36125
|
|
Expose to the system whether ART is using a boot image.
Test: m
Test: system boots
Change-Id: I087c269dd1e95eeeab5db4250133f9c61e9399c7
|
|
These annotations are required for further targets to build.
Bug: 113148576
Test: build
Change-Id: I695c6b973835b5de2311e0ed99cb2fb55b69bc94
|