summaryrefslogtreecommitdiff
path: root/openjdkjvmti
AgeCommit message (Collapse)Author
2025-03-11Remove memfd_create_compat(). Elliott Hughes
Multiple places were already unconditionally calling memfd_create(), and ART no longer runs tests on fugu (whose ancient kernel didn't have memfd_create()). Change-Id: I8ca96d75a9e6f4fe5395b210f60d9920808bb26c
2025-02-25Disable -Wcast-function-type-mismatch Aditya Kumar
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
2025-02-17Refactor `ArtMethod` entrypoint initialization. Vladimir Marko
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
2025-02-07Remove cdex support from `ArtMethod`... Vladimir Marko
... and a few other places in `runtime/`. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 325430813 Change-Id: Ied837bffed78b1fe4c4d381772b8c1933b76f6c0
2025-01-16Merge sFields and iFields. Nicolas Geoffray
Test: test.py Change-Id: Ib97fca637a8866a41a4389b150c6000d9fb6d99b
2024-12-17Document and fix thread flags memory ordering Hans Boehm
Expand mutator_gc_coord.md with a discussion of memory ordering for state and flags accesses. Change ReadFlag() to take a non-defaulted memory order argument. Fix all calls to supply it. The prior memory_order_relaxed default does not make sense, since it is incorrect in a few places. And even when it is correct, the arguments behind that are extremely subtle and vary by call site. We want this to be very explicit and documented. Document ThreadList::RunCheckpoint memory ordering requirements. Document the fact that empty checkpoinst should also satisfy those requirements, but currently do not fully do so. Temporarily strengthen memory ordering to test kEmptyCheckpointRequest to partially work around the above issue. Strengthen some of the loads to test kRunningFlipFunction. We did not always perform an acquire load before concluding that the flip function had completed. Weaken one load in EnsureFlipFunctionStarted for consistency. In a corner case, reload a flag with acquire ordering in the same function. This is the result of a fairly complete pass over the flag setting and reading logic. The empty checkpoint issue still needs to be more completley addressed, most probably by switching empty checkpoints to use the general checkpoint logic. It currently uses an "optimization" that is very difficult, and probably expensive, to fully correct. It is not clear whether we have observed bugs caused by this in the field. Bug: 382722942 Bug: 380159893 Test: Build and boot aosp Test: Checked .md file with lowdown Change-Id: I793eac7ddf80fada36bb4f16ddfaaf317829caa3
2024-12-06Block on concurrent redefinitions instead of returning error Mythri Alle
We don't support concurrent redefinitions. We return an error if there is already a redefinition in progress. This isn't strictly according to the spec. This CL changes it to block on concurrent redefinition requests. Bug: 376717110 Test: art/test.py Change-Id: I0f981392f3f66e2310e7efd12ef82dfba7c49a23
2024-11-13Explicitly use implementations where necessary for modules in the same apex Colin Cross
The logic that magically determines whether to use stubs or implementations for modules in the same apex is being removed to simplify the Soong logic and make the build system easier to understand. Explicitly use libdexfile#impl for modules in the art apex that need the implementation APIs. Bug: 372543712 Test: builds Flag: EXEMPT refactor Change-Id: I916d54fc558d6030bcb3b0586eb0f11a41a24c42
2024-11-11Avoid `strlen()` for `ClassLinker::FindClass()`... Vladimir Marko
... and related functions in most cases. Note that the `CompilerDriver` previously resolved the `ClassLoader` and `TransactionAbortError` using the provided class loaders. We're now using the `ClassLoader` from the class roots and resolving the `TransactionAbortError` in the BCP class loader. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 181943478 Bug: 338123769 Change-Id: I38e480cdcdb8bf02c958e4d0773437f5766f6be0
2024-11-05Use `std::string_view` for `ClassTable` operations. Vladimir Marko
Use `std::string_view` instead of `const char*` descriptor. This uses faster `memcmp` instead of the slower`strcmp` for descriptor comparison. Note that the `ScopedTrace` passes `const char*` across the `libartpalette` boundary, so we cannot easily replace the `const char* descriptor` with `std::string_view descriptor` in certain `ClassLinker` functions because we actually need to pass a null-terminated string and the `string_view` API does not technically guarantee null-terminated data. Therefore we resort to explicitly passing around the descriptor and its length as separate arguments. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 181943478 Bug: 338123769 Change-Id: Ie3fa251390acc582c54b4686d18696eb89b32361
2024-10-29Reland "verifier: Cache types by type index." Vladimír Marko
This reverts commit de7910029c3400a11070e818ae1463614c302a16. Reason for revert: Relanding with a fix - keep forced class resolution in `MethodVerifier<>::ResolveClass<>()`. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing --jit-on-first-use Bug: 181943478 Change-Id: Ibdf8b5515ca6c3e4106e1a09700ca65565ce36bb
2024-10-25Revert "verifier: Cache types by type index." Vladimír Marko
This reverts commit 38e9b0c97323368a5b3edd1cb24ab9a5fb38e06d. Reason for revert: Broke the "612-jit-dex-cache" test in "jit-on-first-use" configuration. Bug: 181943478 Change-Id: I2a67f49905565606f75532682d5138faa8f3960e
2024-10-25verifier: Cache types by type index. Vladimir Marko
Speed up `RegType` lookup in `RegTypeCache` by adding a cache based on `dex::TypeIndex` for types referenced by the current dex file. This slows down the construction of the `RegTypeCache` but the benefits of faster lookup outweigh the slower construction now that we're constructing the `RegTypeCache` only once per class and not once per method. Remove the `MethodParamListDescriptorIterator` as it was providing only descriptors from the resolved method's dex file and we can get the same descriptors from the current dex file based on the invoke's `dex::ProtoIndex`. This also allows using the new `TypeIndex`-based cache for this work. Clean up the `RegTypeCache` interface by inlining functions `FindClass()` and `InsertClass()` to the only remaining user `FromClass()` and update tests to use `FromClass()` instead. Move the descriptor retrieval from callers to `FromClass()`. Avoid some unnecessary string copy with `AddString()` in `RegTypeCache::FromClass()`. Add a TODO comment to avoid the string copy in `RegTypeCache::From()`. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 181943478 Change-Id: Iea429a33983104165c2ad2cf108d2b7d88f8b9e7
2024-10-17Share `RegTypeCache` for all methods in a `Class`. Vladimir Marko
Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 181943478 Change-Id: Ic5e2ad1a83a9013a428b51ef39641d8a1f34cee9
2024-09-30Revert^5 "Object.clone() allocates more movable objects" Nicolas Geoffray
This reverts commit ea269f69d05fe333e4b36634b925c3c40fc8ce95. Bug: 355291033 Bug: 354087169 Bug: 360363656 Bug: 361327909 Bug: 364629185 Reason for revert: Failure on asan: +addressOf succeeded on movable object +Unexpectedly got 0 address in checkMovable Change-Id: I1f27845bf3fb7a1542f24b943d999f2d4da5e23a
2024-09-26Revert^4 "Object.clone() allocates more movable objects" Hans Boehm
This reverts commit fc0ed57a5f25d8a7b3fbf200224bd880ed05eff5. PS1 is identical to aosp/3231043 PS2 adds 2280-address-of test, re-allows non-movable objects to be allocated in LOS, and more generally tracks non-movable objects in other spaces. PS3 Style tweak PS4 Disable test on jvm Bug: 355291033 Bug: 354087169 Bug: 360363656 Bug: 361327909 Bug: 364629185 Test: Build and boot AOSP Test: testrunner.py --host -b --all-gc -t 2280-address-of Change-Id: I4b2929c353a6ede916762de509056817f001d6f8
2024-09-03Revert^3 "Object.clone() allocates more movable objects" Pechetty Sravani (xWF)
This reverts commit 1956542906d0b128a86975af009ba4601d02129a. Reason for revert: Droid Monitor created revert due to this b/363849521. Change-Id: Ic56e46bc11b1fd696b82f29782a1d1735ee805a9
2024-08-30Revert^2 "Object.clone() allocates more movable objects" Hans Boehm
This reverts commit 7c89f49c2c542df1a5780fb851e2ef0e0909f48f. PS1 is identical to aosp/3200711. PS2 revises the approach a bit by continuing to allocate non-movable objects in LargeObjectsSpace, but tracking them explicitly in a renamed, and now lock-protected, data structure stray_non_movable_objects_, which explicitly tracks nonmovable objects in both zygote and large objects spaces. This was done after discovering that there are applications that allocate more than 64MB of mostly large DirectByteBuffers. Also modifies 070-nio-buffer to check that we can allocate lots of direct ByteBuffers. PS3-PS5 have minor tweaks (comments and slight code simplification). Bug: 355291033 Bug: 354087169 Bug: 360363656 Bug: 361327909 Test: Build and boot AOSP Test: testrunner.py --host -b --all-gc -t 070-nio-buffer Change-Id: Ia6948c516b30188934a644a3f8f788914dfabb2a
2024-08-19Revert "Object.clone() allocates more movable objects" Hans Boehm
This reverts commit a5001fed23788c966fd87048d7f17ba8c0b51914. Reason for revert: b/360363656 Change-Id: Ibfea46976bb6434d728c69160edb5904ab7708aa
2024-08-14Object.clone() allocates more movable objects Hans Boehm
Make Object.clone() allocate an unmovable object only if the original was specifically allocated as nonmovable. Or at least get much closer to that. In the process, we stop allocated nonmovable objects in LargeObjectsSpace, so that we can better identifty them. Objects in image space cannot have been allocated as nonmovable: newNonMovableArray() involves JNI call, and this will cause a transaction failure. This is good, since the act of including the object in an ImageSpace would move it. The ZygoteSpace is allocated by copying objects into nonmoving space. To avoid having clone() treat the whole ZygoteSpace as nonmovable, we explicitly remember the non-class objects that were already there. Currently we use a std::set data structure for this. This seems a bit suboptimal; a sorted array may be an improvement. But empirically the set only contains a dozen or two elements for AOSP. We do implicitly allocate classes using the nonnmoving allocator. But those cannot be cloned. Thus we do not bother tracking them. For Array::CopyOf, we DCHECK that the argument was movable, and fix one of the callers to fail in a more appropriate way if we would otherwise violate that. Prevent jvmti from resizing a nonmovable array. I don't think anything good could have come of that anyway. This should prevent us from creating unrequested nonmovable objects, except as a result of the CC collector using that as a backup when it otherwise runs out of space during copying. Rename IsMovableObject() to somewhat clarify that it queries an implementation property, where IsNonMovable() is a query about intended object semantics, NOT implementation artifacts. Various drive-by documentation fixes for issues I encountered while trying to understand the code. Bug: 355291033 Bug: 354087169 Test: Build and boot AOSP Change-Id: Ia24dd1c2623d3d588c397332f87be45cc0f4bf27
2024-08-08Use variable sized ref-offset bitmap for fast VisitReferences() Lokesh Gidra
Bug: 304325190 Test: art/test/testrunner/testrunner.py --host Change-Id: I6e25143b827acaa12ff5bd94e6196faaed461f4a
2024-06-14Use C++20 `string{,_view}::{starts,ends}_with()`, part 2. Vladimir Marko
Replace uses of `android::base::{Starts,Ends}With()`. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I80a0ca93f433464270989d248dd999e9366a1c17
2024-05-21Reland^3 "Revamp JIT GC." Nicolas Geoffray
This reverts commit b3d88b3f4b47b7635cbdab54dfdcbf866b9813ff. Reason for revert: Do an atomic exchange when updating an entrypoint. Change-Id: Idff00e87c2ef57d870975f7c63c06c672fd3279e
2024-05-14Faster `DexFile::FindTypeId()`. Vladimir Marko
Work with `std::string_view::compare()` instead of slower `CompareModifiedUtf8ToModifiedUtf8AsUtf16CodePointValues()`. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 338123769 Change-Id: I4c3cc131da457c0a73f83fa2f864491eb2bc7a03
2024-05-14Add `ArtField::GetDeclaringClassDescriptor{,View}()`. Vladimir Marko
And clean up related `ArtField` and `ArtMethod` functions for dex file descriptor and name access. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 338123769 Change-Id: I3bf9c3b6135ea8e6b018ec41c93c847446918169
2024-05-03Revert "Reland^2 "Revamp JIT GC."" Nicolas Geoffray
This reverts commit eac7cd76d9a39a61c7fecbd3c3eb4f2932a3d55c. Reason for revert: Bot failure Change-Id: Ia4632c06ec88cff218d64a8087f762337cabc79e
2024-04-29Reland^2 "Revamp JIT GC." Nicolas Geoffray
This reverts commit 030a225ade89e2eaf34ac0072b6b1f9ac02ddda7. Reason for revert: Prevent zombie code being added in the middle of a JIT GC. Change-Id: I89157e4d4130896665a11a930d87635f4883db79
2024-04-23Set test ownerships for ART. Martin Stjernholm
Test: presubmits Bug: 333696887 Change-Id: Ieb6992ecb0a2489697ffa176dabc25626050cd48
2024-04-22Revert "Reland "Revamp JIT GC."" Nicolas Geoffray
This reverts commit 16567ac3d6925c0b84c819f2e475c2cadbde5dc3. Reason for revert: Flakes on bots. Change-Id: Ibfc5280132425318c1669e04c77822a95f62bacd
2024-04-18Reland "Revamp JIT GC." Nicolas Geoffray
This reverts commit de8e6689cb3f829b73e921d843cfa38bbfe996bf. Reason for revert: - Adjust test for new behavior - Enter MarkCompiledCodeOnThreadStacks with the mutator lock, as expected by the checkpoint. Change-Id: Ic9fca3e5fd04da62081701f4deccbc68bee56c2f
2024-04-17Revert "Revamp JIT GC." Nicolas Geoffray
This reverts commit f9bde507475075b52e5b1a5665c0fde9aa9215c6. Reason for revert: Bot failures. Change-Id: Ic689cf199f3bdd15c7358daa311bc0d90e9a2d7d
2024-04-15Revamp JIT GC. Nicolas Geoffray
Run it after a threshold of compiled code that entered zombie state, ie are not entrypoints anymore. Tet: test.py Change-Id: Ifbccda5881be6cf3e11d6772d4c4f64b3e9db698
2024-04-12Fix NameAndSignature::operator== ambiguity Ryan Prichard
Be consistent with other places in the file and define both operator== and operator!=. Both should be const methods. art/openjdkjvmti/ti_redefine.cc:964:32: error: ISO C++20 considers use of overloaded operator '==' (with operand types 'MethodNameAndSignature' (aka 'NameAndSignature<art::ArtMethod>') and 'MethodNameAndSignature') to be ambiguous despite there being a unique best viable function [-Werror,-Wambiguous-reversed-operator] 964 | return old_method_id == new_method_id; | ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~ art/openjdkjvmti/ti_redefine.cc:882:8: note: ambiguity is between a regular call to this operator and a call with the argument order reversed 882 | bool operator==(const NameAndSignature<T>& o) { | ^ art/openjdkjvmti/ti_redefine.cc:882:8: note: mark 'operator==' as const or add a matching 'operator!=' to resolve the ambiguity Bug: 311052584 Test: remove cpp_std override and build Android Change-Id: I3fc4ab14b0a3ccfc2d58bdbd7442e87b478b705d
2024-04-11Clean up string data access in `DexFile`. Vladimir Marko
The `*ByIdx()` and `*ByTypeIdx()` functions were doing validity checks that were needed only for processing the debug data, so move the checks to these callers. Replace these functions with new overloads of other functions to provide consistent naming. In a few cases, rewrite calls to these functions to fetch and work with a `string_view` instead. Rename `GetStringLength()` to `GetStringUtf16Length()` and change its return type to `uint32_t`. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I561899606f6e5ec5f23aa4be617349dacdb376e3
2024-03-26Rename enums.h/.cc to pointer_size.h/.cc. Santiago Aboy Solanes
It was the only enum in the file Bug: 329378408 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: If0e385324afa3685f648135ba9b60e6bc79ba0ed
2024-03-16Do not handle suspension request in StartGC Hans Boehm
Switching back to kRunnable state while appearing to be running a collection can lead to deadlock. Don't do that. Unfortunately, StartGC is one of several functions in this area that can be called with or without the mutator lock, complicating matters. We implement this by adding a ThreadState value, so we don't need two clones of TransitionFromRunnableToSuspended. This required trivial updates to various unrelated switch statements to handle the new case. Add some checking for kSuspensionImmune abuses. (An earlier attempt tried to use that here.) Bug: 304929145 Test: Treehugger Change-Id: Id5e16fef3255ff243c4e7e306762ababd8cf2f70
2024-03-14Make sure there are no lone UNREACHABLEs Santiago Aboy Solanes
Either remove them, or add a LOG(FATAL) before them. Bug: 328756212 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Test: m test-art-host-gtest Change-Id: Ibf2bddb0a4add5a844a515a040b3751acc7faf84
2024-02-09Pass functors as rvalues when possible Santiago Aboy Solanes
On local compiles I saw that DeleteAllImpureWhich was the third most time consuming method, using pprofs sorting in bottom-up. By passing the functor it uses as rvalue, the method speeds up ~10% and it drops from the third most time consuming to the fourth. The other modified methods in the CL are not showing up in the pprof profile that I took, but changing them to use rvalues shouldn't affect them negatively. Test: Locally compile, take a trace, and observe time spent Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I6c363d5601fd4865f4e7881e64b883bd6bbedb69
2024-01-19Move files related to compiled code into oat/ directory Dmitrii Ishcheikin
Test: art/test.py -b --host Change-Id: Icedd3a82c6bca5147c3bc9dc50de5a729003d66f
2023-12-20Revert^18 "Thread suspension cleanup and deadlock fix" Hans Boehm
This reverts commit 8bc6a58df7046b4d6f4b51eb274c7e60fea396ff. PS1 is identical to https://android-review.git.corp.google.com/c/platform/art/+/2746640 PS2 makes the following changes: - Remove one DCHECK each from the two WaitForFlipFunction variants. The DCHECK could fail if another GC was started in the interim. - Break up the WaitForSuspendBarrier timeout into shorter ones. so we don't time out as easily if our process is frozen. - Include the thread name for ThreadSuspendByThreadIdWarning, since we don't get complete tombstones for some failures. Test: Treehugger, host tests. Bug: 240742796 Bug: 203363895 Bug: 238032384 Bug: 253671779 Bug: 276660630 Bug: 295880862 Bug: 294334417 Bug: 301090887 Bug: 313347640 (and more) Change-Id: I12c5c01b1e006baab4ee4148aadbc721723fb89e
2023-12-19Revert^17 "Thread suspension cleanup and deadlock fix" Hans Boehm
This reverts commit c6371b52df0da31acc174a3526274417b7aac0a7. Reason for revert: This seems to have two remaining issues: 1. The second DCHECK in WaitForFlipFunction is not completely guaranteed to hold, resulting in failures for 658-fp-read-barrier. 2. WaitForSuspendBarrier seems to time out occasionally, possibly spuriously so. We fail when the futex times out once. That's probably incompatible with the app freezer. We should retry a few times. Change-Id: Ibd8909b31083fc29e6d4f1fcde003d08eb16fc0a
2023-12-19Revert^16 "Thread suspension cleanup and deadlock fix" Hans Boehm
This reverts commit a43e67ea1a314e5c6faf77457ffc5ea39c24d4ca. PS1 is identical to aosp/2725875 . PS2 improves static and dynamic lock checking and makes the documentation more precise. ThreadList::Unregister for a thread that wasn't registered becomes fatal; I can't convince myself that any reasonable recovery is possible, and we could otherwise turn an obvious error into a very subtle and potentially dangerous one. Perhaps controversially, we now REQUIRE thread_list_lock_ for IncrementSuspendCount, eventhough that requires a kludge in the one case in which we legitimately don't have it. But after thinking about it, the extra checking and documentation outweighs the kludge, and we may want to consider this elsewhere as well. Added FakeMutexLock to enable the kludge here and elsewhere. PS3 adds some documentation for thread lifetime rules and enforces a sufficient, though in some cases overly strong, set of related restrictions for EnsureFlipFunctionStarted. It ensures that callers conform to this stronger restriction. This required a simplification in StackUtil::GetThreadListStackTraces. PS4 Fix lint issue. Add Thread lifetime DCHECK to WaitForFlipFunction. Rebase to adjust for the fact that aosp/2813551 effectively merged a small piece of this. PS5 Add Thread::VerifyState(). We previouslly checked for kTerminated in a couple of places. That doesn't make sense, since we have no way to tell whether the thread has been deallocated and reallocated at that point. Instead of checking that the state is not kTerminated, just check that it is a sane value. Address some old reviewer comments. Add more output for EnsureFlipFunctionStarted DCHECK. RequestSynchronousCheckpoint now aborts rather than returning false when invoked on a terminated thread. Seeing kTerminated would mean the thread could have been destroyed, and thus this call was unsafe. PS6 Add another VerifyState call to RequestSynchronousCheckpoint. PS7 Rebase and add more ThreadExitFlag tests. PS8 Rebase. Temporary workaround for compile error. PS9 Remove PS8 workaround. Add a version of GetPeerFromOtherThread that expects thread_list_lock_ to be initially held, and relies on ThreadExitFlag to detect terminated threads. Modify several jvmti clients to use this correctly. This effectively includes a fixed version of aosp/2847246. PS10 Work around the fact that GetReferenceKind in ti_heap.cc may call GetPeerFromOtherThread with or without thread_list_lock_. I think this is kind of benign, though it makes reasoning harder, and weakens our debug checking. PS11 Remove extra semicolon. PS12 Add another DCHECK in UnregisterThreadExitFlag. PS13 Minor tweaks to address reviewer comments. PS14 More tweaks to address reviewer comments. PS15 Do not report that a thread exited while its flip-function is still running. PS16 Fix comment typo. Test: Treehugger Bug: 240742796 Bug: 203363895 Bug: 238032384 Bug: 253671779 Bug: 276660630 Bug: 295880862 Bug: 294334417 Bug: 301090887 Bug: 313347640 (and more) Change-Id: I44caa30a0a4da8ab105fedd4d2238f59efc1d675
2023-11-27Revert "Don't call GetPeerFromOtherThread with thread_list_lock_ held" Lokesh Gidra
This reverts commit 2c4bfa20cfd4ea556a5a94f942ced5d2ccfe1c06. Reason for revert: b/313347640 Change-Id: I055f1a868c9fe6a74278670e075c2e2aa3e82d2b
2023-11-22Remove a warning from redefinition that isn't very useful Mythri Alle
We used to warn when there are multiple class definitions in a original dex file. If we are retransforming and the retransformer doesn't apply any transformations, then we won't be able to handle it and the warning was just saying that. However, we do have a check after retransformations have been applied to check if we have only one class definition and return an error otherwise. So the warning we are logging even before retransformation hooks are called is not very useful. Bug: 259709234 Test: art/test.py Change-Id: I38b8a20552f887465224da8b9dea926f3b25cc78
2023-11-17Revert^2 "Add support for dex containers (DEX v41)." David Srbecky
This reverts commit a3b8c73d8ae9943c8aaabf49349302b4c05cea71. Reason for revert: Reland Test: ./art/test.py -b --host --optimizing --64 Test: device boots with container dex enabled for framework Test: tests pass with compax dex re-enabled Change-Id: I100a796f5105c351a531a45dcbea8b0245f598a8
2023-11-16Rename a couple of methods related to redefinition for readability Mythri Alle
TransformClasses is a method to actually redefine the method and TransformClassesDirect is a method to call ClassFileLoadHooks which is confusing. So rename TransformClassesDirect to CallClassFileLoadHooks and also add some comments Also rename GetRedefinitionError to CanRedefineClass. Test: art/test.py Change-Id: Ie04927f1aae2880d87bcb9bb19b5f3971911fd43
2023-11-16Remove an unused jvmti extension and associated code Mythri Alle
com.android.art.UNSAFE.class.structurally_redefine_class_direct was added as a temporary entrypoint for testing. It is no longer used. Test: art/test.py Change-Id: Iead2248a4e2d105b39eeb2c8114bfbafe8b56391
2023-11-15Don't call GetPeerFromOtherThread with thread_list_lock_ held Lokesh Gidra
GetPeerFromOtherThread() may call EnsureFlipFunctionStarted(), which expects thread_list_lock_ to be not acquired. Test: art/test/testrunner/testrunner.py --host Change-Id: Ic19df7aa553a95818f81a265f721baddec90af47
2023-11-15Revert "Add support for dex containers (DEX v41)." David Srbecky
This reverts commit 854b363b284592d0bbfdbe31eb487fa64a4b9471. Reason for revert: PlayStore Scanner failures Change-Id: I7807aba1bfe1f662129f90c870c82427ca6d121f
2023-11-14Revert "Turn off LTO for libopenjdkjvmti" Santiago Aboy Solanes
This reverts commit 53472ff9f59c6e6d1494fe767b9137794b8d5f0f. Reason for revert: ThinLTO bugs are fixed Bug: 291054002 Change-Id: Ib440b21bbff9a35c846b7592ef63e8e68ffcd450