diff options
author | 2024-11-05 14:33:29 +0000 | |
---|---|---|
committer | 2024-11-11 08:33:23 +0000 | |
commit | 01df4b3a9bb31f21f451452f0ce47632dd8916ad (patch) | |
tree | 2414f41e33f7c1ec468ea7c6f141267a6387d537 /runtime/common_runtime_test.h | |
parent | 8a2ca0019489d3e1c5a79789af68fb05822af9cb (diff) |
Avoid `strlen()` for `ClassLinker::FindClass()`...
... 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
Diffstat (limited to 'runtime/common_runtime_test.h')
-rw-r--r-- | runtime/common_runtime_test.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/common_runtime_test.h b/runtime/common_runtime_test.h index 5416cb493c..7c20de30fd 100644 --- a/runtime/common_runtime_test.h +++ b/runtime/common_runtime_test.h @@ -190,6 +190,10 @@ class CommonRuntimeTestImpl : public CommonArtTestImpl { dexes, out_file, method_frequency, type_frequency, /*for_boot_image=*/ true); } + ObjPtr<mirror::Class> FindClass(const char* descriptor, + Handle<mirror::ClassLoader> class_loader) const + REQUIRES_SHARED(Locks::mutator_lock_); + std::unique_ptr<Runtime> runtime_; // The class_linker_, java_lang_dex_file_, and boot_class_path_ are all @@ -202,7 +206,7 @@ class CommonRuntimeTestImpl : public CommonArtTestImpl { // This only looks into the current class loader and does not recurse into the parents. std::vector<const DexFile*> GetDexFiles(jobject jclass_loader); std::vector<const DexFile*> GetDexFiles(Thread* self, Handle<mirror::ClassLoader> class_loader) - REQUIRES_SHARED(Locks::mutator_lock_); + REQUIRES_SHARED(Locks::mutator_lock_); // Get the first dex file from a PathClassLoader. Will abort if it is null. const DexFile* GetFirstDexFile(jobject jclass_loader); |