summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-13art: Disable debug tracing on production buildsHEADsugisawa-mr1Danny Lin
When opening and closing activities in Settings, a significant amount of CPU time is spent checking whether ATrace tags are enabled, as measured by simpleperf: 0.12% /system/lib64/libcutils.so atrace_get_enabled_tag ART debug tracing (via PALette) is responsible for a significant portion of the time spent in the checks: 0.10% 0.07% /system/lib64/libcutils.so atrace_get_enabled_tags | -- atrace_get_enabled_tags | |--30.47%-- PaletteTraceEnabled | | | |--96.11%-- art::Monitor::TryLock(art::Thread*, bool) | | void art::Monitor::Lock<(art::LockReason)1>(art::Thread*) | | art::Monitor::MonitorEnter(art::Thread*, art::ObjPtr<art::mirror::Object>, bool) | | artLockObjectFromCode | | art_quick_lock_object_no_inline | | |--8.63%-- [hit in function] | | | | | |--18.62%-- android.os.Parcel.obtain | |--2.44%-- PaletteTraceIntegerValue | | | |--25.86%-- art::mirror::String::AllocFromModifiedUtf8(art::Thread*, int, char const*, int) | | | |--22.90%-- art::mirror::Object* art::gc::Heap::AllocLargeObject<false, art::mirror::SetLengthVisitor>(art::Thread*, art::ObjPtr<art::mirror::Class>*, unsigned long, art::mirror::SetLengthVisitor const&) | | | |--19.85%-- artAllocArrayFromCodeResolvedRegionTLAB | | | |--19.71%-- art::mirror::String::AllocFromUtf16(art::Thread*, int, unsigned short const*) | | | --11.70%-- art::mirror::Object::Clone(art::Handle<art::mirror::Object>, art::Thread*) We aren't going to use ATrace for ART in production systems, so disable debug tracing in non-debug builds. Test: simpleperf record -a; verify that PaletteTraceEnabled no longer appears under atrace_get_enabled_tags Change-Id: If5cdb18adb17b04f5f7eb7c59cfb3f9ceaecb5be
2022-05-13art: optimization of gc load, reduce gc in some scenarioszengkaifa
1. NativeAlloc GC: Increase the count of the number of small native memory allocations. 2. CollectTransition GC: App's allocations (since last GC) more than the threshold then do GC when the app was in background. If not then don't do GC. Bug: 200116730 Change-Id: Id2977f05eb249691326955e6f2424d4e5e08b417
2022-05-13Reland "Trigger fewer GCs during startup""Hans Boehm
This reverts commit da90ab4ebb233a0f38f7bb226892244c048ae275. PS1 is identical to aosp/1653767 : Instead of explicitly triggering a GC after two seconds, gradually reduce the GC triggering threshold. In particular, a small process that almost immediately goes into the background should GC only as part of the transition to background. Ensure that the first collection is a full (technically "partial", non-sticky) gc, that tries to collect everything but zygote space. There should be very few allocated objects except in zygote space. Clarify the concurrency rules for accessing concurrent_start_bytes_ in the process. PS2: Adds code to explicitly trigger a GC if none has been triggered in the first 30 seconds or so. For AOSP, this happens in seven processes. No longer condition any of this on the CC collector. I don't see why that should matter. Trigger the low-allocation GC above even in low memory mode. I think we want to especially do it in that case. We were previously not doing that, probably it was tied to increasing the heap size. Test: Build and boot AOSP. Test: Manual log inspection with extra logging. Bug: 181351667 Bug: 197780496 Change-Id: I822224bef3e97c2ab1f803eafe97bcdd21b9cd4e
2022-02-27Merge a8494174a64775ad84b1a1b2a5bbad8fbac264a2 on remote branchLinux Build Service Account
Change-Id: I98743c0b85645e0e139f2b5a36f946281e24bedd
2022-02-13Snap for 8179158 from 356aaa7a6abc3d0dcc83ae1a7100cd8df13f4d77 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: Iafb3f7903b5406fdbd311a51a624edcd072d6a5b
2022-02-12Merge s-mpr-2022-02-05-2Eric Arseneau
Change-Id: Ib90bf12fad37e38fca182179e110e683e517d043
2022-01-30Merge eb1c84e6d1b29977b933a28f83e788f2e50e6d58 on remote branchsugisawaLinux Build Service Account
Change-Id: Ia49849c537200f6bdc06025c1ff7fbe46486a94e
2022-01-16Merge f9da627a42193f596d33d799bf323fced18214c5 on remote branchLinux Build Service Account
Change-Id: Iaf48868208da271af8b4536f089c44bf4412cc9e
2022-01-09Snap for 8056754 from 6791299f71c6a4489d314d2c2044f51433e4b7e2 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: I2a4ed6e10234e5d7c5a3af6983567140631b6127
2022-01-06Merge s-mpr-2022-01-05Eric Arseneau
Change-Id: If047708942d1bf78a01c5449539d824ca31c6f1e
2021-12-23Snap for 8024443 from 0c5adfaaa09b234ea4a11a28b931c91c3d68f423 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: I5053cbf9ad9e0aab97fc39d1d19505e0bb2936cb
2021-12-19Merge s-mpr-2021-12-05Eric Arseneau
Change-Id: Ie30e6decc687dd07c62f61760ea1900c619d6ce0
2021-12-17Snap for 8012283 from 6ad2c0ba3b84dffc86def566a9d6688d5a25e2d4 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: I02461e3e77063d9f612be73d2aa60ed6caf606d7
2021-12-06Merge mpr-2021-11-05Eric Arseneau
Change-Id: Icd1f32d5d274239e323872ccd98a69f5b83add9b
2021-11-10Snap for 7901677 from b3456ea9feef63d3fdbda0589900ce870ebe465f to ↵Android Build Coastguard Worker
sc-platform-release Change-Id: Idb595e971316a1941478b4c179ecaf80f453973c
2021-11-08Merge commit 'b534f2fbc0308caf3e33f5054890a44a84664eca' into sc-platform-mergeYimin Li
Change-Id: I70520fee2d1b11928fbf94eeb963ac861a258236
2021-10-29Merge cherrypicks of [16093381] into sc-qpr1-release.Android Build Coastguard Worker
Change-Id: I2045dd5cfdc76b61e1989fa0e2d238c5e6affc91
2021-10-29Allow PROT_EXEC on the zygote mappings when falling back to ashmemNicolas Geoffray
Because we now protect the mappings before creating the executable one, we need to also allow PROT_EXEC on an ashmem region. Test: manually change code to use ashmem, build, see that JIT is created. Bug: 202999239 Merged-In: I9f2944c45f4ff607c7e341552c82138bfe13cca4 (cherry picked from commit 8c63ce27d4d3e87f535769976e9b9185fa372b9b) Change-Id: I8a5e9655e6c40404389344e78c21b0ebd5a1a4b9 (cherry picked from commit 94e2fc9465e9a2c9d62902b09ed9a18d9250ccd8)
2021-10-29Merge cherrypicks of [16093381] into sc-qpr1-d-release.Android Build Coastguard Worker
Change-Id: Icf785f6fcbfec66546d7a744294af20a322f4c74
2021-10-29Allow PROT_EXEC on the zygote mappings when falling back to ashmemNicolas Geoffray
Because we now protect the mappings before creating the executable one, we need to also allow PROT_EXEC on an ashmem region. Test: manually change code to use ashmem, build, see that JIT is created. Bug: 202999239 Merged-In: I9f2944c45f4ff607c7e341552c82138bfe13cca4 (cherry picked from commit 8c63ce27d4d3e87f535769976e9b9185fa372b9b) Change-Id: I8a5e9655e6c40404389344e78c21b0ebd5a1a4b9 (cherry picked from commit 94e2fc9465e9a2c9d62902b09ed9a18d9250ccd8)
2021-10-08Merge e842764b5891249d287697402611505fe1535666 on remote branchLinux Build Service Account
Change-Id: I441cf404b886ac4dc0fb76602117269657282cda
2021-10-06Snap for 7797350 from 28ae49ccaff18c2da1e2d3c9597707a19b54bf08 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: I920762bdd9629fb9a6db41f2b55466f5992d1ad4
2021-10-06Snap for 7796451 from f0171ddd40a98aa02c28962494b0d2f08cc57f70 to ↵Android Build Coastguard Worker
sc-qpr1-release Change-Id: Idb694197685a3a855e9f8dc1d18c8385ef3fb5e1
2021-10-06Snap for 7796451 from f0171ddd40a98aa02c28962494b0d2f08cc57f70 to ↵Android Build Coastguard Worker
sc-qpr1-d-release Change-Id: Ia2aa109dbac73beaf7feeebfced89ebeca20bb95
2021-10-05Change order of creation of JIT mappings. am: c95b630423Nicolas Geoffray
Original change: https://googleplex-android-review.googlesource.com/c/platform/art/+/15951443 Change-Id: Ide27dbe61bff2affd67a3cb02fc1bc09dfb2f393
2021-10-05Change order of creation of JIT mappings.Nicolas Geoffray
To ensure we don't create mappings that can later be turned into writable mappings. Ignore-AOSP-First: b/200284993 Test: jit_memory_region_test Test: device booting Bug: 200284993 Change-Id: I5160e61d287207563af57b71d50b08364ca892a0
2021-10-05Merge SP1A.210812.016Haamed Gheibi
Change-Id: Iaf4bb73cf665ece167027bf375605ea70dd16975
2021-09-29Snap for 7776994 from 693713c9cad26e713478294ecb1377ba3a0e51f3 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: Ib8c175570a419896714ed5090a10117c8f9e2ded
2021-09-28Fix android.security.cts.FileDescriptorTest#testCLOEXECHu Wang
When ART is mainline, it will create memFd boot-image-methods.art without MFD_CLOEXEC. Add MFD_CLOEXEC flag when create boot-image-methods.art memFd. Bug: 197498527 Test: run cts CtsSecurityTestCases pass CRs-Fixed: 3034193 Change-Id: If941c036f7adb598d67ec2b2c5bc4cb24994e3a1 (cherry picked from commit 3326fcea1ead5d5d360a053704faad27b6dd8c40)
2021-09-28Fix android.security.cts.FileDescriptorTest#testCLOEXECHu Wang
When ART is mainline, it will create memFd boot-image-methods.art without MFD_CLOEXEC. Add MFD_CLOEXEC flag when create boot-image-methods.art memFd. Bug: 197498527 Test: run cts CtsSecurityTestCases pass CRs-Fixed: 3034193 Change-Id: If941c036f7adb598d67ec2b2c5bc4cb24994e3a1 (cherry picked from commit 3326fcea1ead5d5d360a053704faad27b6dd8c40)
2021-09-28Snap for 7772391 from 2174ba31dfa1f8a81c0ca38e9553ffdc8db94d0b to ↵Android Build Coastguard Worker
sc-qpr1-release Change-Id: Ie117abb1c82ff0546660283111b0c20d90624407
2021-09-27Better isolate standalone ART gtests on device.Roland Levillain
Standalone ART gtests used to be installed in the same directory on device (`/data/local/tmp/nativetest`), which could be a race condition. In particular, some ART gtests are run as root (e.g. `art_standalone_dexoptanalyzer_tests`) and create the `/data/local/tmp/nativetest` directory with `root` ownership/permissions, preventing any subsequent ART gtest not run as root (e.g. `art_standalone_cmdline_tests`) from installing its artifacts in that directory. To prevent these issues, use a different directory on device (under `/data/local/tmp`) per standalone ART gtest. (cherry picked from commit d8c0ac264f606bf0c69781388ca6048eb0a4b55f) (cherry picked from commit 58a79873e94dbe4a168221fc95b641dbf8cd3e3e) Test: atest art_standalone_dexoptanalyzer_tests \ && atest art_standalone_cmdline_tests Test: atest art_standalone_\*_tests Bug: 194403904 Bug: 162834439 Change-Id: I141c1676382b078c1441e5782b3dc77affafa3fc Merged-In: I141c1676382b078c1441e5782b3dc77affafa3fc
2021-09-27[automerger skipped] Revert "Add standalone ART gtests to `TEST_MAPPING` ↵Roland Levillain
group `presubmit`." am: c57043bb4b -s ours am skip reason: Merged-In Ibfcf212a4bc3094ca74f8f3c0f98469810c6ea19 with SHA-1 66372d2c44 is already in history. Merged-In was found from reverted change. Reverted change: https://googleplex-android-review.googlesource.com/c/platform/art/+/15241579 Original change: https://googleplex-android-review.googlesource.com/c/platform/art/+/15843431 Change-Id: I684f7c72ba2a2ed427275f144d9d61600124fdf0
2021-09-27[automerger skipped] Revert "Add standalone ART gtests to `TEST_MAPPING` ↵Roland Levillain
group `mainline-presubmit`." am: 1eb37aaa03 -s ours am skip reason: Merged-In Ibfcf212a4bc3094ca74f8f3c0f98469810c6ea19 with SHA-1 66372d2c44 is already in history Original change: https://googleplex-android-review.googlesource.com/c/platform/art/+/15836038 Change-Id: Icbb80531e1c3c1f712d41a0b6398462435220e25
2021-09-27Revert "Add standalone ART gtests to `TEST_MAPPING` group `presubmit`."Roland Levillain
This reverts commit 66372d2c444b1badaa0e3972001dea3f31c0d339. Reason for revert: Some standalone ART gtests are failing in presubmits when built from sources where the Oat file version has been updated -- compared to current prebuilt ART APEXes -- and run against such a prebuilt ART APEX, that does not include that Oat version change. Test: Rely on TreeHugger presubmits Bug: 193218514 Bug: 152379281 Bug: 194403904 Change-Id: I88a9e7801dcc98940209d361af385bdcbb6e5099 Merged-In: Ibfcf212a4bc3094ca74f8f3c0f98469810c6ea19
2021-09-27Revert "Add standalone ART gtests to `TEST_MAPPING` group `mainline-presubmit`."Roland Levillain
This reverts commit 506b64c3b001dc32c59b8e63ce2e6d6cf4451fcb. Reason for revert: Some standalone ART gtests are failing in presubmits when built from sources where the Oat file version has been updated -- compared to current prebuilt ART APEXes -- and run against such a prebuilt ART APEX, that does not include that Oat version change. Test: Rely on TreeHugger presubmits Bug: 193218514 Bug: 152379281 Bug: 194403904 Change-Id: I6166e7146a4bd07fce8acde381caa9a741ecc254 Merged-In: Ibfcf212a4bc3094ca74f8f3c0f98469810c6ea19
2021-09-25Snap for 7766788 from 7425a437de196e8656494ac1434ce0f9ed9c3933 to ↵Android Build Coastguard Worker
sc-qpr1-release Change-Id: I34d98015835da8844fef7af2a00179dcab901db4
2021-09-24Always check for an exception after a class lookup.Nicolas Geoffray
This means we need to stop the lookup, as an exception is pending. (cherry picked from commit 36d182089a4ced3603c7cdcb61b2d92a5a76a471) Test: 831-unverified-bcp Bug: 195766785 Merged-In: I8aa65f6bbaae83eff0be7ca5d82e0c0a548b5b60 Change-Id: I3e414f75e7081eb93b8cb5af89859d25492edf10
2021-09-23Snap for 7757388 from 399fa51d31e20cb2251b3f68f1b4f1d030311bba to ↵Android Build Coastguard Worker
sc-qpr1-release Change-Id: Idb3657e56e56565e1dee81deb1f2fe899ef6d04b
2021-09-22Update .oat version after disabling partial LSE. am: 8b27ea0005Nicolas Geoffray
Original change: https://googleplex-android-review.googlesource.com/c/platform/art/+/15836008 Change-Id: I0de7810c1afb28ca44a418b448fb413d8823fc48
2021-09-22Temporarily disable partial LSE. am: 86be262a3dNicolas Geoffray
Original change: https://googleplex-android-review.googlesource.com/c/platform/art/+/15836007 Change-Id: Ic2e1ca7735ef01cd02a3c58e798d5a095b07bc15
2021-09-22Update .oat version after disabling partial LSE.Nicolas Geoffray
This will ensure we don't take any .oat file that has the bogus generated code. (cherry picked from commit 776a1c1447be1e504c2013c5d170d08ef4907d7f) (cherry picked from commit 8246b0cbfd4c5e19596e2dac0c1377c56f444d5f) Test: test.py Bug: 197981962 Merged-In: Ic14d18d310bdcd408c1f6e2777ef53a041fb2f12 Change-Id: Ic66ee1998f490c15b95279f3b4881f9581772190
2021-09-21Snap for 7751031 from ebd31ed035a67ca50fd8d39af366ae5eb5c56424 to ↵Android Build Coastguard Worker
s-keystone-qcom-release Change-Id: I6a41feedf108994ccb8497b6d339f77940be6d00
2021-09-20[automerger skipped] Merge mpr-2021-09-05 skipped: 2711cc7322Eric Arseneau
Change-Id: I3f8dd6898857d8add033324dba2d7e37d829b73a
2021-09-16Merge mpr-2021-09-05Eric Arseneau
Change-Id: I996faf0c86c4d2fbe48d3b28c38156f0b8541345
2021-09-15Temporarily disable partial LSE.Nicolas Geoffray
Due to a bug in it. Add a regression test. (cherry picked from commit 18074d2b59ae56dcfccea770ceb515215c8eb53f) (cherry picked from commit a38b7355a603772424a8212840849094ce0ddeb3) Bug: 197818595 Test: 828-partial-lse Merged-In: I65da4f7ef09cd2a1f6c4b21799ecd7a42c1adac2 Change-Id: I3eb52dc091264e617bb711260fb4950d15c7f50b
2021-09-15Snap for 7732468 from 020c79e5f2b61924d6e21e8162f52e992d7b30fe to ↵Android Build Coastguard Worker
sc-qpr1-release Change-Id: I44559e16534133a93fe580999895e4ffbfd41b3c
2021-09-14Update .oat version after disabling partial LSE.Nicolas Geoffray
This will ensure we don't take any .oat file that has the bogus generated code. (cherry picked from commit 776a1c1447be1e504c2013c5d170d08ef4907d7f) (cherry picked from commit 8246b0cbfd4c5e19596e2dac0c1377c56f444d5f) Test: test.py Bug: 197981962 Merged-In: Ic14d18d310bdcd408c1f6e2777ef53a041fb2f12 Change-Id: Ic66ee1998f490c15b95279f3b4881f9581772190
2021-09-14Temporarily disable partial LSE.Nicolas Geoffray
Due to a bug in it. Add a regression test. Bug: 197818595 Test: 828-partial-lse (cherry picked from commit 18074d2b59ae56dcfccea770ceb515215c8eb53f) (cherry picked from commit a38b7355a603772424a8212840849094ce0ddeb3) Merged-In: I65da4f7ef09cd2a1f6c4b21799ecd7a42c1adac2 Change-Id: I3eb52dc091264e617bb711260fb4950d15c7f50b
2021-09-14Snap for 7728996 from 9c70cdb384578e5c37b828cf4f629c929d743d1f to ↵Android Build Coastguard Worker
sc-qpr1-release Change-Id: Ib5b7ed76aabdc23e2d5ca6c37cf7c4230b03e4fe