diff options
author | 2023-10-17 19:15:23 +0000 | |
---|---|---|
committer | 2023-10-17 21:32:14 +0000 | |
commit | 9faffd5c4e062ca45bd6f29a3b6d1b276e6c9839 (patch) | |
tree | 2c49f685bbe21597b707587859f2bae1f1f92495 /runtime/class_table-inl.h | |
parent | 66b2595485bdc2a9fbadd7a1058f9c9fd0a0cc37 (diff) |
Revert "Update class-table and intern-table concurrently with uffd GC"
This reverts commit 97a6f7cd191cde0abaaf6323ae2f67d8e42a1236.
Reason for revert: LUCI failure in libcore test
Change-Id: I381b261ae0f67103bf1d096d8f64c84ba3f3e19c
Diffstat (limited to 'runtime/class_table-inl.h')
-rw-r--r-- | runtime/class_table-inl.h | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/runtime/class_table-inl.h b/runtime/class_table-inl.h index 4ee59a79f7..ecc8a0a620 100644 --- a/runtime/class_table-inl.h +++ b/runtime/class_table-inl.h @@ -68,14 +68,12 @@ inline bool ClassTable::ClassDescriptorEquals::operator()(const TableSlot& a, return a.Read<kWithoutReadBarrier>()->DescriptorEquals(b.first); } -template <class Visitor> -void ClassTable::VisitRoots(Visitor& visitor, bool skip_classes) { +template<class Visitor> +void ClassTable::VisitRoots(Visitor& visitor) { ReaderMutexLock mu(Thread::Current(), lock_); - if (!skip_classes) { - for (ClassSet& class_set : classes_) { - for (TableSlot& table_slot : class_set) { - table_slot.VisitRoot(visitor); - } + for (ClassSet& class_set : classes_) { + for (TableSlot& table_slot : class_set) { + table_slot.VisitRoot(visitor); } } for (GcRoot<mirror::Object>& root : strong_roots_) { @@ -88,14 +86,12 @@ void ClassTable::VisitRoots(Visitor& visitor, bool skip_classes) { } } -template <class Visitor> -void ClassTable::VisitRoots(const Visitor& visitor, bool skip_classes) { +template<class Visitor> +void ClassTable::VisitRoots(const Visitor& visitor) { ReaderMutexLock mu(Thread::Current(), lock_); - if (!skip_classes) { - for (ClassSet& class_set : classes_) { - for (TableSlot& table_slot : class_set) { - table_slot.VisitRoot(visitor); - } + for (ClassSet& class_set : classes_) { + for (TableSlot& table_slot : class_set) { + table_slot.VisitRoot(visitor); } } for (GcRoot<mirror::Object>& root : strong_roots_) { @@ -108,18 +104,6 @@ void ClassTable::VisitRoots(const Visitor& visitor, bool skip_classes) { } } -template <class Condition, class Visitor> -void ClassTable::VisitClassesIfConditionMet(Condition& cond, Visitor& visitor) { - ReaderMutexLock mu(Thread::Current(), lock_); - for (ClassSet& class_set : classes_) { - if (cond(class_set)) { - for (TableSlot& table_slot : class_set) { - table_slot.VisitRoot(visitor); - } - } - } -} - template <typename Visitor> class ClassTable::TableSlot::ClassAndRootVisitor { public: |