Home
last modified time | relevance | path

Searched refs:ref (Results 1 – 25 of 223) sorted by relevance

123456789

/art/runtime/
Dread_barrier-inl.h55 MirrorType* ref = ref_addr->template AsMirrorPtr<kIsVolatile>(); in Barrier() local
56 MirrorType* old_ref = ref; in Barrier()
59 ref = reinterpret_cast<MirrorType*>(Mark(ref)); in Barrier()
62 if (kAlwaysUpdateField && ref != old_ref) { in Barrier()
65 ref, in Barrier()
70 AssertToSpaceInvariant(obj, offset, ref); in Barrier()
71 return ref; in Barrier()
73 MirrorType* ref = ref_addr->template AsMirrorPtr<kIsVolatile>(); in Barrier() local
74 MirrorType* old_ref = ref; in Barrier()
78 ref = reinterpret_cast<MirrorType*>(Mark(old_ref)); in Barrier()
[all …]
Dgc_root-inl.h37 inline GcRoot<MirrorType>::GcRoot(mirror::CompressedReference<mirror::Object> ref) in GcRoot() argument
38 : root_(ref) { } in GcRoot()
41 inline GcRoot<MirrorType>::GcRoot(MirrorType* ref) in GcRoot() argument
42 : GcRoot(mirror::CompressedReference<mirror::Object>::FromMirrorPtr(ref)) { } in GcRoot()
45 inline GcRoot<MirrorType>::GcRoot(ObjPtr<MirrorType> ref) in GcRoot() argument
46 : GcRoot(ref.Ptr()) { } in GcRoot()
Dreference_table.cc173 ObjPtr<mirror::Object> ref = entries[idx].Read(); in Dump() local
174 if (ref == nullptr) { in Dump()
177 if (runtime->IsClearedJniWeakGlobal(ref)) { in Dump()
181 if (ref->GetClass() == nullptr) { in Dump()
183 size_t size = ref->SizeOf(); in Dump()
184 os << StringPrintf(" %5d: %p (raw) (%zd bytes)\n", idx, ref.Ptr(), size); in Dump()
188 std::string className(ref->PrettyTypeOf()); in Dump()
191 size_t element_count = GetElementCount(ref); in Dump()
194 } else if (ref->GetClass()->IsStringClass()) { in Dump()
195 ObjPtr<mirror::String> s = ref->AsString(); in Dump()
[all …]
Dcompiler_callbacks.h51 virtual void AddUncompilableMethod(MethodReference ref) = 0;
52 virtual void AddUncompilableClass(ClassReference ref) = 0;
53 virtual void ClassRejected(ClassReference ref) = 0;
60 virtual ClassStatus GetPreviousClassState([[maybe_unused]] ClassReference ref) { in GetPreviousClassState() argument
71 virtual void UpdateClassState([[maybe_unused]] ClassReference ref, in UpdateClassState() argument
Dread_barrier.h76 ALWAYS_INLINE static MirrorType* IsMarked(MirrorType* ref)
82 static void AssertToSpaceInvariant(mirror::Object* ref) in AssertToSpaceInvariant() argument
84 AssertToSpaceInvariant(nullptr, MemberOffset(0), ref); in AssertToSpaceInvariant()
88 mirror::Object* ref)
91 static void AssertToSpaceInvariant(GcRootSource* gc_root_source, mirror::Object* ref)
95 static void MaybeAssertToSpaceInvariant(mirror::Object* ref) in MaybeAssertToSpaceInvariant() argument
98 AssertToSpaceInvariant(ref); in MaybeAssertToSpaceInvariant()
/art/runtime/gc/
Dreference_queue.cc34 void ReferenceQueue::AtomicEnqueueIfNotEnqueued(Thread* self, ObjPtr<mirror::Reference> ref) { in AtomicEnqueueIfNotEnqueued() argument
35 DCHECK(ref != nullptr); in AtomicEnqueueIfNotEnqueued()
37 if (ref->IsUnprocessed()) { in AtomicEnqueueIfNotEnqueued()
38 EnqueueReference(ref); in AtomicEnqueueIfNotEnqueued()
42 void ReferenceQueue::EnqueueReference(ObjPtr<mirror::Reference> ref) { in EnqueueReference() argument
43 DCHECK(ref != nullptr); in EnqueueReference()
44 CHECK(ref->IsUnprocessed()); in EnqueueReference()
47 list_ = ref.Ptr(); in EnqueueReference()
53 ref->SetPendingNext(head); in EnqueueReference()
56 list_->SetPendingNext(ref); in EnqueueReference()
[all …]
/art/libartbase/base/
Dintrusive_forward_list_test.cc169 std::forward_list<int> ref({ 1, 2, 7 }); in ConstructRange() local
170 std::vector<ValueType> storage(ref.begin(), ref.end()); in ConstructRange()
172 ASSERT_LISTS_EQUAL(ref, ifl); in ConstructRange()
206 std::forward_list<int> ref; in PushPop() local
208 ASSERT_LISTS_EQUAL(ref, ifl); in PushPop()
209 ref.push_front(3); in PushPop()
211 ASSERT_LISTS_EQUAL(ref, ifl); in PushPop()
213 ref.push_front(7); in PushPop()
215 ASSERT_LISTS_EQUAL(ref, ifl); in PushPop()
217 ref.pop_front(); in PushPop()
[all …]
Dtransform_iterator_test.cc238 auto ref = [](const ValueHolder& h) -> const int& { return h.value; }; in TEST() local
242 using vector_titer = decltype(MakeTransformIterator(input.begin(), ref)); in TEST()
248 using vector_ctiter = decltype(MakeTransformIterator(input.cbegin(), ref)); in TEST()
254 using vector_rtiter = decltype(MakeTransformIterator(input.rbegin(), ref)); in TEST()
260 using vector_crtiter = decltype(MakeTransformIterator(input.crbegin(), ref)); in TEST()
266 std::copy(MakeTransformIterator(input.begin(), ref), in TEST()
267 MakeTransformIterator(input.end(), ref), in TEST()
272 std::copy(MakeTransformIterator(input.cbegin(), ref), in TEST()
273 MakeTransformIterator(input.cend(), ref), in TEST()
278 std::copy(MakeTransformIterator(input.rbegin(), ref), in TEST()
[all …]
/art/dex2oat/dex/
Dverification_results.cc38 void VerificationResults::AddRejectedClass(ClassReference ref) { in AddRejectedClass() argument
41 rejected_classes_.insert(ref); in AddRejectedClass()
43 DCHECK(IsClassRejected(ref)); in AddRejectedClass()
46 bool VerificationResults::IsClassRejected(ClassReference ref) const { in IsClassRejected()
48 return rejected_classes_.find(ref) != rejected_classes_.end(); in IsClassRejected()
51 void VerificationResults::AddUncompilableMethod(MethodReference ref) { in AddUncompilableMethod() argument
54 uncompilable_methods_.insert(ref); in AddUncompilableMethod()
56 DCHECK(IsUncompilableMethod(ref)); in AddUncompilableMethod()
59 void VerificationResults::AddUncompilableClass(ClassReference ref) { in AddUncompilableClass() argument
60 const DexFile& dex_file = *ref.dex_file; in AddUncompilableClass()
[all …]
Dquick_compiler_callbacks.cc25 void QuickCompilerCallbacks::AddUncompilableMethod(MethodReference ref) { in AddUncompilableMethod() argument
27 verification_results_->AddUncompilableMethod(ref); in AddUncompilableMethod()
31 void QuickCompilerCallbacks::AddUncompilableClass(ClassReference ref) { in AddUncompilableClass() argument
33 verification_results_->AddUncompilableClass(ref); in AddUncompilableClass()
37 void QuickCompilerCallbacks::ClassRejected(ClassReference ref) { in ClassRejected() argument
39 verification_results_->AddRejectedClass(ref); in ClassRejected()
43 ClassStatus QuickCompilerCallbacks::GetPreviousClassState(ClassReference ref) { in GetPreviousClassState() argument
51 return compiler_driver_->GetClassStatus(ref); in GetPreviousClassState()
54 void QuickCompilerCallbacks::UpdateClassState(ClassReference ref, ClassStatus status) { in UpdateClassState() argument
57 compiler_driver_->RecordClassStatus(ref, status); in UpdateClassState()
Dverification_results.h39 void AddRejectedClass(ClassReference ref) REQUIRES(!rejected_classes_lock_);
40 bool IsClassRejected(ClassReference ref) const REQUIRES(!rejected_classes_lock_);
42 void AddUncompilableClass(ClassReference ref) REQUIRES(!uncompilable_methods_lock_);
43 void AddUncompilableMethod(MethodReference ref) REQUIRES(!uncompilable_methods_lock_);
44 bool IsUncompilableMethod(MethodReference ref) const REQUIRES(!uncompilable_methods_lock_);
Dquick_compiler_callbacks.h36 void AddUncompilableMethod(MethodReference ref) override;
37 void AddUncompilableClass(ClassReference ref) override;
39 void ClassRejected(ClassReference ref) override;
53 ClassStatus GetPreviousClassState(ClassReference ref) override;
62 void UpdateClassState(ClassReference ref, ClassStatus state) override;
/art/runtime/gc/collector/
Dconcurrent_copying-inl.h37 mirror::Object* ref, in MarkUnevacFromSpaceRegion() argument
42 DCHECK(!young_gen_ || region_space_bitmap_->Test(ref) || region_space_->IsLargeObject(ref)) in MarkUnevacFromSpaceRegion()
43 << ref << " " in MarkUnevacFromSpaceRegion()
44 << ref->GetClass<kVerifyNone, kWithoutReadBarrier>()->PrettyClass(); in MarkUnevacFromSpaceRegion()
48 if (ref->AtomicSetReadBarrierState(ReadBarrier::NonGrayState(), ReadBarrier::GrayState())) { in MarkUnevacFromSpaceRegion()
53 PushOntoMarkStack(self, ref); in MarkUnevacFromSpaceRegion()
55 DCHECK_EQ(ref->GetReadBarrierState(), ReadBarrier::GrayState()); in MarkUnevacFromSpaceRegion()
56 return ref; in MarkUnevacFromSpaceRegion()
68 if (bitmap->Test(ref)) { in MarkUnevacFromSpaceRegion()
69 return ref; in MarkUnevacFromSpaceRegion()
[all …]
Dconcurrent_copying.cc508 mirror::Object* ref = *root; in VisitRoots() local
509 if (ref != nullptr) { in VisitRoots()
510 mirror::Object* to_ref = concurrent_copying_->Mark(self, ref); in VisitRoots()
511 if (to_ref != ref) { in VisitRoots()
526 mirror::Object* ref = root->AsMirrorPtr(); in VisitRoots() local
527 mirror::Object* to_ref = concurrent_copying_->Mark(self, ref); in VisitRoots()
528 if (to_ref != ref) { in VisitRoots()
617 void operator()(ObjPtr<mirror::Class> klass, ObjPtr<mirror::Reference> ref) const in operator ()()
620 CheckReference(ref->GetReferent<kWithoutReadBarrier>(), in operator ()()
621 ref, in operator ()()
[all …]
/art/tools/ahat/src/main/com/android/ahat/heapdump/
DAhatInstance.java446 for (AhatInstance ref : getReverseReferences()) { in getHardReverseReferences()
447 if (ref.getReachability() == Reachability.STRONG && ref.getReferent() != this) { in getHardReverseReferences()
448 refs.add(ref); in getHardReverseReferences()
464 for (AhatInstance ref : getReverseReferences()) { in getSoftReverseReferences()
465 if (ref.getReachability() != Reachability.STRONG || ref.getReferent() == this) { in getSoftReverseReferences()
466 refs.add(ref); in getSoftReverseReferences()
731 for (Reference ref : root.getReferences()) { in computeReachability()
732 queues.get(Reachability.STRONG).add(ref); in computeReachability()
738 Reference ref = queue.poll(); in computeReachability() local
739 if (ref.ref.mReachability == Reachability.UNREACHABLE) { in computeReachability()
[all …]
DReference.java28 public final AhatInstance ref; field in Reference
31 public Reference(AhatInstance src, String field, AhatInstance ref, Reachability reachability) { in Reference() argument
34 this.ref = ref; in Reference()
/art/benchmark/jobject-benchmark/
Djobject_benchmark.cc32 jobject ref = soa.Env()->AddLocalReference<jobject>(obj); in Java_JObjectBenchmark_timeAddRemoveLocal() local
33 soa.Env()->DeleteLocalRef(ref); in Java_JObjectBenchmark_timeAddRemoveLocal()
42 jobject ref = soa.Env()->AddLocalReference<jobject>(obj); in Java_JObjectBenchmark_timeDecodeLocal() local
44 CHECK_EQ(soa.Decode<mirror::Object>(ref), obj); in Java_JObjectBenchmark_timeDecodeLocal()
46 soa.Env()->DeleteLocalRef(ref); in Java_JObjectBenchmark_timeDecodeLocal()
55 jobject ref = soa.Vm()->AddGlobalRef(soa.Self(), obj); in Java_JObjectBenchmark_timeAddRemoveGlobal() local
56 soa.Vm()->DeleteGlobalRef(soa.Self(), ref); in Java_JObjectBenchmark_timeAddRemoveGlobal()
65 jobject ref = soa.Vm()->AddGlobalRef(soa.Self(), obj); in Java_JObjectBenchmark_timeDecodeGlobal() local
67 CHECK_EQ(soa.Decode<mirror::Object>(ref), obj); in Java_JObjectBenchmark_timeDecodeGlobal()
69 soa.Vm()->DeleteGlobalRef(soa.Self(), ref); in Java_JObjectBenchmark_timeDecodeGlobal()
[all …]
/art/runtime/gc/space/
Dregion_space.h238 bool IsInFromSpace(mirror::Object* ref) { in IsInFromSpace() argument
239 if (HasAddress(ref)) { in IsInFromSpace()
240 Region* r = RefToRegionUnlocked(ref); in IsInFromSpace()
251 bool IsInNewlyAllocatedRegion(mirror::Object* ref) { in IsInNewlyAllocatedRegion() argument
252 if (HasAddress(ref)) { in IsInNewlyAllocatedRegion()
253 Region* r = RefToRegionUnlocked(ref); in IsInNewlyAllocatedRegion()
259 bool IsInUnevacFromSpace(mirror::Object* ref) { in IsInUnevacFromSpace() argument
260 if (HasAddress(ref)) { in IsInUnevacFromSpace()
261 Region* r = RefToRegionUnlocked(ref); in IsInUnevacFromSpace()
267 bool IsLargeObject(mirror::Object* ref) { in IsLargeObject() argument
[all …]
/art/test/1004-checker-volatile-ref-load/
DAndroid.bp3 // Build rules for ART run-test `1004-checker-volatile-ref-load`.
16 name: "art-run-test-1004-checker-volatile-ref-load",
21 ":art-run-test-1004-checker-volatile-ref-load-expected-stdout",
22 ":art-run-test-1004-checker-volatile-ref-load-expected-stderr",
31 name: "art-run-test-1004-checker-volatile-ref-load-expected-stdout",
32 out: ["art-run-test-1004-checker-volatile-ref-load-expected-stdout.txt"],
39 name: "art-run-test-1004-checker-volatile-ref-load-expected-stderr",
40 out: ["art-run-test-1004-checker-volatile-ref-load-expected-stderr.txt"],
/art/libdexfile/dex/
Ddex_file_reference.h61 size_t operator()(const art::DexFileReference& ref) const {
62 return hash<decltype(ref.dex_file)>()(ref.dex_file) ^
63 hash<decltype(ref.index)>()(ref.index);
/art/test/2042-reference-processing/src/
DMain.java17 import java.lang.ref.PhantomReference;
18 import java.lang.ref.Reference;
19 import java.lang.ref.ReferenceQueue;
20 import java.lang.ref.WeakReference;
103 MyPhantomReference ref = phantomRefs.get(n); in inPhantomRefs() local
104 if (ref == null) { in inPhantomRefs()
107 if (ref.n != n) { in inPhantomRefs()
162 Reference<FinalizableObject> ref = (Reference<FinalizableObject>) refQueue.poll(); in emptyAndCheckQueues() local
163 if (ref == null) { in emptyAndCheckQueues()
166 if (ref instanceof MyWeakReference) { in emptyAndCheckQueues()
[all …]
/art/profman/
Dboot_image_profile.cc42 static std::string GetTypeDescriptor(const TypeReference& ref) { in GetTypeDescriptor() argument
43 const dex::TypeId& type_id = ref.dex_file->GetTypeId(ref.TypeIndex()); in GetTypeDescriptor()
44 return ref.dex_file->GetTypeDescriptor(type_id); in GetTypeDescriptor()
48 static std::string BootImageRepresentation(const MethodReference& ref) { in BootImageRepresentation() argument
49 const DexFile* dex_file = ref.dex_file; in BootImageRepresentation()
50 const dex::MethodId& id = ref.GetMethodId(); in BootImageRepresentation()
61 static std::string BootImageRepresentation(const TypeReference& ref) { in BootImageRepresentation() argument
62 return GetTypeDescriptor(ref); in BootImageRepresentation()
66 static std::string PreloadedClassesRepresentation(const TypeReference& ref) { in PreloadedClassesRepresentation() argument
67 std::string descriptor = GetTypeDescriptor(ref); in PreloadedClassesRepresentation()
[all …]
/art/test/004-NativeAllocations/src-art/
DMain.java18 import java.lang.ref.ReferenceQueue;
19 import java.lang.ref.PhantomReference;
31 static PhantomReference ref = null; field in Main
70 ref = $noinline$allocPhantom(queue); in checkRegisterNativeAllocation()
73 for (i = 0; !ref.isEnqueued() && i < allocationCount; ++i) { in checkRegisterNativeAllocation()
93 + " iterations, is_enqueued = " + ref.isEnqueued()); in checkRegisterNativeAllocation()
102 + " is_enqueued = " + ref.isEnqueued()); in checkRegisterNativeAllocation()
107 + " is_enqueued = " + ref.isEnqueued()); in checkRegisterNativeAllocation()
/art/runtime/native/
Djava_lang_ref_Reference.cc33 const ObjPtr<mirror::Reference> ref = soa.Decode<mirror::Reference>(javaThis); in Reference_getReferent() local
35 Runtime::Current()->GetHeap()->GetReferenceProcessor()->GetReferent(soa.Self(), ref); in Reference_getReferent()
45 const ObjPtr<mirror::Reference> ref = soa.Decode<mirror::Reference>(javaThis); in Reference_refersTo0() local
47 const ObjPtr<mirror::Object> referent = ref->template GetReferent<kWithoutReadBarrier>(); in Reference_refersTo0()
75 const ObjPtr<mirror::Reference> ref = soa.Decode<mirror::Reference>(javaThis); in Reference_clearReferent() local
76 Runtime::Current()->GetHeap()->GetReferenceProcessor()->ClearReferent(ref); in Reference_clearReferent()
/art/compiler/utils/
Datomic_dex_ref_map-inl.h53 AtomicDexRefMap<DexFileReferenceType, Value>::Insert(const DexFileReferenceType& ref, in Insert() argument
56 ElementArray* const array = GetArray(ref.dex_file); in Insert()
60 DCHECK_LT(ref.index, array->size()); in Insert()
61 return (*array)[ref.index].CompareAndSetStrongSequentiallyConsistent(expected, desired) in Insert()
67 inline bool AtomicDexRefMap<DexFileReferenceType, Value>::Get(const DexFileReferenceType& ref, in Get() argument
69 const ElementArray* const array = GetArray(ref.dex_file); in Get()
73 *out = (*array)[ref.index].load(std::memory_order_relaxed); in Get()
78 inline bool AtomicDexRefMap<DexFileReferenceType, Value>::Remove(const DexFileReferenceType& ref, in Remove() argument
80 ElementArray* const array = GetArray(ref.dex_file); in Remove()
84 *out = (*array)[ref.index].exchange(nullptr, std::memory_order_seq_cst); in Remove()

123456789