summaryrefslogtreecommitdiff
path: root/openjdkjvmti
AgeCommit message (Collapse)Author
2021-09-04Improve suspension timeout diagnostic and fix raceHans Boehm
Fix a data race on state_and_flags. Since the access was volatile and there are system calls in the loop, this is extremely unlikey to have casused the bug here, but ... So, assuming this is still broken, produce more informative output once we time out. Remove unused argument from SuspendThreadByPeer(). It made the logic more complicated and made it harder to reason about correctness. Remove dead code after LOG(FATAL, ...) Bug: 181778559 Test: TreeHugger, temporarily paste log message into hotter path. Merged-In: I6f3455925b3a3f4726a870150aeb54ea60a38d67 (cherry picked from commit 9d27fbc8ced914f4726187920a7794b07eca3e71) Change-Id: Ia3f04153fb0a4f1b899fb0f68a6121728f89cb91 (cherry picked from commit 116203735734738cbfdffc2163b08b1707089f9c)
2021-04-28Remove RETURN_VOID_NO_BARRIER byte-code.David Srbecky
Unused and obsolete quickened byte-code. Bug: 170086509 Test: test.py -b --host --64 Change-Id: I1e917c189da7bf64418412522676dc6b081d5c0b
2021-03-25Revamp vdex format for better extensibility.Nicolas Geoffray
- Remove class loader context and boot classpath checksum sections. Those are not needed now that VerifierDeps don't depend on them. - Remove remaining quickening encoding. - Introduce sections in a vdex file, which can be extended without requiring a version change. Test: test.py Bug: 160294863 Change-Id: I4e3e25f34d242dc4de37f30ba9d78bcffbc1436d
2021-03-22Explictly pass VerifierDeps when asking for class verification.Nicolas Geoffray
This will simplify creating and populating VerifierDeps at runtime, which is needed for doing and saving background verifcation of secondary dex files. Test: test.py Bug: 158463186 Change-Id: Ic17913ebd173700e866ba9309bf6ae131fcbc423
2021-03-19Add min_sdk_version for ART module.Nicolas Geoffray
Bug: 180399951 Test: m Change-Id: I5e2a1ddc3063be26c602bf4db8e6b77f2d54b656
2021-03-04Revert^2 "[metrics] Add StatsdBackend"Eric Holk
Adds a new backend that allows reporting ART's metrics to statsd, where they can then be uploaded to Westworld. Manual Testing Instructions: Run the following commands. m statsd_testdrive adb shell setprop dalvik.vm.extra-opts \ -Xwrite-metrics-to-statsd\\\ \ -Xwrite-metrics-to-log\\\ \ -Xmetrics-reporting-period=10 adb shell stop && adb shell start statsd_testdrive 332 After about a minute, you should see several atoms logged from ART. This reverts commit dbad1ef673140c66cdbcbbf40424674ae8e2b4c8. Reason for revert: Added statsd apex to prebuilts Bug: 178236337 Test: Manual, see above Test: see instructions on https://r.android.com/1591932 Change-Id: I2071983c04c51efe88df6a56c59fc418fe6e9424
2021-03-02Move dex file registration in ti_redefine.David Srbecky
AppendToBootClassPath includes dex file registration, so it was being registered twice on that code path. Test: test.py -b -r --host --64 Change-Id: I14146e38e21958b557151f046da6b898e685b688
2021-03-02[LSC] Add LOCAL_LICENSE_KINDS to artBob Badour
Added SPDX-license-identifier-Apache-2.0 to: adbconnection/Android.bp benchmark/Android.bp build/Android.bp build/Android.cpplint.mk build/Android.gtest.mk build/apex/Android.bp build/boot/Android.bp build/sdk/Android.bp cmdline/Android.bp compiler/Android.bp dalvikvm/Android.bp dex2oat/Android.bp dexdump/Android.bp dexlayout/Android.bp dexlist/Android.bp dexoptanalyzer/Android.bp disassembler/Android.bp dt_fd_forward/export/Android.bp imgdiag/Android.bp libartbase/Android.bp libartpalette/Android.bp libartservice/Android.bp libartservice/tests/Android.bp libarttools/Android.bp libdexfile/Android.bp libelffile/Android.bp libnativebridge/Android.bp libnativebridge/tests/Android.bp libnativeloader/Android.bp libnativeloader/test/Android.bp libnativeloader/test/Android.mk libprofile/Android.bp oatdump/Android.bp odrefresh/Android.bp perfetto_hprof/Android.bp profman/Android.bp runtime/Android.bp simulator/Android.bp test/001-HelloWorld/Android.bp test/001-Main/Android.bp test/002-sleep/Android.bp test/004-InterfaceTest/Android.bp test/004-SignalTest/Android.bp test/004-UnsafeTest/Android.bp test/004-checker-UnsafeTest18/Android.bp test/006-args/Android.bp test/007-count10/Android.bp test/009-instanceof/Android.bp test/010-instance/Android.bp test/011-array-copy/Android.bp test/012-math/Android.bp test/013-math2/Android.bp test/014-math3/Android.bp test/015-switch/Android.bp test/016-intern/Android.bp test/017-float/Android.bp test/018-stack-overflow/Android.bp test/019-wrong-array-type/Android.bp test/020-string/Android.bp test/021-string2/Android.bp test/022-interface/Android.bp test/025-access-controller/Android.bp test/026-access/Android.bp test/027-arithmetic/Android.bp test/028-array-write/Android.bp test/029-assert/Android.bp test/030-bad-finalizer/Android.bp test/033-class-init-deadlock/Android.bp test/034-call-null/Android.bp test/035-enum/Android.bp test/036-finalizer/Android.bp test/037-inherit/Android.bp test/038-inner-null/Android.bp test/039-join-main/Android.bp test/040-miranda/Android.bp test/041-narrowing/Android.bp test/043-privates/Android.bp test/044-proxy/Android.bp test/045-reflect-array/Android.bp test/046-reflect/Android.bp test/047-returns/Android.bp test/048-reflect-v8/Android.bp test/049-show-object/Android.bp test/050-sync-test/Android.bp test/051-thread/Android.bp test/052-verifier-fun/Android.bp test/053-wait-some/Android.bp test/054-uncaught/Android.bp test/055-enum-performance/Android.bp test/058-enum-order/Android.bp test/059-finalizer-throw/Android.bp test/061-out-of-memory/Android.bp test/062-character-encodings/Android.bp test/063-process-manager/Android.bp test/067-preemptive-unpark/Android.bp test/070-nio-buffer/Android.bp test/072-precise-gc/Android.bp test/072-reachability-fence/Android.bp test/074-gc-thrash/Android.bp test/076-boolean-put/Android.bp test/078-polymorphic-virtual/Android.bp test/079-phantom/Android.bp test/080-oom-fragmentation/Android.bp test/080-oom-throw-with-finalizer/Android.bp test/080-oom-throw/Android.bp test/081-hot-exceptions/Android.bp test/082-inline-execute/Android.bp test/083-compiler-regressions/Android.bp test/084-class-init/Android.bp test/086-null-super/Android.bp test/087-gc-after-link/Android.bp test/090-loop-formation/Android.bp test/092-locale/Android.bp test/093-serialization/Android.bp test/094-pattern/Android.bp test/095-switch-MAX_INT/Android.bp test/096-array-copy-concurrent-gc/Android.bp test/098-ddmc/Android.bp test/099-vmdebug/Android.bp test/100-reflect2/Android.bp test/1004-checker-volatile-ref-load/Android.bp test/101-fibonacci/Android.bp test/102-concurrent-gc/Android.bp test/103-string-append/Android.bp test/104-growth-limit/Android.bp test/105-invoke/Android.bp test/106-exceptions2/Android.bp test/107-int-math2/Android.bp test/108-check-cast/Android.bp test/109-suspend-check/Android.bp test/110-field-access/Android.bp test/112-double-math/Android.bp test/114-ParallelGC/Android.bp test/115-native-bridge/Android.bp test/116-nodex2oat/Android.bp test/120-hashcode/Android.bp test/121-simple-suspend-check/Android.bp test/122-npe/Android.bp test/123-compiler-regressions-mt/Android.bp test/123-inline-execute2/Android.bp test/125-gc-and-classloading/Android.bp test/128-reg-spill-on-implicit-nullcheck/Android.bp test/129-ThreadGetId/Android.bp test/132-daemon-locks-shutdown/Android.bp test/133-static-invoke-super/Android.bp test/1336-short-finalizer-timeout/Android.bp test/1337-gc-coverage/Android.bp test/1339-dead-reference-safe/Android.bp test/136-daemon-jni-shutdown/Android.bp test/139-register-natives/Android.bp test/140-dce-regression/Android.bp test/140-field-packing/Android.bp test/143-string-value/Android.bp test/144-static-field-sigquit/Android.bp test/148-multithread-gc-annotations/Android.bp test/149-suspend-all-stress/Android.bp test/150-loadlibrary/Android.bp test/151-OpenFileLimit/Android.bp test/152-dead-large-object/Android.bp test/153-reference-stress/Android.bp test/154-gc-loop/Android.bp test/156-register-dex-file-multi-loader/Android.bp test/158-app-image-class-table/Android.bp test/159-app-image-fields/Android.bp test/163-app-image-methods/Android.bp test/165-lock-owner-proxy/Android.bp test/168-vmstack-annotated/Android.bp test/169-threadgroup-jni/Android.bp test/170-interface-init/Android.bp test/172-app-image-twice/Android.bp test/174-escaping-instance-of-bad-class/Android.bp test/175-alloc-big-bignums/Android.bp test/176-app-image-string/Android.bp test/177-visibly-initialized-deadlock/Android.bp test/178-app-image-native-method/Android.bp test/179-nonvirtual-jni/Android.bp test/1900-track-alloc/Android.bp test/1901-get-bytecodes/Android.bp test/1902-suspend/Android.bp test/1903-suspend-self/Android.bp test/1904-double-suspend/Android.bp test/1905-suspend-native/Android.bp test/1906-suspend-list-me-first/Android.bp test/1907-suspend-list-self-twice/Android.bp test/1908-suspend-native-resume-self/Android.bp test/1909-per-agent-tls/Android.bp test/1910-transform-with-default/Android.bp test/1911-get-local-var-table/Android.bp test/1912-get-set-local-primitive/Android.bp test/1913-get-set-local-objects/Android.bp test/1914-get-local-instance/Android.bp test/1915-get-set-local-current-thread/Android.bp test/1916-get-set-current-frame/Android.bp test/1917-get-stack-frame/Android.bp test/1919-vminit-thread-start-timing/Android.bp test/1920-suspend-native-monitor/Android.bp test/1921-suspend-native-recursive-monitor/Android.bp test/1922-owned-monitors-info/Android.bp test/1923-frame-pop/Android.bp test/1924-frame-pop-toggle/Android.bp test/1925-self-frame-pop/Android.bp test/1926-missed-frame-pop/Android.bp test/1927-exception-event/Android.bp test/1928-exception-event-exception/Android.bp test/1930-monitor-info/Android.bp test/1931-monitor-events/Android.bp test/1932-monitor-events-misc/Android.bp test/1933-monitor-current-contended/Android.bp test/1934-jvmti-signal-thread/Android.bp test/1935-get-set-current-frame-jit/Android.bp test/1936-thread-end-events/Android.bp test/1937-transform-soft-fail/Android.bp test/1938-transform-abstract-single-impl/Android.bp test/1939-proxy-frames/Android.bp test/1941-dispose-stress/Android.bp test/1942-suspend-raw-monitor-exit/Android.bp test/1943-suspend-raw-monitor-wait/Android.bp test/1945-proxy-method-arguments/Android.bp test/1947-breakpoint-redefine-deopt/Android.bp test/1949-short-dex-file/Android.bp test/1951-monitor-enter-no-suspend/Android.bp test/1953-pop-frame/Android.bp test/1954-pop-frame-jit/Android.bp test/1955-pop-frame-jit-called/Android.bp test/1956-pop-frame-jit-calling/Android.bp test/1957-error-ext/Android.bp test/1958-transform-try-jit/Android.bp test/1959-redefine-object-instrument/Android.bp test/1960-checker-bounds-codegen/Android.bp test/1960-obsolete-jit-multithread-native/Android.bp test/1961-checker-loop-vectorizer/Android.bp test/1961-obsolete-jit-multithread/Android.bp test/1962-multi-thread-events/Android.bp test/1963-add-to-dex-classloader-in-memory/Android.bp test/1967-get-set-local-bad-slot/Android.bp test/1968-force-early-return/Android.bp test/1969-force-early-return-void/Android.bp test/1970-force-early-return-long/Android.bp test/1971-multi-force-early-return/Android.bp test/1972-jni-id-swap-indices/Android.bp test/1973-jni-id-swap-pointer/Android.bp test/1974-resize-array/Android.bp test/1975-hello-structural-transformation/Android.bp test/1976-hello-structural-static-methods/Android.bp test/1977-hello-structural-obsolescence/Android.bp test/1978-regular-obsolete-then-structural-obsolescence/Android.bp test/1979-threaded-structural-transformation/Android.bp test/1980-obsolete-object-cleared/Android.bp test/1982-no-virtuals-structural-redefinition/Android.bp test/1984-structural-redefine-field-trace/Android.bp test/1985-structural-redefine-stack-scope/Android.bp test/1986-structural-redefine-multi-thread-stack-scope/Android.bp test/1987-structural-redefine-recursive-stack-scope/Android.bp test/1988-multi-structural-redefine/Android.bp test/1989-transform-bad-monitor/Android.bp test/1990-structural-bad-verify/Android.bp test/1991-hello-structural-retransform/Android.bp test/1992-retransform-no-such-field/Android.bp test/1993-fallback-non-structural/Android.bp test/1994-final-virtual-structural/Android.bp test/1995-final-virtual-structural-multithread/Android.bp test/1996-final-override-virtual-structural/Android.bp test/1997-structural-shadow-method/Android.bp test/1998-structural-shadow-field/Android.bp test/1999-virtual-structural/Android.bp test/2003-double-virtual-structural/Android.bp test/2004-double-virtual-structural-abstract/Android.bp test/2005-pause-all-redefine-multithreaded/Android.bp test/2008-redefine-then-old-reflect-field/Android.bp test/201-built-in-except-detail-messages/Android.bp test/2011-stack-walk-concurrent-instrument/Android.bp test/2019-constantcalculationsinking/Android.bp test/202-thread-oome/Android.bp test/2020-InvokeVirtual-Inlining/Android.bp test/2021-InvokeStatic-Inlining/Android.bp test/2022-Invariantloops/Android.bp test/2023-InvariantLoops_typecast/Android.bp test/2024-InvariantNegativeLoop/Android.bp test/2025-ChangedArrayValue/Android.bp test/2026-DifferentMemoryLSCouples/Android.bp test/2027-TwiceTheSameMemoryCouple/Android.bp test/2028-MultiBackward/Android.bp test/2029-contended-monitors/Android.bp test/203-multi-checkpoint/Android.bp test/2030-long-running-child/Android.bp test/2031-zygote-compiled-frame-deopt/Android.bp test/2033-shutdown-mechanics/Android.bp test/2036-jni-filechannel/Android.bp test/2037-thread-name-inherit/Android.bp test/2231-checker-heap-poisoning/Android.bp test/2232-write-metrics-to-log/Android.bp test/300-package-override/Android.bp test/301-abstract-protected/Android.bp test/302-float-conversion/Android.bp test/304-method-tracing/Android.bp test/305-other-fault-handler/Android.bp test/401-optimizing-compiler/Android.bp test/402-optimizing-control-flow/Android.bp test/403-optimizing-long/Android.bp test/404-optimizing-allocator/Android.bp test/405-optimizing-long-allocator/Android.bp test/406-fields/Android.bp test/407-arrays/Android.bp test/408-move-bug/Android.bp test/409-materialized-condition/Android.bp test/410-floats/Android.bp test/411-checker-hdiv-hrem-const/Android.bp test/411-checker-hdiv-hrem-pow2/Android.bp test/411-checker-instruct-simplifier-hrem/Android.bp test/411-optimizing-arith/Android.bp test/413-regalloc-regression/Android.bp test/414-static-fields/Android.bp test/418-const-string/Android.bp test/419-long-parameter/Android.bp test/420-const-class/Android.bp test/421-exceptions/Android.bp test/421-large-frame/Android.bp test/422-instanceof/Android.bp test/422-type-conversion/Android.bp test/423-invoke-interface/Android.bp test/424-checkcast/Android.bp test/426-monitor/Android.bp test/427-bitwise/Android.bp test/427-bounds/Android.bp test/429-ssa-builder/Android.bp test/430-live-register-slow-path/Android.bp test/433-gvn/Android.bp test/434-shifter-operand/Android.bp test/435-try-finally-without-catch/Android.bp test/436-rem-float/Android.bp test/436-shift-constant/Android.bp test/437-inline/Android.bp test/438-volatile/Android.bp test/439-npe/Android.bp test/439-swap-double/Android.bp test/440-stmp/Android.bp test/441-checker-inliner/Android.bp test/443-not-bool-inline/Android.bp test/444-checker-nce/Android.bp test/445-checker-licm/Android.bp test/446-checker-inliner2/Android.bp test/447-checker-inliner3/Android.bp test/449-checker-bce-rem/Android.bp test/449-checker-bce/Android.bp test/450-checker-types/Android.bp test/451-regression-add-float/Android.bp test/451-spill-splot/Android.bp test/454-get-vreg/Android.bp test/455-checker-gvn/Android.bp test/456-baseline-array-set/Android.bp test/458-long-to-fpu/Android.bp test/461-get-reference-vreg/Android.bp test/464-checker-inline-sharpen-calls/Android.bp test/465-checker-clinit-gvn/Android.bp test/466-get-live-vreg/Android.bp test/469-condition-materialization/Android.bp test/470-huge-method/Android.bp test/471-deopt-environment/Android.bp test/472-type-propagation/Android.bp test/473-checker-inliner-constants/Android.bp test/473-remove-dead-block/Android.bp test/474-checker-boolean-input/Android.bp test/474-fp-sub-neg/Android.bp test/475-simplify-mul-zero/Android.bp test/476-checker-ctor-fence-redun-elim/Android.bp test/476-checker-ctor-memory-barrier/Android.bp test/476-clinit-inline-static-invoke/Android.bp test/477-checker-bound-type/Android.bp test/477-long-2-float-convers-precision/Android.bp test/478-checker-clinit-check-pruning/Android.bp test/478-checker-inline-noreturn/Android.bp test/478-checker-inliner-nested-loop/Android.bp test/479-regression-implicit-null-check/Android.bp test/480-checker-dead-blocks/Android.bp test/481-regression-phi-cond/Android.bp test/482-checker-loop-back-edge-use/Android.bp test/483-dce-block/Android.bp test/485-checker-dce-switch/Android.bp test/486-checker-must-do-null-check/Android.bp test/487-checker-inline-calls/Android.bp test/488-checker-inline-recursive-calls/Android.bp test/489-current-method-regression/Android.bp test/490-checker-inline/Android.bp test/491-current-method/Android.bp test/492-checker-inline-invoke-interface/Android.bp test/493-checker-inline-invoke-interface/Android.bp test/494-checker-instanceof-tests/Android.bp test/495-checker-checkcast-tests/Android.bp test/496-checker-inlining-class-loader/Android.bp test/497-inlining-and-class-loader/Android.bp test/499-bce-phi-array-length/Android.bp test/500-instanceof/Android.bp test/505-simplifier-type-propagation/Android.bp test/507-boolean-test/Android.bp test/507-referrer/Android.bp test/508-checker-disassembly/Android.bp test/508-referrer-method/Android.bp test/513-array-deopt/Android.bp test/514-shifts/Android.bp test/519-bound-load-class/Android.bp test/521-checker-array-set-null/Android.bp test/521-regression-integer-field-set/Android.bp test/524-boolean-simplifier-regression/Android.bp test/525-checker-arrays-fields1/Android.bp test/525-checker-arrays-fields2/Android.bp test/526-checker-caller-callee-regs/Android.bp test/526-long-regalloc/Android.bp test/527-checker-array-access-simd/Android.bp test/527-checker-array-access-split/Android.bp test/528-long-hint/Android.bp test/529-long-split/Android.bp test/530-checker-loops1/Android.bp test/530-checker-loops2/Android.bp test/530-checker-loops3/Android.bp test/530-checker-loops4/Android.bp test/530-checker-loops5/Android.bp test/530-checker-lse-ctor-fences/Android.bp test/530-checker-lse-simd/Android.bp test/530-checker-lse/Android.bp test/530-checker-lse2/Android.bp test/530-instanceof-checkcast/Android.bp test/530-regression-lse/Android.bp test/532-checker-nonnull-arrayset/Android.bp test/534-checker-bce-deoptimization/Android.bp test/535-deopt-and-inlining/Android.bp test/536-checker-intrinsic-optimization/Android.bp test/537-checker-arraycopy/Android.bp test/537-checker-jump-over-jump/Android.bp test/538-checker-embed-constants/Android.bp test/540-checker-rtp-bug/Android.bp test/542-bitfield-rotates/Android.bp test/542-inline-trycatch/Android.bp test/542-unresolved-access-check/Android.bp test/545-tracing-and-jit/Android.bp test/548-checker-inlining-and-dce/Android.bp test/549-checker-types-merge/Android.bp test/550-checker-multiply-accumulate/Android.bp test/550-new-instance-clinit/Android.bp test/551-checker-clinit/Android.bp test/551-checker-shifter-operand/Android.bp test/551-implicit-null-checks/Android.bp test/552-checker-sharpening/Android.bp test/552-checker-x86-avx2-bit-manipulation/Android.bp test/554-checker-rtp-checkcast/Android.bp test/555-UnsafeGetLong-regression/Android.bp test/557-checker-instruct-simplifier-ror/Android.bp test/558-switch/Android.bp test/559-bce-ssa/Android.bp test/559-checker-rtp-ifnotnull/Android.bp test/560-packed-switch/Android.bp test/561-divrem/Android.bp test/561-shared-slowpaths/Android.bp test/562-bce-preheader/Android.bp test/562-checker-no-intermediate/Android.bp test/563-checker-invoke-super/Android.bp test/564-checker-bitcount/Android.bp test/564-checker-inline-loop/Android.bp test/564-checker-negbitwise/Android.bp test/565-checker-condition-liveness/Android.bp test/566-checker-codegen-select/Android.bp test/566-polymorphic-inlining/Android.bp test/567-checker-builder-intrinsics/Android.bp test/568-checker-onebit/Android.bp test/570-checker-select/Android.bp test/572-checker-array-get-regression/Android.bp test/573-checker-checkcast-regression/Android.bp test/576-polymorphic-inlining/Android.bp test/577-checker-fp2int/Android.bp test/578-bce-visit/Android.bp test/578-polymorphic-inlining/Android.bp test/579-inline-infinite/Android.bp test/580-checker-round/Android.bp test/580-crc32/Android.bp test/581-rtp/Android.bp test/582-checker-bce-length/Android.bp test/583-checker-zero/Android.bp test/584-checker-div-bool/Android.bp test/589-super-imt/Android.bp test/590-checker-arr-set-null-regression/Android.bp test/591-checker-regression-dead-loop/Android.bp test/593-checker-long-2-float-regression/Android.bp test/594-checker-array-alias/Android.bp test/594-load-string-regression/Android.bp test/595-profile-saving/Android.bp test/597-deopt-busy-loop/Android.bp test/597-deopt-invoke-stub/Android.bp test/597-deopt-new-string/Android.bp test/602-deoptimizeable/Android.bp test/603-checker-instanceof/Android.bp test/604-hot-static-interface/Android.bp test/605-new-string-from-bytes/Android.bp test/607-daemon-stress/Android.bp test/609-checker-inline-interface/Android.bp test/609-checker-x86-bounds-check/Android.bp test/610-arraycopy/Android.bp test/611-checker-simplify-if/Android.bp test/614-checker-dump-constant-location/Android.bp test/615-checker-arm64-store-zero/Android.bp test/616-cha-abstract/Android.bp test/616-cha-interface/Android.bp test/616-cha-miranda/Android.bp test/616-cha-native/Android.bp test/616-cha-regression-proxy-method/Android.bp test/616-cha/Android.bp test/617-clinit-oome/Android.bp test/618-checker-induction/Android.bp test/619-checker-current-method/Android.bp test/620-checker-bce-intrinsics/Android.bp test/622-checker-bce-regressions/Android.bp test/623-checker-loop-regressions/Android.bp test/625-checker-licm-regressions/Android.bp test/626-set-resolved-string/Android.bp test/627-checker-unroll/Android.bp test/628-vdex/Android.bp test/629-vdex-speed/Android.bp test/631-checker-get-class/Android.bp test/632-checker-char-at-bounds/Android.bp test/635-checker-arm64-volatile-load-cc/Android.bp test/636-arm64-veneer-pool/Android.bp test/637-checker-throw-inline/Android.bp test/638-checker-inline-cache-intrinsic/Android.bp test/639-checker-code-sinking/Android.bp test/640-checker-boolean-simd/Android.bp test/640-checker-integer-valueof/Android.bp test/640-checker-simd/Android.bp test/641-checker-arraycopy/Android.bp test/641-iterations/Android.bp test/642-fp-callees/Android.bp test/643-checker-bogus-ic/Android.bp test/645-checker-abs-simd/Android.bp test/646-checker-arraycopy-large-cst-pos/Android.bp test/646-checker-long-const-to-int/Android.bp test/646-checker-simd-hadd/Android.bp test/647-jni-get-field-id/Android.bp test/650-checker-inline-access-thunks/Android.bp test/652-deopt-intrinsic/Android.bp test/654-checker-periodic/Android.bp test/655-checker-simd-arm-opt/Android.bp test/655-jit-clinit/Android.bp test/656-checker-simd-opt/Android.bp test/656-loop-deopt/Android.bp test/657-branches/Android.bp test/658-fp-read-barrier/Android.bp test/660-checker-sad/Android.bp test/660-checker-simd-sad/Android.bp test/660-clinit/Android.bp test/661-checker-simd-reduc/Android.bp test/661-oat-writer-layout/Android.bp test/662-regression-alias/Android.bp test/664-aget-verifier/Android.bp test/665-checker-simd-zero/Android.bp test/666-dex-cache-itf/Android.bp test/667-checker-simd-alignment/Android.bp test/667-jit-jni-stub/Android.bp test/667-out-of-bounds/Android.bp test/669-checker-break/Android.bp test/671-npe-field-opts/Android.bp test/672-checker-throw-method/Android.bp test/673-checker-throw-vmethod/Android.bp test/674-HelloWorld-Dm/Android.bp test/674-hotness-compiled/Android.bp test/676-proxy-jit-at-first-use/Android.bp test/677-fsi2/Android.bp test/679-locks/Android.bp test/680-checker-deopt-dex-pc-0/Android.bp test/680-sink-regression/Android.bp test/684-checker-simd-dotprod/Android.bp test/684-select-condition/Android.bp test/685-deoptimizeable/Android.bp test/687-deopt/Android.bp test/689-multi-catch/Android.bp test/689-zygote-jit-deopt/Android.bp test/693-vdex-inmem-loader-evict/Android.bp test/694-clinit-jit/Android.bp test/695-simplify-throws/Android.bp test/696-loop/Android.bp test/697-checker-string-append/Android.bp test/698-selects/Android.bp test/700-LoadArgRegs/Android.bp test/703-floating-point-div/Android.bp test/704-multiply-accumulate/Android.bp test/705-register-conflict/Android.bp test/707-checker-invalid-profile/Android.bp test/708-jit-cache-churn/Android.bp test/711-checker-type-conversion/Android.bp test/717-integer-value-of/Android.bp test/718-zipfile-finalizer/Android.bp test/720-thread-priority/Android.bp test/721-osr/Android.bp test/726-array-store/Android.bp test/728-imt-conflict-zygote/Android.bp test/805-TooDeepClassInstanceOf/Android.bp test/806-TooWideClassInstanceOf/Android.bp test/812-recursive-default/Android.bp test/813-fp-args/Android.bp test/814-large-field-offsets/Android.bp test/815-invokeinterface-default/Android.bp test/818-clinit-nterp/Android.bp test/900-hello-plugin/Android.bp test/901-hello-ti-agent/Android.bp test/902-hello-transformation/Android.bp test/903-hello-tagging/Android.bp test/904-object-allocation/Android.bp test/905-object-free/Android.bp test/906-iterate-heap/Android.bp test/907-get-loaded-classes/Android.bp test/908-gc-start-finish/Android.bp test/910-methods/Android.bp test/911-get-stack-trace/Android.bp test/913-heaps/Android.bp test/914-hello-obsolescence/Android.bp test/915-obsolete-2/Android.bp test/916-obsolete-jit/Android.bp test/917-fields-transformation/Android.bp test/918-fields/Android.bp test/919-obsolete-fields/Android.bp test/920-objects/Android.bp test/921-hello-failure/Android.bp test/922-properties/Android.bp test/923-monitors/Android.bp test/924-threads/Android.bp test/925-threadgroups/Android.bp test/926-multi-obsolescence/Android.bp test/927-timers/Android.bp test/928-jni-table/Android.bp test/930-hello-retransform/Android.bp test/931-agent-thread/Android.bp test/932-transform-saves/Android.bp test/933-misc-events/Android.bp test/937-hello-retransform-package/Android.bp test/939-hello-transformation-bcp/Android.bp test/940-recursive-obsolete/Android.bp test/941-recursive-obsolete-jit/Android.bp test/942-private-recursive/Android.bp test/943-private-recursive-jit/Android.bp test/944-transform-classloaders/Android.bp test/945-obsolete-native/Android.bp test/946-obsolete-throw/Android.bp test/947-reflect-method/Android.bp test/949-in-memory-transform/Android.bp test/950-redefine-intrinsic/Android.bp test/951-threaded-obsolete/Android.bp test/963-default-range-smali/Android.bp test/982-ok-no-retransform/Android.bp test/983-source-transform-verify/Android.bp test/984-obsolete-invoke/Android.bp test/985-re-obsolete/Android.bp test/986-native-method-bind/Android.bp test/987-agent-bind/Android.bp test/988-method-trace/Android.bp test/989-method-trace-throw/Android.bp test/990-field-trace/Android.bp test/991-field-trace-2/Android.bp test/992-source-data/Android.bp test/993-breakpoints/Android.bp test/994-breakpoint-line/Android.bp test/995-breakpoints-throw/Android.bp test/996-breakpoint-obsolete/Android.bp test/997-single-step/Android.bp test/Android.bp tools/Android.bp tools/ahat/Android.bp tools/ahat/Android.mk tools/art_verifier/Android.bp tools/cpp-define-generator/Android.bp tools/dexanalyze/Android.bp tools/dexfuzz/Android.bp tools/dmtracedump/Android.bp tools/hiddenapi/Android.bp tools/jfuzz/Android.bp tools/jvmti-agents/breakpoint-logger/Android.bp tools/jvmti-agents/chain-agents/Android.bp tools/jvmti-agents/dump-jvmti-state/Android.bp tools/jvmti-agents/enable-vlog/Android.bp tools/jvmti-agents/field-counts/Android.bp tools/jvmti-agents/field-null-percent/Android.bp tools/jvmti-agents/jit-load/Android.bp tools/jvmti-agents/list-extensions/Android.bp tools/jvmti-agents/simple-force-redefine/Android.bp tools/jvmti-agents/simple-profile/Android.bp tools/jvmti-agents/ti-alloc-sample/Android.bp tools/jvmti-agents/ti-fast/Android.bp tools/jvmti-agents/titrace/Android.bp tools/jvmti-agents/wrapagentproperties/Android.bp tools/signal_dumper/Android.bp tools/tracefast-plugin/Android.bp tools/veridex/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to: sigchainlib/Android.bp Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-GPL-2.0 to: Android.bp Android.mk Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-GPL-with-classpath-exception to: dt_fd_forward/Android.bp openjdkjvmti/Android.bp Added SPDX-license-identifier-GPL-2.0 SPDX-license-identifier-GPL-with-classpath-exception to: openjdkjvm/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: If775045c12955fa6d72d40ccf2a09beef93d1699 Merged-in: If775045c12955fa6d72d40ccf2a09beef93d1699
2021-02-25Revert "Lazily allocate DexCache arrays."Orion Hodson
This reverts commit 1214319d27e7fb4c4ff00b39799df6f15288098a. Reason for revert: Post-submit fails Bug: b/181097963 Test: TH Change-Id: I9fd21140f1703d0020458b786f48bd39889a9948
2021-02-23Lazily allocate DexCache arrays.David Srbecky
We rarely need the DexCache for compiled code. Delay the allocation in hope we never need it. This reduces DexCache memory usage by ~25% at startup. Test: m test-art-host-gtest Test: test.py -r -b --host Change-Id: I680a59c905c2b821ee954e4b32abd5d24876bd11
2021-02-17Revert "[metrics] Add StatsdBackend"Ulyana Trafimovich
This reverts commit 3d2b93e6acb4e7ac6fc808f17813975f250dbf89. Reason for revert: Breaks ART tests in chroot environment, as the libstatssocket library is not found. The error message is: CANNOT LINK EXECUTABLE "/apex/com.android.art/bin/art/x86/art_libdexfile_tests": library "libstatssocket.so" not found: needed by /apex/com.android.art/lib/libartd.so in namespace com_android_art How to reproduce in AOSP (e.g. on cuttlefish): $ lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd In another terminal, run art gtests on the device: $ unset ART_TEST_ANDROID_ROOT $ unset CUSTOM_TARGET_LINKER $ unset ART_TEST_ANDROID_RUNTIME_ROOT $ unset ART_TEST_ANDROID_TZDATA_ROOT $ $ export ART_TEST_CHROOT=/data/local/art-test-chroot $ export OVERRIDE_TARGET_FLATTEN_APEX=true $ export ANDROID_SERIAL="0.0.0.0:6520" $ $ . ./build/envsetup.sh $ lunch aosp_cf_x86_64_phone-userdebug $ $ art/tools/buildbot-build.sh --target -j72 $ art/tools/buildbot-cleanup-device.sh $ art/tools/buildbot-setup-device.sh $ art/tools/buildbot-sync.sh $ $ export ISA=x86_64 $ art/tools/run-gtests.sh -j8 Bug: 178236337 Test: art gtests in chroot env on aosp_cf_x86_64_phone-userdebug Change-Id: Icbd38792f4d8828c40a53f037cefeebd777172bf
2021-02-16[metrics] Add StatsdBackendEric Holk
Adds a new backend that allows reporting ART's metrics to statsd, where they can then be uploaded to Westworld. Manual Testing Instructions: Run the following commands. m statsd_testdrive adb shell setprop dalvik.vm.extra-opts \ -Xwrite-metrics-to-statsd\\\ \ -Xwrite-metrics-to-log\\\ \ -Xmetrics-reporting-period=10 adb shell stop && adb shell start statsd_testdrive 332 After about a minute, you should see several atoms logged from ART. Bug: 178236337 Test: Manual, see above Change-Id: Ia1c0bbadb0a9790ab44453ad60ca217c0fdb4e1a
2021-02-01[metrics] Move core metrics code to libartbaseEric Holk
We would like to be able to use ART's metrics system in places where we do not have access to the runtime. This CL splits the metrics code into the core implementation of the counters and histograms and the background reporting thread. The reporting thread was the only part that had dependencies on the runtime, so this remains in the runtime. The bulk of the metrics code moves to libartbase so that it can be used in more contexts. Bug: 178099697 Test: m test-art-host-gtest Change-Id: I26a4fe326371686d5857ad49ba98569f5c55f84a
2021-02-01Add a kTypeChecksFailure.Nicolas Geoffray
This is to distinguish between a soft failure due to type checks, or a soft failure due to other reasons. A follow-up CL will start using that information and use the type checks in the vdex file to perform fast verification at runtime. Test: test.py Bug: 176960283 Change-Id: I04bff9ff26033f41e9439d366667a9aec1f339a0
2021-01-29Add ERROR log with JVMTI version explanationAlex Light
We semi-regularly get bugs where people report being unable to get JVMTI on non-debuggable processes running on userdebug/eng devices. This new log line will help anyone who hits this have a better idea of next steps hopefully. The confusion is mostly around assuming that if JVMTI isn't available the attachAgent function will throw and the Agent_OnAttach function will not be called. While this is true for 'user' builds on 'userdebug' and 'eng' we will allow the agent to start but if the processes is not debuggable only kArtTiVersion (0x70010200) jvmtiEnvs can be created. These envs have somewhat looser specifications then the normal jvmtiEnvs and are used to provide best-effort debugger support on userdebug, among other things. Test: manual Bug: 178033907 Change-Id: I03993ae5200e5d308180014f6fedb3d2062c0d77
2021-01-21Revert^4 "[metrics] Add background reporting thread"Eric Holk
This adds a background thread that reports metrics every N seconds, where N is specified by the -Xmetrics-reporting-period command line option. Periodic reporting is disabled by default. This reverts commit 1060838894e34785139b5e3583fbc9edad7fa7f9. Reason for revert: Remove problematic test Test: test/run-test --host 2233-metrics-background-thread Test: adb shell stop && \ adb shell setprop dalvik.vm.extra-opts \ -Xmetrics-reporting-period=30\\\ -Xwrite-metrics-to-log && \ adb shell start && \ adb logcat # observe metrics in log Bug: 170149255 Change-Id: I3d72043bbb1e652728253585aae5486598658d2b
2021-01-15Revert "Revert^2 "[metrics] Add background reporting thread""Nicolas Geoffray
This reverts commit 4c176b9de6c430422395017910633bcb001b2e84. Reason for revert: Test fails on target. Change-Id: Idfef53679cf602c7c10a9cc0ffb16fda583ed78f
2021-01-14Revert^2 "[metrics] Add background reporting thread"Eric Holk
This adds a background thread that reports metrics every N seconds, where N is specified by the -Xmetrics-reporting-period command line option. Periodic reporting is disabled by default. This reverts commit 73366109eec37b75f77f24e6e52832047508b34f. The reason this was previously reverted was due to failures where JVMTI reported an unexpected thread at startup. This change fixes the issue by adding the metrics background reporting thread to the list of allowed threads in ti_thread.cc. Test: test/run-test --host 2233-metrics-background-thread Test: adb shell stop && \ adb shell setprop dalvik.vm.extra-opts \ -Xmetrics-reporting-period=30\\\ -Xwrite-metrics-to-log && \ adb shell start && \ adb logcat # observe metrics in log Change-Id: I5eea4a4551de9cf4672a461c09521ef871063a91
2021-01-13Revert^2 "Add disable/get/set_hidden_api_enforcement_policy extensions"Alex Light
This reverts commit 46d6fc0e16d65468aa259fadf27ddfeef72987b7. The test, 2038, is incompatible with redefine stress due to class redefinition disabling most hidden-api checks. This adds the appropriate skips to knownfailures.json. Reason for revert: Add 2038 to redefine-stress knownfailures.json Test: ./test.py --host --redefine-host Bug: 175329755 Change-Id: I6c8f0f6fc468db85368ecc9fbb2372677b529383
2021-01-12Revert "Add disable/get/set_hidden_api_enforcement_policy extensions"Nicolas Geoffray
This reverts commit c38d94449a0ccfefd396d2e01b571f3e804d9e48. Bug: 175329755 Reason for revert: Fails on redefine-stress Change-Id: Id3b4e504ebfe6b090b06b7f47a3896fe30cdf850
2021-01-11Add disable/get/set_hidden_api_enforcement_policy extensionsAlex Light
Add JVMTI extensions to control the hidden-api enforcement policy. The new extensions com.android.art.misc.{disable,get,set}_hidden_api_enforcement_policy use the int representations defined by ApplicationInfo.java. Users of these APIs should be sure to toggle the hidden-api state temporarily as needed and should avoid turning it off for long periods in order to ensure users can continue to find bugs. Test: ./test.py --host Bug: 175329755 Change-Id: I89848faf6cf53179b713c6ca9f19f1fe8062b739
2020-12-04Remove DexCache arrays from image.David Srbecky
Remove the hashtable storage from the image and allocate it at runtime instead (but keep the DexCache object in the image). For compiled code, we have largely moved to using .bss, so the DexCache just costs us unnecessary extra space and dirty pages. For interpreted code, the hashtables are too small and will be overridden many times over at run-time regardless. The next step will be to make DexCache variable-size so it can adapt to both of the extremes (taking minimal amount of memory for compiled code and avoiding cache evictions in interpreter). Test: test.py --host Change-Id: I9f89e8f19829b812cf85dea1a964259ed8b87f4d
2020-10-23Rename ART release APEX to com.android.art.Martin Stjernholm
Test: Build & boot on AOSP master Test: `m` on AOSP master, flipping PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD between true and false, and check out/target/product/bonito/symbols/apex/com.android.art. 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: Ic4bb8d6f9988ce99bba326b9c635bd3c01ed74ab Merged-In: Ic4bb8d6f9988ce99bba326b9c635bd3c01ed74ab
2020-09-07Move code item to the data pointer and remove code_item_offset.Nicolas Geoffray
This saves 4 bytes on 32bit and 8 bytes on 64bit on ArtMethod. Also update nterp to directly fetch the code item from the data pointer. Test: test.py Bug: 112676029 Change-Id: Ic01f43c7ccf2cbce1ec517478e81362232d36371
2020-07-29A few more inclusive language updates based on newer wordlistOrion Hodson
Based on: https://source.android.com/setup/contribute/respectful-code #inclusivefixit Bug: 161336379 Bug: 161896447 Test: art/test.py --host --64 Change-Id: I7e6362556136ce1a3085fffae7598104fa5bc56a
2020-07-24Update language to comply with Android’s inclusive language guidanceIan Pedowitz
See https://source.android.com/setup/contribute/respectful-code for reference Bug: 161896447 Bug: 161850439 Bug: 161336379 Test: m -j checkbuild cts docs tests Change-Id: I32d869c274a5d9a3dac63221e25874fe685d38c4
2020-07-23Reword some comments to be more inclusiveOrion Hodson
Also corrects a typo s/He/We/. Bug: 161336379 Bug: 161850439 Bug: 161896447 Test: m Change-Id: Ie8e37310eb777b7ee41a13f8894e99795c29a98a
2020-07-22Fix incorrect dex-cache clearing with structural redefinitionAlex Light
We were incorrectly clearing the dex-cache in some cases after structural redefinition. Leaving some entries present that should have been deleted. This could cause subsequently run code to resolve static methods or fields incorrectly. Test: ./test.py --host Bug: 161846143 Change-Id: Idf23fc21f2e396c347861afd070363c509108096
2020-07-20Correctly use handles for JVMTI heap iteration.Alex Light
We were incorrectly using an ObjPtr to store the filter-class in IterateThroughHeap and FollowReferences. This could cause issues if GC was occurring during the early parts of the call. Fix this issues by properly handlerizing the pointer. Test: ./test.py --host Bug: 161574896 Change-Id: I2ed8e3e4b7af8fded69e8d86adf2049e907289e8
2020-07-16Fix ddm.publish_chunk extension to prevent deadlockAlex Light
The ddm.publish_chunk jvmti extension event could could cause deadlocks with the GC. This is not really fixable so instead remove the JNIenv from the event function to prevent the dangerous actions from being performed. Since this is an internal API that isn't really used this should be safe enough. Rename the extension to publish_chunk_safe so users can be notified of new behavior. Also fix the test to stop relying on the buggy behavior. Test: ./test.py Bug: 161207646 Change-Id: Ib67d6607a8f359167069bc65cf5e3adaa70f0fc5
2020-06-24Avoid eating SEGVs when performing on-demand dequickenAlex Light
When using on-demand dequickening we will register SEGV handlers to catch access to the dequickened dex-file. In order to prevent a deadlock we need to be careful about how recursive SEGVs are handled. We initially simply aborted if any occurred. While this is generally correct it can obscure bugs by changing the stack-trace and possibly break some tools which rely on being able to intercept SEGVs. To fix this we will instead just pass-along SEGVs to later handlers when they happen. Test: ./test.py --host Bug: 158737055 Change-Id: Ib5eebff54c2cd00565e5b1619a6794f1543f39e8
2020-06-09Add a new class status for verified with access checks.Nicolas Geoffray
At runtime, we won't run the verifier for those classes, but run with access checks enabled in the interpreter. Bug: 157265232 Test: test.py Change-Id: Ia087c3b6f9fcbd295307333e524945d844ef54dc
2020-06-09Preserve JNI bindings across structural redefinitionAlex Light
We were incorrectly clearing the JNI bindings of native methods on classes which are structurally redefined. This can cause major issues with code which uses JNIEnv::RegisterNatives to setup native methods. This change copies the required information from the old to the new method. Since the RegisterNatives method can be run asynchronously we need to wait until we gain the final SuspendAll to actually read and copy the registration. Test: ./test.py --host Bug: 158476592 Change-Id: Ie8a33234bb852a46e5275502c842553637c8a2c6
2020-05-13Move implementations from class_root.h to -inl.h .Vladimir Marko
Make it possible to include the definition of enum ClassRoot without pulling in a lot of other headers. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Test: aosp_taimen-userdebug boots. Change-Id: Ic90fdd70bfe0c5428a5c9a0d7901ea7e15b03488
2020-05-04Set apex_available propertyJiyong Park
The marked library(ies) were available to the APEXes via the hand-written whitelist in build/soong/apex/apex.go. Trying to remove the whitelist by adding apex_available property to the Android.bp of the libraries. Bug: 150999716 Test: m Merged-In: Ie9a693be10c6c6571c8aa5357500f5d931400593 (cherry picked from commit 0f152391c0458d3d1cce04a11bc92e7234955d6f) Change-Id: Ie9a693be10c6c6571c8aa5357500f5d931400593
2020-04-16Bundle jni_headers with libopenjdkjvmti_headersOrion Hodson
Preparation for removing implicit include paths for jni.h from soong. Bug: 152482542 Test: m checkbuild Change-Id: Ie8218b61c1e394cae2cdbfc468076b86b433f95c
2020-02-25Add new set_verbose_flag_ext JVMTI ExtensionAlex Light
Add a new jvmti extension function "com.android.art.misc.set_verbose_flag_ext" that enables one to set (or disable) verbose logging options using strings with the same format as the '-verbose:' command line flag. Bug: 144947842 Test: atest CtsJvmtiRunTest1982HostTestCases Change-Id: Ideb1663f5cacfacaeab8cc180372ef479dfc5829
2020-02-11Change j.l.r.Field to use ArtField index instead of dexFileIndexAlex Light
Using the dexFileIndex to determine the ArtField a java.lang.reflect.Field object points to requires us to use a dex-cache and to update all existing Field objects if this index changes (for example due to class redefinition). This could be rather slow. This replaces the dex-file index with the index into the declaring class's SFields/IFields arrays where the specified ArtMethod is stored. Bug: 149236640 Test: ./test.py --host Change-Id: I9a7d69903ece0ea94e3b3e93b4c8a872ac4073e8
2020-01-31Replace instrumention id with stack pointers.Nicolas Geoffray
Replace instrumentation ids for instrumentation frames, which are inherently broken (see b/72608560), and use stack addresses instead to properly identify which frames to pop / unwind. Bug: 72608560 Bug: 148166031 Test: ./art/test/testrunner/testrunner.py --trace --debuggable --ndebuggable --optimizing --interpreter --jit --debug --ndebug -j32 Test: run-libjdwp-tests.sh Test: 2011-stack-walk-concurrent-instrument Test: ./art/test/run-test --host --dev --runtime-option -verbose:deopt,plugin --prebuild --compact-dex-level fast --jit --no-relocate --create-runner --runtime-option -Xcheck:jni 1965-get-set-local-primitive-no-tables art/tools/parallel_run.py -j80 /tmp/path/to/runit.sh --out failure.txt Change-Id: I71f6e55b9da608796cd3142b147f7b50bbd292ec
2020-01-30Reland "Set SA_SIGINFO. Rename thread to include perfetto."Florian Mayer
This would work before because sa_handler and sa_sigaction are in a union, so we also assigned sa_handler. Because we do not use any of the arguments passed to the functions, our function is also a valid sa_handler. This reverts commit a8fe58f0512a2147580b798e1cb8308420f8ae99 and updates another use of the old name to fix issues with the original change. Change-Id: I00aebe34438f7905f9b626e92252abbfe949b638
2020-01-29Remove old JDWP implementation from ARTAlex Light
The old 'internal' JDWP implementation hasn't been used for a few releases and it's a lot of code that's barely being tested and is at risk of bit-rot. To simplify the runtime and remove potentially buggy code this removes it. We also needed to rewrite the DdmThreadNotification code since it relied on the suspension functionality from the old debugger and was generally unsafe. Test: ./test.py --host Test: atest --test-mapping cts/tests/jdwp/TEST_MAPPING Test: atest --test-mapping cts/hostsidetests/jdwptunnel/TEST_MAPPING Test: Manual ddms Bug: 119034743 Change-Id: I775f310a009141296b730e4a6c2503506a329481
2020-01-28Ensure IsStructurallyRedefinable takes into account subtypesAlex Light
Structural-redefinition changes the addresses of the ArtFields and ArtMethods of the class being redefined and all of its subclasses. For this reason if there are JNI-ids that are pointers to these anywhere we cannot allow structural redefinition of the class, even if the pointers are for subtypes. Previously we didn't check the redefinability of sub-types so we could incorrectly invalidate jmethod or jfield IDs. Test: ./test.py --host Bug: 148414638 Change-Id: I8fc809a43e16d5e7938b90b00c531573a2edca00
2020-01-21Fix race resulting in UAF in class-define-pausingAlex Light
When we pause class redefinition we use a barrier to make sure that all threads properly exit the ClassDefinitionPauser code so we can destroy it without causing UAF. To do this we need to know how many threads are in ClassDefinitionPauser code. We previously incorrectly only counted threads after they had already suspended and acquired a mutex owned by the Pauser. This means that if the transformation thread managed to finish all work before the loading thread had made it past the mutex the thread would not be counted. This can easily lead to a UAF. To fix this we just need to move the count to before the thread-suspend and perform the release code with all threads suspended. This will ensure that all threads are counted. Bug: 147880227 Test: ./test.py --host Test: ./test/run-test --create-runner --host --prebuild --compact-dex-level fast --optimizing --no-relocate --runtime-option -Xcheck:jni --64 2001-virtual-structural-multithread tools/parallel_run.py Change-Id: I3e76ca29a504259270f8cec5574f5c07b27ed02f
2020-01-14Remove the LogId parameter from libbase's LogMessageTom Cherry
This isn't used by anyone and shouldn't have existed in the first place, so it's being removed. Test: build Change-Id: Ifb0a1180a176291085cab01fd8e267184ea23cf1
2020-01-13Add even more sanity checks to ti_redefine.cc and skipsAlex Light
Add some additional sanity checks so its more obvious if b/147207934 occurs on any other gcs. The issue is that VisitObjects was missing some objects causing assumptions to be broken. Also add blanket skips for all structural redefinition tests to CMS runs. Since VisitObjects is not reliable on CMS we cannot really use the structural redefinition feature there. Test: ./test.py --host Bug: 147207934 Change-Id: I52aa4f3defb352e988f18b5ab494c9f3a028f0e2
2020-01-10Add more logging around array sanity checksAlex Light
We are getting odd failures due to CHECK failures. Add more logging at the failure points to try to get an idea of what is going on. Test: ./test.py --host Bug: 147207934 Change-Id: Icd006ca10908a0e800821a4352d29b6e722473a6
2020-01-09Fix redefinition causing corrupt j.l.r.Field objectsAlex Light
During (non-structural) redefinition we change the dex-field-indexs of all the ArtField's of the class being redefined. These ids are used by the java/lang/reflect/Field class to avoid having to store a pointer to the ArtField. This meant that when a class was redefined any existing j.l.r.Field objects pointing to its fields are rendered invalid, due to the dex_field_index no longer being present on the class. To fix this we simply walk the heap during class redefinition and update any j.l.r.Field objects of the redefined class that we find. Test: ./test.py --host Bug: 147310999 Bug: 147338896 Change-Id: I3b038b4e669f8b7b4e804238248b4d03780ce2ca
2020-01-07Revert^2 "Remove finalizable restriction on structural redefinition"Alex Light
This reverts commit 0b1afb7c63d99c88f90f17770ad94ccb0b0c57d3. Daemon shutdown is known to be somewhat flaky. That seems to be the cause of this failure. Reason for revert: Removed Daemon threads from tests 2006 & 2007. Bug: 134162467 Test: % ./art/test/run-test --create-runner --host --prebuild --compact-dex-level fast --jit --no-relocate --runtime-option -Xcheck:jni --debuggable --runtime-option -Xopaque-jni-ids:true --64 2007 ... Runnable test script written to /tmp/allight/test-230585/runit.sh ... % ./art/tools/parallel_run.py -j80 /tmp/allight/test-230585/runit.sh --out failure.txt Test: ./art/test/run-test --create-runner --host --prebuild --compact-dex-level fast --jit --no-relocate --runtime-option -Xcheck:jni --debuggable --runtime-option -Xopaque-jni-ids:true --64 2006 Change-Id: I392a2936995dd05b08feea36f11b616c1548ae46
2020-01-07Revert "Remove finalizable restriction on structural redefinition"Alex Light
This reverts commit 55d6fa4c352a1fadbd21b8d8e0929833e547b9e5. Bug: 134162467 Test: None, pure revert. Reason for revert: Flaky segvs across multiple configurations. Change-Id: Iaa8ec6cbd2eee141e271cd3a56a1b6be8bbb3a7c
2020-01-07Remove finalizable restriction on structural redefinitionAlex Light
Previously we restricted performing structural redefinition of classes with finalizers. We did this because we need to be careful that finalizers are not run on any obsolete objects and are run on the replaced objects. This fixes these issues and removes the restriction. Note that the objects of classes that were initially non-finalizable and then redefined to be finalize able will never be called. This is (technically) compliant with the spec and avoids issues around safely creating finalizer references. See comment in ti_redefine.cc for more information. Test: ./test.py --host Bug: 134162467 Change-Id: I51d4de3d15833dce989cd1e44c32b0e6a57f063a